`textVisible` loader option is inadequately named/documented
@johnbender 已经在做这个了。
开始于 2013年6月12日。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, jquery
调研方向
从 api.jquerymobile.com/page-loading/#option-textVisible 中的 textVisible 选项文档开始,并将其与此 issue 中的 loader 输出示例进行比较。检查配置 html 和 textVisible 时如何选择 ui-loader-default 和 ui-loader-verbose 类;完成的标准是清楚地记录这一行为,或就命名/API 变更达成决定。
由索引模型根据 Issue 内容生成。
描述
Issue description
Reading the documentation, it seems like the textVisible loader option only controls whether the supplied text will be shown:
If true, the text value will be used under the spinner.
However, when using the html option to specify custom HTML for the loader, it turns out that the textVisible option still controls whether the loader is shown as simple circle or as a bigger box (with space for text or other content).
This is not clear from the documentation, so it would help to add information about this. The underlying problem is, however, that the naming for the textVisible option does not make clear that it controls more things than only showing text. It might be better to add another option to control whether the loader is shown as circle or as a box (or rename this option to something more appropriate).
Test code
Specifically look at the latest class name. This class seems to determine whether the loader is just a circle (ui-loader-default) or a bigger box (ui-loader-verbose).
Default loader
Output: circle loader
<div class="ui-loader ui-corner-all ui-body-a ui-loader-default">
<span class="ui-icon ui-icon-loading"></span>
<h1>loading</h1>
</div>
Loader with text
Configuration
$.mobile.loader.prototype.options.text = 'Hi there';
$.mobile.loader.prototype.options.textVisible = true;
Output: box loader
<div class="ui-loader ui-corner-all ui-body-a ui-loader-verbose">
<span class="ui-icon ui-icon-loading"></span>
<h1>Hi there</h1>
</div>
Loader with custom HTML
Configuration
$.mobile.loader.prototype.options.html = 'Hello';
Output: circle loader (why?)
<div class="ui-loader ui-corner-all ui-body-a ui-loader-default">
Hello
</div>
Loader with custom HTML and textVisible option
Configuration
$.mobile.loader.prototype.options.html = 'Hello';
$.mobile.loader.prototype.options.textVisible = true;
Output: box loader (why?)
<div class="ui-loader ui-corner-all ui-body-a ui-loader-verbose">
Hello
</div>
jQuery Mobile and jQuery core version used
- JS Bin test page: jQuery Mobile latest and jQuery 1.9.0.
Other relevant information
Please let me know if test pages are required, in that case I will add them to this issue.
- 主要语言
- HTML
- 星标
- 55
- 派生
- 57
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jquery/api.jquerymobile.com 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jquery/api.jquerymobile.com#387 ·
-
难度 1/5 1-3 小时 新手友好度 68/100
jquery/api.jquerymobile.com#312 ·
-
难度 1/5 1 小时以内 新手友好度 62/100
jquery/api.jquerymobile.com#253 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
jquery/api.jquerymobile.com#210 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
jquery/api.jquerymobile.com#430 · 1 条评论 ·
查看 jquery/api.jquerymobile.com 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
buckai-observatory/Automated-Cloud-Removal-and-Seamless-Satellite-Image-Mosaicking-Pipeline#52 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 82/100
run-llama/llama_index#24163 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
btclib-org/btclib#3090 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 84/100
asasemahmed/openboard#68 ·
维护者通常 1 天内回复