Skip to content

docs: add TOC minimap + mobile nav and heading anchors - #21

Closed
phh235 wants to merge 1 commit into
DavidHDev:mainfrom
phh235:feat/docs-navigation
Closed

docs: add TOC minimap + mobile nav and heading anchors#21
phh235 wants to merge 1 commit into
DavidHDev:mainfrom
phh235:feat/docs-navigation

Conversation

@phh235

@phh235 phh235 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a TOC minimap (desktop hover card) and mobile accordion for on-page section navigation across all component doc pages. The TOC is lifted out of component-doc into the shell layout with position: fixed, so demo wrappers like ClothDemo no longer squeeze or affect its positioning. Introduces a TOCContext to share TOC items from the server-side component-doc to the client-side layout components without prop drilling.

Also adds a reusable HeadingAnchor component for scrollable heading links, a demoSection prop for including "Demo" in the TOC, and fixes the hover card's positionMethod to "fixed" to prevent floating-UI repositioning during programmatic smooth scroll.

Additionally, updates the previous/next navigation button layout to improve visual balance and consistency with the new documentation navigation experience.

Demo

2026-07-26.21-50-58.mp4

Updated navigation buttons

Updated previous/next navigation button layout

Type of change

  • Docs / site

Checklist

  • npx tsc --noEmit passes
  • npm run lint passes
  • npm run build passes
  • Tested in Chrome (with the html-in-canvas flag, if relevant)
  • Tested the WebGL overlay fallback (flag off / Safari / Firefox), if a component changed

@DavidHDev

Copy link
Copy Markdown
Owner

I'm sorry but I'm not a big fan of this kind of docs feature, I think it only adds complexity to a perfectly simple page, which isn't really needed, because there's not that much to scroll.

Please open issues before implementing such design choices, I don't want to waste your time.

@DavidHDev DavidHDev closed this Jul 26, 2026
@phh235

phh235 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

I'm sorry but I'm not a big fan of this kind of docs feature, I think it only adds complexity to a perfectly simple page, which isn't really needed, because there's not that much to scroll.

Please open issues before implementing such design choices, I don't want to waste your time.

I got it sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants