fix(docs): fix timeseries page TOC and loading state hydration#549
Conversation
- Promote headings from h3 to h2 so the TableOfContents component picks them up (it groups h3s under h2s and drops orphaned h3s) - Use client:only="react" for LoadingChartDemo to avoid hydration mismatch caused by useIsDarkMode returning different values on server vs client
| <p> | ||
| Use the <code>tooltipBoundary</code> prop to constrain the tooltip to a | ||
| specific container element. By default the tooltip avoids overflowing any | ||
| clipping ancestor (scroll containers, viewports). Pass a DOM element to |
There was a problem hiding this comment.
This example wasn't rendering at all
commit: |
Docs PreviewCommit: |
|
/bonk review please |
|
Two small fixes, both correctly identified and cleanly applied:
No issues found. Approved. |
|
/bonk also approve the PR |
There was a problem hiding this comment.
Two clean fixes, both correctly diagnosed:
-
TOC fix: Promoting headings from
###→##resolves the empty TOC. The docs site'sTableOfContentscomponent groupsh3s underh2parents and silently drops orphanedh3s, so every section now appears in the TOC. -
Hydration fix:
LoadingChartDemousesuseIsDarkMode()which reads DOM state. During SSR it defaults to light mode, causing a mismatch when the client hydrates in dark mode. Switching fromclient:visibletoclient:only="react"skips SSR for this demo, eliminating the mismatch. This is the right trade-off for a demo that depends on runtime DOM state.
No issues found.
|
/bonk review posted and approved PR #549. Review summary:
No issues found — approved. |





































































Fixes two issues on the timeseries chart docs page:
Empty Table of Contents
All section headings were
###(h3) with no##(h2) parents. TheTableOfContentscomponent groups h3s under h2s and silently drops orphaned h3s, so the TOC rendered empty. Promoted all headings to h2.Broken loading state demo
The
LoadingChartDemousesuseIsDarkMode()which reads from the DOM. During SSR, it defaults to light mode and renders the wave SVG with a dark stroke color. On client hydration in dark mode, React detects the attribute mismatch and refuses to patch it — resulting in an invisible wave (black stroke on dark background). Switched toclient:only="react"to skip SSR entirely.