Skip to content

docs(demo): rewrite the Nav page around choosing a pattern - #211

Merged
matthewmr-eqty merged 5 commits into
mainfrom
docs/grd-193-nav-page
Nov 2, 2026
Merged

matthewmr-eqty merged 5 commits into
mainfrom
docs/grd-193-nav-page

Conversation

@matthewmr-eqty

@matthewmr-eqty matthewmr-eqty commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review focus

Stacked on #210: review only the last commit, docs(demo). No release; merging redeploys the docs site.

Need

People and agents building a sidebar need to know when a row drills, expands or switches, and the rules to follow.

Problem

The Nav page stated the drill rule six times and never said when to expand. It had no folders, new-tab links or phone layout, and its rules mixed demo pairs with loose bullets.

Change

  • Opens with "Which One to Use": five rows, each linked to its section.
  • Adds folders, nested folders, a full app sidebar, a docs sidebar built from a tree, the sidebar in a phone Sheet, and new-tab links.
  • Ends with Best Practices, one heading per rule, so a lint error can link to its reason. Rules TypeScript already enforces are cut.
  • The agent skill points at Best Practices.

Rules beside each section were rejected: rules that span parts had no home.

Evidence

image
  • astro check, lint and Prettier pass.
  • Blind evals of the page's Markdown copy with cold agents: the first rewrite was 26% shorter with fewer guesses at equal scores. The final page scored 17 and 18 of 18, with topic guesses down from 13 to 7.

Not covered

Two runs per eval. The latest runners used Sonnet; the earlier runners' model is unknown. Gaps the eval still found: one example mixing router rows, an external row and a badged folder; a rule for a few flat pages; one page per item, such as a members list.

Part of GRD-193 · GRD-81

🤖 Generated with Claude Code

@matthewmr-eqty
matthewmr-eqty added this pull request to stack #213 October 30, 2026 20:12
@matthewmr-eqty
matthewmr-eqty requested review from Shrinks99 and tmccoy14 and removed request for Shrinks99 October 30, 2026 20:18
@matthewmr-eqty
matthewmr-eqty marked this pull request as draft October 30, 2026 20:41
@matthewmr-eqty
matthewmr-eqty marked this pull request as ready for review October 30, 2026 20:53
| --------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------- |
| Go to a page | [A row in a group](#groups) | Dashboard, Indicators | Actions, such as Log out: use a [Dropdown Menu](/components/dropdown-menu) |
| Change to another one of the thing you're in | [`NavSwitcher`](#switcher) | Another project | Filtering a page: use a [Select](/components/select) |
| Go into something with its own pages, where other rows stop mattering | [Drill in](#drill-in) | A policy, an agent's run, an app's Settings pages | A few views of one screen: use [Tabs](/components/tabs) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Go into something with its own pages, where other rows stop mattering | [Drill in](#drill-in) | A policy, an agent's run, an app's Settings pages | A few views of one screen: use [Tabs](/components/tabs) |
| Navigate into a sub-section with its own pages, where other rows in the current section stop mattering | [Drill in](#drill-in) | A policy, an agent's run, an app's Settings pages | A few views of one screen: use [Tabs](/components/tabs) |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken as suggested.


## Best Practices

### Pages, Not Actions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Pages, Not Actions
### Use Nav for Pages, Not Actions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken.

@tmccoy14 tmccoy14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads much better organised around picking a pattern. Two small things.

Base automatically changed from feat/grd-193-nav-expandable to main November 2, 2026 18:58
matthewmr-eqty and others added 5 commits November 2, 2026 13:58
Need: People and agents building a sidebar need to know when a row drills, expands or switches, and the rules to follow.
Problem: The page stated the drill rule six times and never said when to expand instead.
Solution: It opens with a "Which One to Use" table, shows full app, docs and phone sidebars, and ends with Best Practices, one heading per rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: Screen reader users jump between landmarks by name.
Problem: The Nav page showed three panels called "Project: Ben Project" and two rails called "Main".
Solution: The second app sidebar and the Switcher demo name themselves as examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: People and agents reading the Nav page need each rule to say one thing, and a live example of every documented state.
Problem: Review read the switcher sentence as being about the ‹ row, the table's switcher row could describe Tabs, the page told apps to restyle every row, and Retry had no demo.
Solution: Switching keeps the reader on the same page and leaves a policy, as Vercel does; the table speaks of sections; the restyle advice is gone; the Retry demo is back in a fixed-height frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: People building a drill-in sidebar need folders that stay open or closed when the reader drills away and comes back.
Problem: 5.2.0 adds `value` to `NavListExpandable` for this, and the Nav page didn't mention it.
Solution: A Folders in a Drill-in section and a props row say when to set `value` and that it must be unique within its level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: People server-rendering a sidebar need to know what readers see before or without scripts.
Problem: Since 42ccb2f, closed folders show open with JavaScript off, and the page only covered the moment before scripts load.
Solution: The server-rendered rule now says every folder shows open with JavaScript off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewmr-eqty
matthewmr-eqty merged commit a1c1e9d into main Nov 2, 2026
1 check passed
@matthewmr-eqty
matthewmr-eqty deleted the docs/grd-193-nav-page branch November 2, 2026 19:22
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.

3 participants