Reading/Web/Desktop Improvements/Features/Table of contents

A main goal of the Desktop Improvements project, is to make frequently used tools more accessible to readers and editors. One of the most crucial of these tools is the table of contents, which is responsible for providing both contextual insight and navigation. Currently, the table of contents is only available at the top of the page, limiting its usefulness. We plan to make the table of contents a persistent element, available throughout the page. Our goal is to make it easier for readers and editors to reach the table of contents, gain context, and navigate throughout the article without needing to scroll all the way to the top of the page.

Background and Goals
A big focus of the Desktop Improvements project is to make our workflows and navigation clearer and easier to use. This has so far included  work on a collapsible sidebar, introducing a sticky header, and now, our current focus - a new table of contents (ToC). Currently:


 * The current ToC is available only at the top of the page.  This makes it difficult to regain context and navigate within the article without having to scroll all the way up
 * For pages with a long lead/intro section, the ToC is not visible until you scroll down a bit
 * Users use the ToC to create a mental model of the article.  This becomes lost without the ability to reference it more frequently
 * The ToC creates a lot of unused space on the page that could be used for displaying article content and other functionality

The new, persistent table of contents will make it easier for readers to understand the context of the article, and to navigate to different parts of the article throughout their reading experience, without having to scroll all the way back to the top of the page every time they want to access the table of contents.

Use Cases

 * As a reader or editor, I want the ability to gain context (content and structure) about the article I am about to read
 * As a reader or editor, I want the ability to reference the next few sections in the article at any location in the page so that I can choose what to read next
 * As a reader or editor, I want the ability know how many sections an article has without having to scroll all the way up a page

Feature description and requirements
The table of contents will appear persistently on one side of the page. This table of contents will contain all sections and sub-sections available in previous versions of the ToC.

The ToC will contain the following functionality:


 * Collapsible sub-sections - for users that only want to view the highest level of section heading
 * Section bolding - the section currently on the page will be displayed as bold. Users will be able to identify where on the page they are currently located by noting the bolding within the ToC
 * Navigation - selecting a section within the Table of Contents will navigate to the appropriate section within the page
 * For screen widths smaller than 1000px, the ToC will collapse and the section titles will be used as a ToC

Prototype
General ToC functionality: https://en-toc.wmcloud.org/wiki/Moon

Collapsible section functionality: https://di-toc-collapsible-sections.web.app/Aretha_Franklin