`textVisible` loader option is inadequately named/documented

Aperta
#122 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@johnbender ci sta già lavorando.

Dal 12/6/2013.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, jquery
Ambito
documentation

Direzione di ricerca

Inizia con la documentazione dell’opzione textVisible all’indirizzo api.jquerymobile.com/page-loading/#option-textVisible e confrontala con gli esempi di output del loader in questa issue. Verifica come vengono selezionate le classi ui-loader-default e ui-loader-verbose quando html e textVisible sono configurati; il lavoro è concluso quando questo comportamento è documentato chiaramente oppure è stata decisa una modifica ai nomi/API.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
HTML
Stelle
55
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jquery/api.jquerymobile.com

Tutte le issue di jquery/api.jquerymobile.com

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.