Page MenuHomePhabricator

TemplateData display table should not be sortable when there's zero or one parameter
Closed, ResolvedPublic1 Estimated Story Points

Description

When <templatedata> element is shown on template documentation page, the table for params is always sortable.

That looks ridiculous if only one parameter is present.

Implementation

rETDA /TemplateDataBlob.php #L696

Add sortable class if and only if count( (array)$data->params ) > 1

Event Timeline

PerfektesChaos raised the priority of this task from to Needs Triage.
PerfektesChaos updated the task description. (Show Details)
PerfektesChaos added a project: TemplateData.
PerfektesChaos subscribed.

I really don't think it's that bad

I really don't think it's that bad

But I do, and I received complaints.

Even worse:

If a template does not expect any parameters, but provides a description of the purpose, you end up in a meaningless table which has sortable head cells but only one spread out line which tells you that no parameters were supplied.

However, params must not be omitted since that produces an invalid JSON block.

Please convince me:

  • How and why should I sort one or zero parameters?
  • How is the definition of templates expected with no parameters but telling me its purpose?
Jdforrester-WMF renamed this task from Table should not be sortable for one parameter only to TemplateData display table should not be sortable when there's zero or one parameter.Mar 1 2016, 7:37 PM
Jdforrester-WMF triaged this task as Lowest priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF set Security to None.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

Change 602826 had a related patch set uploaded (by AdhamKhatean; owner: AdhamKhatean):
[mediawiki/extensions/TemplateData@master] Remove Sortable class from tables that have one row or less

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

Change 602826 abandoned by AdhamKhatean:
Remove Sortable class from tables that have one row or less

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

Change 602826 restored by AdhamKhatean:
Remove Sortable class from tables that have one row or less

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

Change 602826 abandoned by AdhamKhatean:
Remove Sortable class from tables that have one row or less

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

Change 602826 restored by AdhamKhatean:
Remove Sortable class from tables that have one row or less

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

Change 602826 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Remove Sortable class from tables that have one row or less

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