Page MenuHomePhabricator

Remove "Show table of contents (for pages with more than 3 headings)" user preference from MediaWiki core
Closed, ResolvedPublic

Description

The "Show table of contents (for pages with more than 3 headings)" user preference should be removed from MediaWiki core.

The table of contents box is auto-inserted, can trivially be hidden or exposed on a per-page basis with MAGICWORDS, includes a sticky [show|hide] link, and can be easily hidden with site-wide CSS as necessary.

The associated user preference simply isn't worth the additional code complexity and user interface clutter.

This should be an easy bug to resolve; marking it with the Bugzilla keyword accordingly.


Version: 1.23.0
Severity: enhancement

Details

Reference
bz52813

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:12 AM
bzimport set Reference to bz52813.

I would like to prepare a patch for this bug. Please assign it to me.

Change 99430 had a related patch set uploaded by 01tonythomas:
Removed "Show table of contents (for pages with more than 3 headings)" from MW user preference

https://gerrit.wikimedia.org/r/99430

Change 99430 merged by jenkins-bot:
Remove preference "Show table of contents (for pages with more ...)"

https://gerrit.wikimedia.org/r/99430

(In reply to comment #3)

This bug seems resolved/fixed to me. A big thank you to Tony and everyone else who worked on this!

@MZMcBride :- Welcome. Was one of the first bugs for me.

(In reply to comment #4)

(In reply to comment #3)

This bug seems resolved/fixed to me. A big thank you to Tony and everyone
else
who worked on this!

Yep. I just hope I will not see mass additions of NOTOC by the toc-haters party (my arch-enemy).

Wouldn't it be better to remove the “for pages with more than 3 headings” part rather than the actual preference?
    I like the tables of contents and I think that they should not be omitted from pages with few sections, especially if they're not even a stub and are quite lengthy. It's actually very annoying to have to manually type out the section anchor in the URL bar on articles with less than 4 sections.
    The presence of tables of contents may be annoying to some. If so, then there should still be an option to omit or hide them. However, if the number of people this would bother is few, then the option may be better implemented as a client-side solution, maybe with a browser addon. It is considerably easier to implement an addon that finds and removes the table of contents element than to create an addon that generates and inserts such an element.
    Btw., this isn't a ‘bug’ and removing a preference isn't a ‘fix’. In essence of libre software, if you really need to remove a preference, in general, for whatever reason, then please make sure that there remains a client-side libre software solution to replace it for whoever is still using this preference. This is important due to it being nontrivial to fork Wikipedia, which means that the software liberty is damaged by removing preferences.

James.

It's actually very annoying to have to manually type out the section anchor in the URL bar on articles with less than 4 sections.

I agree! That will soon be helped by T18691 I hope.

Relatedly to JamesHaigh’s comment, it can be hidden the TOCs with a CSS rule, either for the whole site or per-user, see https://www.mediawiki.org/wiki/Manual:FAQ#How_can_I_hide_the_table_of_contents.3F