Integrate closable/openable content sections in Refreshed skin
Open, Needs TriagePublic

Description


On MediaWiki, it has a mobile site located at m.mediawiki.org designed for mobile specifically (obviously).

I suggest this could be implemented into Refreshed also for mobile as it's a pain to keep scrolling on and on forever on some of the longest articles ever (take http://en.brickimedia.org/wiki/Batman for example). They would(or at least should IMO) be closed by default (they are if you visit a page on m.mediawiki.org on an actual mobile device e.g iPhone, Android), otherwise having them opened by default would ruin the purpose.

Perhaps for desktops too?

Restricted Application added a subscriber: LegoFan4000. · View Herald TranscriptAug 21 2016, 10:15 AM
SamanthaNguyen moved this task from Backlog to Refreshed on the Brickimedia board.
ashley added a subscriber: ashley.Aug 21 2016, 1:25 PM

Seems like a sane idea to me.

The mobile site and this feature are provided by the MobileFrontend extension (AFAIK).

MtMNC added a subscriber: MtMNC.Sep 3 2016, 5:05 AM

Currently Refreshed just runs a hook to pull all the page content, no? This would require a fair bit more processing than is done currently, since the skin would have to wrap the content under each h2 in some kind of container element. MobileFrontend might provide some clues on how to do it. That said, Minerva (the MobileFrontend skin) is built very differently than Refreshed--lots of disparate PHP and Mustache files. It'd require some digging through the skin files to figure out where the sectioning is done.

Nope. The sectioning is done here:
https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/includes/MobileFormatter.php#L541 That looks complicated.

I wrote Extension:HideSection fairly recently, but ParserSectionCreate hook does a lot of the heavy lifting -- not sure how useful that is in skins. Mediawiki just preg_split()s on <h*> tags, and passes that to the hook, which is kind of hilarious. Anyway, if you want to use anything from my extension, I'd be fine with granting a GPL2 license on my code.