Open vmizgiris-equinix opened 1 year ago
Hi,id like to help out as this would be a great starting point,though im facing issues while setting up this in local to reproduce the issue, im trying to troubleshoot that,Thank you
Hi,id like to help out as this would be a great starting point,though im facing issues while setting up this in local to reproduce the issue, im trying to troubleshoot that,Thank you
Hey, how are you doing? Any upd so far?
Yeah, sorry for the delay will give an update this weekend itself
@Ihor-Lavrov Please correct me if I am wrong, what i understood is the problem is that only subheadings from the first H2 group are getting highlighted in the TOC as you scroll through the page, right?
To fix this issue, i guess we need to ensure that each subheading (H3) has a unique anchor link assigned to it, even if they have the same name under different H2 headings. One way to achieve this is by appending some unique identifier (e.g., a slug or numerical value) to the anchor link of each subheading.
Hope this might help. Happy to contribute!
@vmizgiris-equinix Could you provide more info to reproduce the bug? I tried to run the example on this folder /toc, and the toc is scrolled correctly I can't enable the table of content for mdx stories to test, could you advice? Thanks 🙇
I managed to test the toc against the given markdown, the reported issue can not be reproduced as I still can see the highlighting works as expected like in the video Though I can see the issue where the TOC is too long and can not be scrolled, as reported here https://github.com/storybookjs/storybook/issues/23542
Describe the bug
When there are subheadings (H3) with the same name under different headings (H2), the highlighting becomes broken, and only subheadings from the first H2 group get highlighted in the TOC as you scroll through the page.
To Reproduce
System
Additional context
No response