Description
In Legacy Vector you can configure how sections and sub-sections display in the table of contents using Template:TOC limit. Currently in Vector 2022 there is no such equivalent for the table of contents.
In T300973 we made it so that top level sections in the table of contents dynamically expand/collapse their sub-sections based on how many total sections & sub-sections are in the article. However this approach does not always yield the best table of contents presentation, particularly for pages that have many sub-sections that are all nested within a single parent section. A clear example is Wikipedia:Closure requests.
To-do
Think about how we could introduce some kind of configurability that allows editors to customize the display of sections and sub-sections in the table of contents (similar to Template:TOC limit). A simple starting point might be a single option that forces all sections in the table of contents to be expanded by default. As an example, the result of this preference being turned on for Wikipedia:Closure requests would be:
This should be possible to be done on a per-page basis e.g. via magic word
Acceptance criteria
- Review and come up with a couple of options on ToC configurability (specifically for introducing a way/magic word to show all sections)
- Talk to the content transform team to understand how this might work and what constraints we have
- Ideally this would only effect modern Vector (and other skins using the new table of contents) and the legacy table of contents would be left unchanged., As part of this spike we should confirm that can be done.
- Summarize findings on this ticket.