Page MenuHomePhabricator

Auto expand active section of TOC, and collapse it when out of view
Closed, DeclinedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

TOC sections should get expanded automatically when they are active, and get collapsed when out of view (user navigate to another top level section).

Benefits (why should this be implemented?):

Users could navigate within the current active section quicker, with fewer clicks.

Event Timeline

Max.loh0424 renamed this task from Auto expand active session of TOC and collapse it when out of view to Auto expand active session of TOC, and collapse it when out of view.May 8 2022, 3:24 PM
Max.loh0424 updated the task description. (Show Details)
Max.loh0424 updated the task description. (Show Details)
Aklapper renamed this task from Auto expand active session of TOC, and collapse it when out of view to Auto expand active section of TOC, and collapse it when out of view.May 9 2022, 7:17 AM
Aklapper updated the task description. (Show Details)

Users could navigate within the current active section quicker, with fewer clicks.

I don't understand what this has to do with clicks at all, isn't this about scrolling? It could be helpful if you shared which steps you currently perform, step by step, as a list.

I don't think this is a good idea by default. I can imagine that anyone is free to write some user script or gadget if they want to implement this and maintain this.

This comment was removed by Max.loh0424.

Let's say am reading the Ukraine article on Wikipedia. When I scroll to the "History" section, the history section of TOC should get auto expanded. So that,

  • I would know what are the subsections of "History" and find the subsection I am looking for.
  • I could navigate to subsections more quickly, without manually expanding the "History" section.

I think while reading an article, users will be more likely to navigate within the current section than other top level sections. Furthermore, the title of subsections could serve as a quick summary of the current section and helps users' understanding.

Docusaurus have implemented something like this feature too.

ovasileva subscribed.

@Max.loh0424 - this is something we considered in the early version of the feature. However, after collecting feedback on a prototype (select the settings icon and "expand section when I scroll to it") that allowed this behavior, we noted that a large number of users were distracted by the constant movement within the ToC this feature added (https://www.mediawiki.org/wiki/Reading/Web/Desktop_Improvements/Third_prototype_testing/Feedback). Thus, we settled on the current solution - if the ToC is fairly short, we display all sections and sub-sections directly (ex: https://en.wikipedia.org/wiki/Dispute_between_Darnhall_and_Vale_Royal_Abbey), but if it's longer, we keep the sections collapsed by default (ex: https://en.wikipedia.org/wiki/Moon). Declining this task for now, but we can keep the conversation going. Let me know if you have any questions/concerns/thoughts?

@ovasileva I think the main problem is not about expanding/collapsing sections, but lack of transition animations. It would be a lot better if the table of content expand/collapse smoothly instead of shifting immediately/flickering, like how panels do in material design. Layout shifting is a common problem in web user interface design, that can be solved by animations.

Also, it would be better if you have the feature optional (like keeping the setting button in the prototype) instead of removing it as there would be a common assumption/request that table of contents should be auto expanded. That is how table of contents work on other websites.

@ovasileva I think the main problem is not about expanding/collapsing sections, but lack of transition animations. It would be a lot better if the table of content expand/collapse smoothly instead of shifting immediately/flickering.

To clarify, are you suggesting that the automatic expanding/collapsing of sections would not be distracting if there was a smooth animation? Or are you making a separate suggestion that we should use animations in the table of contents? I think even if the automatic expanding/collapsing was animated it would still be distracting for many people. In cases where you want to view the sub-sections it is of course a very nice feature, however I we don't yet know enough about people's reading behavior and expectations to make that assumption.

Also, it would be better if you have the feature optional (like keeping the setting button in the prototype) instead of removing it as there would be a common assumption/request that table of contents should be auto expanded. That is how table of contents work on other websites.

I think that we should spend time learning about how people use the table of contents, and if we can clearly identify the need for such settings then we should consider adding them. As a first step it would be great if you, or someone else, could add this functionality into a gadget so we can see if and how people use it.