NOTE: The code that provides collapsible content currently resides in `mediawiki.page.ready` which also provides functionality for sortable tables which is captured in the sister task T233340
= Problem
On the desktop, [[ https://en.wikipedia.org/wiki/Same-sex_marriage_in_Kentucky | Same-sex marriage in Kentucky ]] (and other US states) looks fine. [[ https://en.wikipedia.org/wiki/Template:Same-sex_unions | 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 [[ https://en.wikipedia.org/wiki/Same-sex_marriage_in_Kentucky#/media/File:Same-sex_marriage_in_Kentucky_by_county,_August_2015.svg | 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:
{F4596023}
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
{F23285304}
- 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.
== Developer notes
https://gerrit.wikimedia.org/r/431662 POC: Enable collapsible elements on Minerva is a proof of concept.