Page MenuHomePhabricator

mobile-html: allow clients to adjust tables
Closed, DeclinedPublic


On iOS, users can define whether they want article tables to be collapsed or expanded by default. This means that we need to be able to communicate that preference to the html.
We also need to be able to pass our localized strings for table titles. (T205550)

Proposed solution
Provide a JS function that allows clients to adjust tables.
For example (once T205550 is completed):

wmf.adjustTables = (collapse, locale) => {
    // adjust tables
    if (callback) {

Currently, on iOS, when the user taps on a collapsed table's footer, we scroll them back to the top of that table. Is this behavior going to move up to page library or are we expected to continue handling it ourselves?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2019, 5:22 PM
Jhernandez added subscribers: bearND, Jhernandez.

@bearND to move under the appropriate epic and prioritise. This could be blocked on figuring out how the app injects settings to the web view.

LGoto triaged this task as Medium priority.Mar 27 2019, 3:54 PM
bearND claimed this task.May 29 2019, 3:35 PM
bearND moved this task from To Do to Doing on the Product-Infrastructure-Team-Backlog (Kanban) board.

@Sharvaniharan @NHarateh_WMF Is this used by the apps by itself (just collapseTables)? If so how or where is it used? This functionality is exposed by the setMulti() function which should be called when a page loads.
Having a separate call for this, when we cannot reasonably assume what the state of the table collapsing is would require some refactoring work. That's why I wanted to check first if this is even needed as a stand-alone function.

@bearND on iOS, it's not used by itself so it's not needed right now. We pass that preference when we create a page -

Same on android @bearND . We use it while loading the leas section as a meta preference.:
Further we have a native transform for it.

bearND closed this task as Declined.Jun 11 2019, 4:29 PM

Then we can close this. Thanks, @NHarateh_WMF and @Sharvaniharan!