Skip to content

fix: select reference sidebar on direct loads - #1595

Closed
kocaemre wants to merge 1 commit into
solidjs:mainfrom
kocaemre:fix/reference-sidebar-default
Closed

fix: select reference sidebar on direct loads#1595
kocaemre wants to merge 1 commit into
solidjs:mainfrom
kocaemre:fix/reference-sidebar-default

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • Select the Reference sidebar tab from the current pathname on direct page loads.
  • Reuse the same pathname classification for route transitions.
  • Add regression coverage for direct /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

  • Added regression test and confirmed RED failure before implementation (ERR_MODULE_NOT_FOUND for the new helper module).
  • pnpm exec tsx --test osmium/src/ui/layout/navigation-tab.test.ts — 3 passed
  • pnpm 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.ts
  • pnpm run check:types
  • pnpm run build — built successfully
  • pnpm exec prettier --check osmium/src/ui/layout/main-navigation.tsx osmium/src/ui/layout/navigation-tab.ts osmium/src/ui/layout/navigation-tab.test.ts
  • git diff --check

Note: local commands report the repo's engine warning because this environment has Node v22.22.2 while package.json currently requests Node >=24; checks still completed successfully.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit 6723e21
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs/deploys/6a664d3ee510f10008d19822
😎 Deploy Preview https://deploy-preview-1595--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@LadyBluenotes

Copy link
Copy Markdown
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.

@LadyBluenotes

Copy link
Copy Markdown
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

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.

[Bug]: Sidebar defaults to "Learn" when opening Reference pages

2 participants