Skip to content

Docs nav alternate: land on section pages and route "All" to the home page#4074

Draft
twjeffery wants to merge 2 commits into
devfrom
claude/kind-fermi-8xiokn
Draft

Docs nav alternate: land on section pages and route "All" to the home page#4074
twjeffery wants to merge 2 commits into
devfrom
claude/kind-fermi-8xiokn

Conversation

@twjeffery

@twjeffery twjeffery commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is an alternate version of the docs side navigation, put up for comparison against current production. Use this PR's preview link as "version B" and production as "version A". It is not necessarily meant to be merged as is.

It addresses a mismatch between how the side menu looks and how it behaves: the top sections look clickable but only expand an in menu view, and the "All" item looks like a back/navigation control but only collapses the menu.

What changes

1. Sections navigate to their page

Clicking a top level section now lands on that section's index page instead of only swapping the in menu view:

  • Components goes to /components (All Components)
  • Get started goes to /get-started
  • Foundations goes to /foundations

The destination page still shows the matching submenu (it is derived from the URL). Tokens and Examples are unchanged.

2. "All" goes back to the home page

The "All" item at the top of each submenu now navigates to the home page instead of silently collapsing back to the parent menu. The home page's hero search field is front and center, so search stays emphasized without anything popping open.

How it works

  • Section items are plain links. The destination page's SiteNav derives which submenu to show from the URL, so no in menu click state is needed.
  • "All" navigates to the home page (/). The shared "All" item is extracted into AllHomeItem, and the now unused in menu state handlers (onSelectSection, onBack) were removed.

Before / After

Before: Components, Get started, and Foundations expand a secondary in menu view without navigating. "All" (arrow back icon) collapses the submenu with no page change.

After: those sections navigate to their index page. "All" navigates back to the home page.

Compare the preview link against production for the visual before/after.

Steps to test

  1. Open the preview link.
  2. From the home page, click Components in the side menu. You should land on All Components with the Components submenu shown.
  3. Repeat for Get started and Foundations.
  4. In any submenu, click "All" (the arrow back item at the top). You should land on the home page, with the hero search field front and center. No modal should pop open.
  5. Confirm Tokens and Examples still navigate as before.
  6. On mobile width, open the menu with the hamburger, click a section, confirm it navigates, then click "All" and confirm it returns home.

Notes

  • Draft on purpose. This is an A vs B comparison, not a request to merge. The session opener will verify the diff and decide whether to mark it ready.
  • An earlier revision auto opened the global search modal on "All". That was removed as too intrusive: "All" now just returns home, where search is already prominent.
  • No issue number attached (exploratory navigation change).
  • Type checked with astro check. The changed files introduce no new type errors. Remaining check errors are pre existing artifacts of the unbuilt web components dist, on lines not touched here.

🤖 Generated with Claude Code
https://claude.ai/code/session_014KqafCHdPSm7GsgVWwAVHN

…l search

Make the docs side nav behave like navigation rather than an in-menu
expander.

- Clicking a top level section (Components, Get started, Foundations) now
  lands on that section's index page instead of only swapping the in-menu
  view. The destination page derives and shows the matching submenu from
  the URL.
- A submenu's "All" item now navigates to the home page and auto-opens
  global search, reinforcing search as a primary way to navigate, instead
  of silently collapsing back to the parent menu.

Auto-open is driven by an openSearch=1 marker that SearchModal checks on
mount and then strips from the URL. The shared "All" item is extracted
into AllHomeItem, and the now unused in-menu state handlers
(onSelectSection, onBack) are removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KqafCHdPSm7GsgVWwAVHN
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://GovAlta.github.io/ui-components/pr-preview-angular/pr-4074/

Built to branch gh-pages at 2026-06-18 06:52 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Preview links

Target URL
Docs https://govalta.github.io/ui-components/pr-preview/pr-4074/
React playground https://govalta.github.io/ui-components/pr-preview-react/pr-4074/
Angular playground https://govalta.github.io/ui-components/pr-preview-angular/pr-4074/

Built from commit 0c2d294. Previews are removed automatically when this PR closes.

Auto-opening the global search modal when clicking "All" felt intrusive,
like it opened something the user did not intend. "All" now simply
navigates to the home page, where the hero search field is already front
and center, keeping search emphasized without forcing the modal open.

Removes the openSearch marker, the SearchModal mount-time auto-open
effect, and the now unused search-utils helpers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KqafCHdPSm7GsgVWwAVHN
@twjeffery twjeffery changed the title Docs nav alternate: land on section pages and route "All" to home + global search Docs nav alternate: land on section pages and route "All" to the home page Jun 18, 2026
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.

2 participants