Tables using the sortable attribute should be sortable in the Android apps as well.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Mobileapps: Add sortability to tables with "sortable" class in the apps | mediawiki/services/mobileapps | master | +315 -6 |
Related Objects
- Mentioned In
- T286643: [EPIC] Systematic solution on preventing rendering issues on user styles between dark/light themes
T232046: As a reader using the iOS app I would like to be able to sort tables
T258421: Adding row categories/tags to tables that enable filtering displayed rows
T258417: Add "add table entry" and "edit row" for the wikitext editors as well as "edit with VisualEditor" functions to tables for simplyifing editing tables
T258382: Fix the display of tables on mobile (responsive web design: when the user taps on a table rotate the screen for a fullscreen view)
T233340: Add sortability to sortable tables for readers of the mobile web site
Event Timeline
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).
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
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.
- Custom sortable tables that can be tested using domino package, but has less functionality than jquery sortable.
- 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.
Blocked on PCS not supporting ResourceLoader, need to figure that out before moving forward.
I'm doing some research into what it would take to implement this as a general-purpose ResourceLoader pass-through for modules that are invoked by content (and thus generalizable for things like the Graphs replacement when it's ready). Will write up some notes after a little more poking...