Page MenuHomePhabricator

jQuery.makeCollapsible.js should support 'autocollapse', 'innercollapse' and 'outercollapse' options
Closed, DeclinedPublic

Description

The mw:RL/DM#jQuery.makeCollapsible plugin available since MediaWiki 1.18 is supposed to be used as a replacement for the old NavFrame and Collapsible tables which is still to be copied from one MediaWiki:Common.js to other all over Wikimedia wikis, being frequently outdated on small projects. Nonetheless, it (apparently) still doesn't support the autocollapse, innercollapse and outercollapse options which are available on the current scripts (see Help:Collapsing). And we want T71550: Move code in enwiki MediaWiki:Common.js and Gadgets to MediaWiki software, not to duplicate code for the same functionality and send both versions for the visitors by default.

These options are essential in order to update the existing templates, such as Template:Navbox, Template:Americanfootballbox, pt:Template:Bloco de navegação, etc, so that we can get rid of the deprecated code (and not send three versions of the code - NavFrame, Collapsible tables and makeCollapsible - for all readers of the wikis).

See also

Details

Reference
bz30352

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:50 PM
bzimport set Reference to bz30352.
bzimport added a subscriber: Unknown Object (MLST).

happy.melon.wiki wrote:

I don't think this should block 1.18 deployment, although it should probably block the tarball. It's not a regression to not provide the entirety of the required replacement :D these features can probably be implemented with just a few lines of JS in Common.js; for sure that's not ideal and should not be a permanent feature, but it's also not going to make the wiki fall over and die to have to keep some JS in play for a while longer. Migrating everything to use "mw-collapsible" rather than just "collapsible" is going to take months, anyway.

Aside from Happy-melon's comment, I'd like to note that it's not a regression or a lacking feature compared to a deprecated or legacy feature.

There has been no previous collapsing script in MediaWiki core, this is the first. There have been many in extensions and dozens of implementations on wikis's site scripts and gadgets. But one can't expect the core plugin to do everything exactly like and featuring every option all other implementations have come up with.

Removing milestone blocker

He7d3r added a project: Performance Issue.
He7d3r set Security to None.

I left a comment at T72762#2050894 regarding autocollapse.

I see the use case for inner/outercollapse, per the Help page linked in the original ticket but am not sure I've seen its use in the wild (even though an insource search on en.wp clearly indicates that people think they're using it).

I think this should be declined, and the wikis that require it should use the snippet from T72762#2184045 to extend the capabilities of collapsible boxes. This really feels like a very niche feature and an annoyance to support together with all the options that jquery.makeCollapsible already has.