Last modified: 2014-09-13 12:45:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72762, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70762 - [makeCollapsible.js] Provide an option to let the initial state depend on the number of collapsible elements
[makeCollapsible.js] Provide an option to let the initial state depend on the...
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.24rc
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 30352
  Show dependency treegraph
 
Reported: 2014-09-12 09:39 UTC by Michael M.
Modified: 2014-09-13 12:45 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2014-09-12 09:39:14 UTC
Many wikis have some code in their MediaWiki:Common.js to make elements collapsible with an additional feature that jquery.makeCollapsible doesn't have: Whether an element is initially collapsed or not depends on the number of such elements, if there are many either all or all but the first few are collapsed, if there are only a few they are initially uncollapsed. Just three examples:

* [[MediaWiki:Common.js]] (search for autoCollapse)
* [[de:MediaWiki:Common.js]] (search for showDefaultCount)
* http://nethackwiki.com/wiki/MediaWiki:Common.js/showhide.js

It would be nice if jquery.makeCollapsible supported this feature natively. The number how many elements are "few" should be user-configurable, a hidden user option prefixed with "userjs-" is probably enough (can be set permanently via API or just on client side per User:/common.js). I'm not sure whether all elements should be collapsed or just all but the first few (as implemented in en.wikipedia), or perhaps even both (of course I have a personal opinion on that, but as I'm German and like to play nethack I'm a bit biased).
Comment 1 Bartosz Dziewoński 2014-09-13 12:45:56 UTC
This is the 'autocollapse' option from bug 30352.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links