Page MenuHomePhabricator

Enable jquery.tablesorter on mobile
Closed, DuplicatePublic

Description

Author: jgonera

Description:
Currently it doesn't: https://en.m.wikipedia.org/wiki/Wikipedia:Sortable_table

Exception thrown by mediawiki.page.ready: Unknown dependency: jquery.tablesorter

Apart from adding mobile target in Resources.php in core, we need to fix our CSS because <td> positioning is wrong when using tablesorter.


Version: unspecified
Severity: enhancement

Details

Reference
bz47858

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:22 AM
bzimport set Reference to bz47858.
bzimport added a subscriber: Unknown Object (MLST).

What is the benefit of adding this to mobile?
Do people really care about table sorting on a mobile device?
Does it even make sense on a mobile phone?
How does this play into existing problems with tables which have remained unsolved for years [1]?
How would the controls work on mobile?

We should think from the user's perspective rather than the existing code perspective.

[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=36936

Also:
Is it worth the additional payload no matter how small?
Has the existing code been tested vigorously across mobile devices? Will it be tested vigorously in future?

jgonera wrote:

While I agree that this is not a top priority, I'm not sure why the status is UNCONFIRMED.

Not sure what happened there didn't mean to change it. Marking as NEW again.

Is there any progress on this? This is really annoying bug and users usually don't want to spend extra time to change WIki to classic view and then back to mobile view just because of this bug.

Open questions:

  • do we need to make any changes to the design for sorting tables on mobile?
  • is it the right solution for mobile?
  • How does this perform on large tables on mobiles?
  • How does this work given the styling differences for tables on a mobile device

When overriding the target on https://en.m.wikipedia.org/wiki/Help:Sorting, it looks as follows:

Screen Shot 2017-05-12 at 19.32.02.png (528×1 px, 57 KB)

The icon is overlapped with the header cell text because the following two rules override each other (the first one wins due to being stronger):

skin.minerva
.content table.wikitable > * > tr > th {
    border: 1px solid #c8ccd1;
    padding: 0.2em;
}
jquery.tablesorter
table.jquery-tablesorter th.headerSort {
    background-image: url(/w/resources/src/jquery/images/sort_both.png?8b01b);
    background-image: ..
    background-position: center right;
    padding-right: 21px;
}

Compared to the regular wikitable styles that other skins use, which uses a selector that is less strong. In this case the tablesorter styles win (due to applying last with equal strength).

shared.css
table.wikitable > * > tr > th {
    border: 1px solid #a2a9b1;
    padding: 0.2em 0.4em;
}