Repository navigation
Keep documentation fragment links in the current page. - #36
Merged
WaylandYang merged 3 commits intoOct 15, 2026
Merged
Conversation
Signed-off-by: Maya Kid <29959320+Maya-Kid@users.noreply.github.com>
Signed-off-by: Maya Kid <29959320+Maya-Kid@users.noreply.github.com>
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.
Why
Clicking a documentation reference such as “nested” in Button Group opens a second copy of the page instead of moving to its heading in the current tab. Fragment navigation also needs to work when the same reference is clicked again after scrolling, and malformed URL escapes must not crash the documentation page.
What changes
Resolve fragment links as local router destinations and preserve the current query string, including
?theme=light. Scroll to the heading on every router navigation, including a repeated click to the same fragment, while retaining the heading's existing scroll margin. Decode fragment IDs safely so an invalid percent escape leaves the documentation usable.How it was checked
npm run docs,npm run typecheck, andnpm run buildpass; production was also built with/design/as the base path./design/deployment. Each retains the query string, keeps one tab, and brings the heading into view.#%and incomplete UTF-8), and missing headings were checked. Malformed fragments no longer raise a page error or blank the page./dev/examplesmounts 389 of 389 examples with 0 failed in dark and light themes, with no page errors.Before review
git commit -s)npm run typecheckandnpm run buildpass/dev/examplesreports0 failed