Last modified: 2011-03-13 18:05:13 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 T12658, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10658 - Add magic word to open article with TOC hidden
Add magic word to open article with TOC hidden
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-22 14:53 UTC by Platonides
Modified: 2011-03-13 18:05 UTC (History)
2 users (show)

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


Attachments

Description Platonides 2007-07-22 14:53:42 UTC
Add a magic word to have the Table of contents hidden by default when opening an article if the user has javascript enabled.

The table of contents should probably move from magic words to a template syntax.
Comment 1 Rob Church 2007-07-22 17:28:21 UTC
Seems superfluous.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-22 21:27:41 UTC
Agree.  If you want this, you could always use JavaScript to do it.  (Moving __TOC__ and friends to standard magic word syntax would be a decent idea, but it's unrelated.)
Comment 3 Platonides 2007-07-22 21:40:39 UTC
I opened this bug after i was asked for this today. I could make some <span id="hidden-toc"></span> and use javascript to toggletoc if such id exists, but felt it was better done upstream. I also looked for a way to perform it by CSS but didn't find one.
Comment 4 Danny B. 2007-07-22 22:07:42 UTC
(In reply to comment #0)
> Add a magic word to have the Table of contents hidden by default when opening
> an article if the user has javascript enabled.

If "hidden" means "not displayed", then __NOTOC__ might fit your needs.

If "hidden" means "collapsed", then it's not good idea. Collapsing of TOC should not depend on editor (= should not be forced by any magic word or whatever) but on reader (could be done via preferences such as "Show TOC collapsed" - which I would actually appreciate).
Comment 5 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-22 22:12:46 UTC
Agree, TOCs should not be collapsed on a per-article basis and this should not be added in the core software.  Having a preference is an idea, however.
Comment 6 Rob Church 2007-07-22 22:17:39 UTC
An idea, but not a great one; preferences are evil. This is something that the user can do with a little bit of custom JavaScript, if desired.
Comment 7 Platonides 2007-07-23 10:22:08 UTC
Yes, it means collapsed.
It wasn't as a reader option, but an editor one, for -i presume- big TOCs. Some kid of preference of 'Autocollapse TOCs with more than X elements may do it too'.
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-23 18:17:27 UTC
(In reply to comment #7)
> It wasn't as a reader option, but an editor one, for -i presume- big TOCs.

Bug 4127 is better suited to fix that.

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


Navigation
Links