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
Infoboxes
On desktop, if an article has multiple infoboxes, we collapse each subsequent infobox after the first:
We don't do this on mobile and it takes up a lot of space
https://en.m.wikipedia.org/wiki/California
Plan
MinervaNeue should
- Load mediawiki.page.ready /Users/jrobson/git/core/resources/src/mediawiki/page/ready.js
- Provide styling (see Design) for collapsing as a skinStyle for the jquery.makeCollapsible module
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, 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
Developer notes
https://gerrit.wikimedia.org/r/431662 POC: Enable collapsible elements on Minerva is a proof of concept.