Page MenuHomePhabricator

Modernise metadata table collapsible
Open, LowestPublic

Description

As a way of experimenting with a CSS-only approach to having elements be initially collapsed (in JS mode), let's apply what we know to the collapsible table of metadata on file pages.

We can then take what we know, apply it to mw-collapsible, and possibly swap ImagePage to use that instead.

Event Timeline

Krinkle created this task.Dec 4 2017, 11:54 PM
Restricted Application added projects: Commons, Multimedia. · View Herald TranscriptDec 4 2017, 11:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 395157 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] ImagePage: Clean up metadata.js collapsing

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

Ramsey-WMF moved this task from Untriaged to Tracking on the Multimedia board.Dec 5 2017, 1:12 AM

Change 395157 merged by jenkins-bot:
[mediawiki/core@master] ImagePage: Clean up metadata.js collapsing

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

As a way of experimenting with a CSS-only approach to having elements be initially collapsed (in JS mode), let's apply what we know to the collapsible table of metadata on file pages.

This was actually done in rMW6400972eeacf: ImagePage: Make metadata table's initial collapse CSS-only (https://gerrit.wikimedia.org/r/#/c/395158/).

Change 395159 had a related patch set uploaded (by Bartosz Dziewoński; owner: Krinkle):
[mediawiki/core@master] [WIP] ImagePage: Create metadata table collapse button in PHP

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

And I found another pending patch. Not sure if that one is worth completing, though.

We can then take what we know, apply it to mw-collapsible, and possibly swap ImagePage to use that instead.

I tried and I don't think changing this table to use mw-collapsible is practical. Hiding only specific rows of a table is not a use case that mw-collapsible code is optimized for; mostly it deals with hiding one collapsible element. We could extend it, or do some shenanigans with custom togglers, but I think that would end up being worse than the current simple code.

TheDJ added a subscriber: TheDJ.May 8 2018, 3:13 PM

Change 395159 abandoned by Krinkle:
[WIP] ImagePage: Create metadata table collapse button in PHP

Reason:
Unlikely to work on this anytime soon. Interested parties, feel free to checkout and amend locally, then remove the change-Id locally resubmit to Gerrit (aka, forking it)

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