[ Bug report ] Allow linkable headers inside Tabs
Required
What is the issue?
Non-Go (default lang) h4s in the app dev guide aren't linkable.
What is the expected behavior?
Linkable.
Solutions
Two solutions that come to mind are:
- Different pages with different default (SSRed) langs, like
docs.temporal.io/typescript/guidehas TypeScript tab default selected. - Rendering all langs on the page at once, and an onload script that changes lang if the hash isn't currently visible? The page would be pretty large and not sure how complex the script would be.
Related issues
Being able to link to an h3 section with a particular lang preselected. (Would be enabled by Solution 1)
Additional context (optional—the more we know, the faster it goes)
Screenshots:
Linking this issue from Docusaurus. It is related by the fact that we can't link directly to tabbed content.
If this is fixed, we may add the ability to link to h4 nested in another tab.
The app dev guide does support h4s. You just can't have the h4s in the source content - if the source content is going to be tabulated. The reason is because Docusaurus builds all of the h4s from each tab into the toc - which then makes some of the links in the toc unusable depending on the selected tab.
But that feels like a completely separate issue from being able to link to a selected tab - which I think would be a great feature. And it seems like @lorensr is making progress on that one with the framework.
Changed the issue title to Allow linkable headers inside Tabs. h5s are fine, and don't appear in TOC, but they're not linkable—when I open
http://localhost:3000/application-development-guide/?lang=typescript#testh5-1
in branch h4, the browser stays at the top of the screen, unless the heading is in a Go Tab (the first Tab, which is displayed first, before the ?lang=typescript is processed and the tab is changed).
So in order for them to be linkable, I think the selected tab would need to SSRed. That may be implemented upstream as part of https://github.com/facebook/docusaurus/issues/7008