Page MenuHomePhabricator

[PCS] Collapsible tables should not be moved out of their parent element.
Closed, ResolvedPublic

Description

Certain articles have a table with more than one image that needs the skin-invert class for proper display in dark mode. For convenience, the editors put such tables in a <div> that has the skin-invert class, which makes the class apply to all child elements.

The problem is that when PCS prepares tables to make them collapsible, it moves the table element out of its parent, and puts it as a direct child of the current section tag. This is very likely not necessary, and should no longer be done.

For example:
https://en.m.wikipedia.org/wiki/List_of_fentanyl_analogues
https://en.wikipedia.org/api/rest_v1/page/mobile-html/List_of_fentanyl_analogues

Event Timeline

Change #1173954 had a related patch set uploaded (by Dbrant; author: Dbrant):

[mediawiki/services/mobileapps@master] Simplify and improve collapsing of tables.

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

Change #1173954 merged by Cooltey:

[mediawiki/services/mobileapps@master] Simplify and improve collapsing of tables.

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

Dbrant claimed this task.