Repository navigation
fix: open hidden docs sections for anchor links - #303
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
raviships
marked this pull request as ready for review
October 14, 2026 05:49
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Links to headings inside a collapsed section or an inactive tab did nothing.
OpenTabs). Radix only renders the active tab panel, so headings in the "Manual" tab (#copy-this-component,#install-required-components, …) weren't in the DOM until someone clicked the tab. Their TOC entries on all 10 component pages were dead links.SetupGuide). This already handled hash links with ~60 lines of logic that nothing else could reuse.This PR moves that logic into a shared
useRevealAnchor(containerRef, reveal)hook. A container that hides content calls it with its own "open" function:SetupGuidenow just calls the hook withdetails.open = true.OpenTabstracks the selected tab in state. Inactive panels stay mounted but hidden withdata-[state=inactive]:hidden(the same approach fumadocs uses for itsTabs), and each panel selects itself when an anchor inside it is targeted.Any page that uses these components gets this automatically.
I also tried hiding those headings from the TOC with fumadocs'
[!toc]marker. fumadocs only strips the marker when building the TOC, so it leaked into search results ("Copy this component [!toc]") and changed heading ids to#…-toc.Evidence
Headless Chromium against the docs dev server and again against this PR's Vercel preview (production build), with identical results. In every case the heading was visible and scrolled just below the sticky header (
top: 112):/docs/components/dropzone#copy-this-componenthashchangeinto the inactive tab/docs/quick-start#delete-file/blog/v1-releaseto/docs/quick-start#temporary-filespnpm --filter docs lint, Prettier andtscpass for the changed files. No changeset: this only touches the docs site.Risk and rollback
Door: Two-way. Reverting the commit restores the previous behavior.
Blast radius: Docs site only. Covers the Installation tabs on the 10 component pages and the Quick Start setup guide. Inactive tab panels are now server-rendered (hidden), which adds their HTML to the initial page. Their content was already in the RSC payload.
🤖 Generated with Claude Code