Last modified: 2014-01-15 03:07:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53930, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51930 - VisualEditor: Template parameters should be in TemplateData recommended order
VisualEditor: Template parameters should be in TemplateData recommended order
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Low enhancement
: VE-deploy-2014-01-16
Assigned To: Trevor Parscal
:
: 53891 (view as bug list)
Depends on: 53608
Blocks: ve-templatesupport
  Show dependency treegraph
 
Reported: 2013-07-24 08:28 UTC by Chris McKenna
Modified: 2014-01-15 03:07 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McKenna 2013-07-24 08:28:29 UTC
Several users on the English Wikipedia, most recently Salix, have requested that the parameters for templates should be in the recommended order not alphabetical order. 

For example in {{tracklist}} it lists "Track10" before "Track2", and in the various citation templates, "First" and "Last" should be adjacent.
Comment 1 Richard Morris 2013-07-24 14:07:17 UTC
An example of this is {{Taxobox}} which has 100+ parameters. There are about 10 recommended parameters which go at the top the list and the rest of the parameters have a strict ordering depending on taxonomic hierarchy. Kingdom, Phylum, Class,	Order, Family, Subfamily, Genus, Species. An example of use is http://en.wikipedia.org/wiki/Formica which gives the fields in a confusing alphabetial order (latin names are used for the fields).

A second problem is the order when no templatedata is specified. In the article http://en.wikipedia.org/wiki/Where_Does_This_Door_Go?veaction=edit
if you open up the dialog for the {{tracklist}} the parameters are listed in the order track1, track10, track11 ... track15 track2 track3 ... track9. Ideally they would be in strict numerical ordering. This would require a smarter sorting algorithm than just alphabetical. 

Another note is that case insensitive sort is better than case sensitive sort as templates often have the same parameter with different capitalization, 'Image' and 'image'.
Comment 2 Bartosz Dziewoński 2013-07-30 23:15:59 UTC
Another example is [[pl:Template:Związek chemiczny infobox]] on pl.wp (infobox for chemical compounds) which has a lot of parameters which should be shown together, but which are not always alphabetically one after another. These groups are for example:

* gęstość + gęstość źródło + stan skupienia w podanej g + g warunki niestandardowe (density, source for density, state of matter for this density, non-standard environment conditions for the density)
* rozpuszczalność w wodzie + rww źródło + rww warunki niestandardowe (solubility in water, source, non-standard environment conditions)
Comment 3 James Forrester 2013-08-30 22:09:07 UTC
There is no such thing as "TemplateData recommended order"; the JSON block is unordered and can't be relied upon. Does this imply that we should have a "parameter order" value for TemplateData?
Comment 4 Richard Morris 2013-08-30 22:56:17 UTC
There is a good case for imposing some ordering on the template parameters. Often you find some parameters naturally group together. Take for example http://en.wikipedia.org/wiki/Template:Infobox_single/doc There are various parameters which group together:
*Ones relating to the image (Cover, Alt, Caption and Border)
*Ones to do with the single chronology (Last single, This single, Next single)
for infoboxes a prefered order would generally be the order they appear in the template.
Comment 5 James Forrester 2013-08-30 23:02:05 UTC
(In reply to comment #4)
> There is a good case for imposing some ordering on the template parameters.
> Often you find some parameters naturally group together. Take for example
> http://en.wikipedia.org/wiki/Template:Infobox_single/doc There are various
> parameters which group together:
> *Ones relating to the image (Cover, Alt, Caption and Border)
> *Ones to do with the single chronology (Last single, This single, Next
> single)
> for infoboxes a prefered order would generally be the order they appear in
> the
> template.

Yeah, that sounds a totally reasonable thing to add. Making a bug now…
Comment 6 Chris McKenna 2013-10-01 19:24:07 UTC
*** Bug 53891 has been marked as a duplicate of this bug. ***
Comment 7 Bartosz Dziewoński 2013-11-14 13:15:26 UTC
The dependency has been fixed.

Is the importance of this still "Low enhancement"?
Comment 8 Quim Gil 2013-12-10 01:59:59 UTC
After filling/testing a couple of templates in ca.wikipedia.org, it looks like the current behavior is the following:

* Required fields are sorted by the order they are listed in the template data.
* Optional files are sorted alphabetically.

Please sort everything following the same sequence used in the template data. Usually this is the same order used in the "old" documentation, which in turn tends to follow the order in which the information is presented.
Comment 9 Trevor Parscal 2014-01-14 20:19:12 UTC
Resolved in Ic3eb665389380c8e3dd6562b059c2f6655a22588
Comment 10 Gerrit Notification Bot 2014-01-14 20:19:56 UTC
Change 107428 had a related patch set uploaded by Trevor Parscal:
Use paramOrder data for ordering template parameters

https://gerrit.wikimedia.org/r/107428
Comment 11 Gerrit Notification Bot 2014-01-15 02:58:54 UTC
Change 107428 merged by jenkins-bot:
Use paramOrder data for ordering template parameters

https://gerrit.wikimedia.org/r/107428

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links