Page MenuHomePhabricator

Table sorting broken by use of expand-child class
Closed, ResolvedPublic

Description

Use of expand-child class to define subordinate/child table row breaks table sorting function. Example at https://en.wikipedia.org/wiki/2014_term_United_States_Supreme_Court_opinions_of_Ruth_Bader_Ginsburg. Loss of function occurred relatively recently, could be caused by change to colspan--see comment at https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&diff=684281564&oldid=684271506 .

Event Timeline

Postdlf raised the priority of this task from to Needs Triage.
Postdlf updated the task description. (Show Details)
Postdlf subscribed.

In manageColspans(), cssChildRows are skipped and don't receive columnToCell data property. However in detectParserForColumn() the data in columnToCell is used unconditionally.

Change 244940 had a related patch set uploaded (by MatthiasDD):
jquery.tablesorter: use of expand-child class

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

In the past cssChildRows are read for auto detection of parser only for the first row. Now cssChildRows are scipped for auto detection and sorting.
After change I5180296 i have tested the example in https://en.wikipedia.org/wiki/Help:Sorting#Keeping some rows together. But this example have only text in the first row and in this case the second row was not read.

TheDJ assigned this task to MatthiasDD.
TheDJ triaged this task as Medium priority.
TheDJ removed a project: Patch-For-Review.
TheDJ set Security to None.

Change 244940 merged by jenkins-bot:
jquery.tablesorter: use of expand-child class

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