Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Auto-collapse the Wikidata Infobox when browsing Commons on Mobile
Closed, InvalidPublic

Description

A lot of Commons categories now have infoboxes, which is great on desktop, but when you access a category on mobile then you now have to go down several screens before you can see the photos in the category. For example, see https://commons.m.wikimedia.org/w/index.php?title=Category:Lovell_Telescope&mobileaction=toggle_view_mobile .

There was an option on Wikipedias in the past to auto-collapse the infobox, and it would be good to implement that here - but documentation (and live examples?) don't seem to be present at the moment.

Does this need a modification to Mobile.css on Commons, or Template:Wikidata_infobox ?

Event Timeline

Do we wish to collapse or hide it? There is CSS class "nomobile".

Do we wish to collapse or hide it? There is CSS class "nomobile".

Collapsing it would be preferred, but it can be hidden if that's not possible.

Izno subscribed.

Minerva now loads mw.collapsible as of a month ago. What this now requires is something like autocollapse from en.wp, with the class set to something identifiable like wd-infobox (which I'm sure exists) and the minimum to collapse to be 0, which are both afforded for in the current script. It might be done as a templatescript or in mediawiki:mobile.js, but otherwise, the tools are there to do it totally on Commons.

What the current script doesn't do is detect location or screen size, so that's the other thing you need.

oh, this is an old ticket. Nowadays the infobox automatically shrinks when you access it on mobile (most fields are just hidden), so I'm not sure this is still needed. Unless it would be better to autocollapse it to a single line and have the full infobox available on demand?

Up to you. We can probably close it either way given that it's got a current solution, and any further work would be solely on Commons.

Closing per discussion.