Page MenuHomePhabricator

Integrate closable/openable content sections in Refreshed skin
Closed, DeclinedPublic

Description

pasted_file (768×1 px, 184 KB)

pasted_file (768×1 px, 197 KB)

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?

Event Timeline

Seems like a sane idea to me.

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

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.

This sounds like a good GCI task.

Aklapper subscribed.

This sounds like a good GCI task.

Would anyone mentor this task in GCI? If so, please register as a mentor. Thanks!

@MacFan4000: Removing Google-Code-in-2017 tag for the time being as nobody has offered mentorship so far.
If this is an good first task task (I cannot judge) then please check the requirements and improve the task description via Edit Task. Thanks!

I'm marking this as declined. A new major release (which also doesn't have collapsible sections) has come out since this issue was first made, and since then I haven't heard requests for collapsible sections. If anyone is still interested in this, please resubmit as a new issue.