fix: select reference sidebar on direct loads - #1595
Closed
kocaemre wants to merge 1 commit into
Closed
Conversation
|
|
✅ Deploy Preview for solid-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Please refrain from removing the PR template and pasting an LLM-generated response. We prefer to have an inclination that there's a human-reviewer/developer. Once it's been updated we can then review. |
Member
|
Sorry this actually looks like a duplicate of an issue another PR just solved. I'm going to close that because of it. Thank you |
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
/reference/...and localized/fr/reference/...paths.Why
Directly opening reference pages could initialize the sidebar on the Learn tab because the previous
useMatch(() => "*/reference/*?")route pattern did not reliably classify direct reference-page loads. This keeps direct loads and client-side navigation on the same tab-selection logic.Closes #1592.
Test plan
ERR_MODULE_NOT_FOUNDfor the new helper module).pnpm exec tsx --test osmium/src/ui/layout/navigation-tab.test.ts— 3 passedpnpm exec eslint --flag unstable_native_nodejs_ts_config osmium/src/ui/layout/main-navigation.tsx osmium/src/ui/layout/navigation-tab.ts osmium/src/ui/layout/navigation-tab.test.tspnpm run check:typespnpm run build— built successfullypnpm exec prettier --check osmium/src/ui/layout/main-navigation.tsx osmium/src/ui/layout/navigation-tab.ts osmium/src/ui/layout/navigation-tab.test.tsgit diff --checkNote: local commands report the repo's engine warning because this environment has Node v22.22.2 while
package.jsoncurrently requests Node >=24; checks still completed successfully.