Page MenuHomePhabricator

Split up CollapseTable transform into client and server side code
Closed, DeclinedPublic

Description

Consider refactoring the CollapseTable transform of the page library so that the event handling is outside of the transform function, so that the DOM transformations can be run server-side, while the event handling can be done separately on the client side.

Event Timeline

bearND triaged this task as Medium priority.Jul 2 2018, 11:38 PM
bearND created this task.

@bearND, the CollapseTableTransform was more or less copied from the Android / iOS apps with a whole of bunch tests added on top. There was a lot and still is a lot of code that could use some love :] Please feel free to be aggressive when refactoring it!

Jhernandez subscribed.

Put it on doing since it is a subtask of the task you are doing and you are assigned. If you want someone to pick it up and help with it, move it back to todo and unassign yourself from it ✊

I'm not sure whether PCS should be running this transform, even if we split up a portion that could run server-side. This seems like a UI decision and would go counter to us providing more content vs UI. It would also require some I18N on the server for three labels (infobox/other table label, footer label), or at least run a bigger portion of this transform on the client.

Change 449457 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/mobileapps@master] mobile-html spec: CollapseTables is not included for now

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

Change 449457 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] mobile-html spec: CollapseTables is not included for now

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