Page MenuHomePhabricator

Don't show Default, Example and Auto value section of the TemplateData description cell if no information is provided
Closed, ResolvedPublic1 Story Points

Description

The rows of the TemplateData table in the documentation page take a lot of space even if the Default, Example and Auto value parameters are empty. This makes the documentation pages with lot of parameters unnecessarily long providing a lot of no relevant visual clutter and a huge vertical scroll. This can be seen for example in the Cite web template of the English Wikipedia, where most of the length of the page is irrelevant information such as:

Default
empty
Example
empty
Auto value
empty

It would be great to make these sections only visible in the documentation page when they are no empty.

Event Timeline

Agabi10 created this task.Jan 31 2016, 12:35 PM
Agabi10 raised the priority of this task from to Needs Triage.
Agabi10 updated the task description. (Show Details)
Agabi10 added a project: TemplateData.
Agabi10 added a subscriber: Agabi10.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 31 2016, 12:35 PM

So you suggest that if all parameters have no default, then the default: empty is not shown for any parameters, and the same for example and autovalue?

I was considering something similar for https://gerrit.wikimedia.org/r/#/c/263655/

More or less. What I suggest is to make the default: empty and the others not visible for the values which have it undefined. If one parameter have a default value and the others no the one with the default parameter should be the only one specifying a default.

Jdforrester-WMF renamed this task from Remove Default, Example and Auto value section of the TemplateData description cell if no information is provided to Don't show Default, Example and Auto value section of the TemplateData description cell if no information is provided.Apr 19 2016, 7:24 PM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF set Security to None.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 7:24 PM
Agabi10 claimed this task.Sep 1 2018, 11:34 PM

Change 457072 had a related patch set uploaded (by Agabi10; owner: Agabi10):
[mediawiki/extensions/TemplateData@master] Remove empty Default, Example and Auto value sections of the output table

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

The_RedBurn updated the task description. (Show Details)Sep 6 2018, 5:57 AM

Change 457072 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Remove empty Default, Example and Auto value sections of the output table

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

matmarex closed this task as Resolved.Sep 28 2018, 4:10 PM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptSep 28 2018, 4:10 PM

It's crazy how much better the TemplateData tables look without these. @Agabi10 Thank you for working on this!

Indeed, thanks @Agabi10 for the patch and @Jdforrester-WMF and @matmarex for the review!