-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFR: Only show its own tab's TOC when there are headings in tabs #1191
Comments
This is an interesting question! I kinda think that headings inside tabs shouldn't be part of the ToC at all. Because the structure of a MD document should be static, and shaped like a tree. |
From a practical perspective or scenario, IMO, I like the way only shows the current tabs anchor. |
I believe this is a useful feature to have. Mainly because sometimes you want to abstract away certain parts of a MD document and only show what is necessary for the tab the reader is interested in. An example of how we use this is here: https://taiko.xyz/docs/guides/deploy-a-contract. The alternative is separate markdown documents or a longer one which "leaks" the abstraction a bit to the reader. So just leaving my vote here for this feature! |
since these headings are in tabs which inside dynamic component we need to hide them |
I understand the reasoning behind hiding them as it was a bug but I do think having the option to show the correct headers for the selected Tab, like how Atlassian does it would also be a nice alternative. |
Atlassian has a different approach, each tab is a page with generated tocs, in nextra tabs are components inside page In Atlassian when you click on tab pathname changes accordingly |
Ah I see, thanks for the clarification! |
Request
If we can show the anchors owned by each tab only, I think it would be more make sense.
or, keep the current design - show all tabs anchors together but need support switch tab automatically while clicking the anchors which do not belong current tab.
Reproduce
eg. I have 3 tabs with their own anchors, if I click the anchor, not in the current tab nothing happened, it's confusing.
Using version
The text was updated successfully, but these errors were encountered: