Page MenuHomePhabricator

Add sortability to tables with "sortable" class in the apps
Open, MediumPublic

Description

Tables using the sortable attribute should be sortable in the Android apps as well.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Pcoombe renamed this task from Add sortability to tables with "sortable" class to Add sortability to tables with "sortable" class in the Android app.Jan 31 2021, 12:23 AM

User feedback on Google Play from May 29, 2022:

It's a good app but I have some issues: - I would like to be able to sort a table by a column like I can in the browser version - the content of a table should be visible in its entirety without having to scroll left and right all the time

+1 user through the Android support email:

I'd like to suggest:
Sorting by column: using a web browser, you can sort tables using different columns (you have a little icon of arrows at the heading of a sortable column). I don't see anything like that in the app. For example, in the article "List of countries by infant and under-five mortality rate", the tables are by default sorted by the country name (abc) and the entries are numbered. First, you can't sort by the mortality rate itself, and second, when sorting alphabetically, the numbering of countries has no meaning (except for counting the countries, which is incidental to the article itself).

Seddon renamed this task from Add sortability to tables with "sortable" class in the Android app to Add sortability to tables with "sortable" class in the apps.Feb 22 2023, 3:11 PM

Change 893444 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Mobileapps: Add sortability to tables with "sortable" class in the apps

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

We received this request from one of the iOS users through the support email:

The only thing that bothers me about the Wikipedia app is that you cannot sort tables. You can do it on the browser, but for some reason, not on the app.

Version: WikipediaApp/7.2.1.2090 (iOS 16.0; Phone)

This ticket is blocked till we decide about ResourceLoader applying in mobileapps. Current patch provides two solutions that are not optimal.

  1. Custom sortable tables that can be tested using domino package, but has less functionality than jquery sortable.
  2. Using recent jquery and jquery.sortable plugin. I just connected them by using minified files from cdnjs which makes it not consistent with jquery bundle used in Mediawiki core. Also, unit tests won't allow to check jquery sortable tables due to the nature of server side test runner. More details in the conversation in the patch above.

Change 893444 abandoned by Vadim Kovalenko:

[mediawiki/services/mobileapps@master] Mobileapps: Add sortability to tables with "sortable" class in the apps

Reason:

Bith solutions of this patch don't meet requirements of table sorter.

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

Blocked on PCS not supporting ResourceLoader, need to figure that out before moving forward.