Background
On desktop, if an article has multiple infoboxes, we collapse each subsequent infobox after the first:
We didn't do this on mobile and it takes up a lot of space
https://en.m.wikipedia.org/wiki/California
Recently the English Wikipedia added a gadget that undid the mobile behaviour making the behaviour inconsistent across all Wikipedias.
User story
AS a reader I want a consistent experience across wikis for collapsible content.
Developer notes
Problem
On the desktop, Same-sex marriage in Kentucky (and other US states) looks fine. Template:Same-sex unions runs down the right-hand side of the page, taking only about one-third of the width available for text (on my laptop at a size comfortable for my old eyes), and only its first section, Marriage, is expanded; the other three, Civil unions and registered partnerships, Unregistered cohabitation, and See also, are initially collapsed, with a "[Show]" button.
On my smartphone,* though, the template comes up fully expanded at almost the very top of the page, with only the title and the lead graphic above it. I have to scroll five full screens to reach the first line of text. Need I say how awkward this is? especially with the risk of tapping a link as I tap-scroll down.
* Samsung Verizon Android Galaxy S-3, model SCH-I535, OS v4.4.2
https://gerrit.wikimedia.org/r/431662 POC: Enable collapsible elements on Minerva is a proof of concept.
Design
- bg color remains the same #f8f9fa
- icon is a small version of mw-ui-icon-mf-arrow (same as toggle) but in blue color. (see related T198770)
- "Show more" button is 14px, blue, normal weight. Note, that the text of the button comes from editors so don't worry about the copy text here. We cannot change it.
Acceptance criteria
- Update SkinMinerva::getDefaultModules to include jquery.makeCollapsible when requested - see https://gerrit.wikimedia.org/r/431662 POC: Enable collapsible elements on Minerva is a proof of concept.)
- Add new styles for Minerva, per design, ensuring they do not cause FOUC when loaded and collapsed elements begin collapsed.
- This is used in various ways by editors (see T199924: Hidden images in vector arwiki display in Minerva) some community outreach/testing as part of deployment would be advisable.
- Enable the config option inside the PageReady hook
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
This task was created by Version 1.0.0 of the Web team task template using phabulous