UI improvements of pages nav menu - #426
Open
freekh wants to merge 4 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: b175d65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
Refreshes the NavMenu UI: a redesigned sitemap row with route-aware "New page" forms, validation error badges across nav items and section headers, and supporting data wiring to derive per-row error counts from useAllValidationErrors.
Changes:
- New
NewPageForm(with single/multi/catch-all dynamic segment support) and a top-level "New page" entry inSitemapSection, replacing the inlineAddRouteForm. - New
ErrorBadge+errorAggregationhelpers;useNavMenuDatanow attaches per-rowerrors(own count + first message) derived from validation errors. - Visual overhaul of
SitemapItem/ExplorerItem(monospace, dynamic-segment pills, dropped file/folder icons, val extension stripping) and Storybook fixtures/stories for new flows.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/spa/components/NavMenu/useNavMenuData.ts | Attach per-row validation error summaries to sitemap/explorer items. |
| packages/ui/spa/components/NavMenu/types.ts | Add NavItemErrors; mark ExplorerItem.hasError deprecated. |
| packages/ui/spa/components/NavMenu/SitemapSection.tsx | Section-level error badge; collect routes for new top-level "New page" popover. |
| packages/ui/spa/components/NavMenu/SitemapItem.tsx | Redesign row, render dynamic-segment pill, integrate NewPageForm/ErrorBadge. |
| packages/ui/spa/components/NavMenu/NewPageForm.tsx | New shared form for creating pages, supports multi-route selection. |
| packages/ui/spa/components/NavMenu/ExplorerSection.tsx | Add aggregated error badge to header. |
| packages/ui/spa/components/NavMenu/ExplorerItem.tsx | Redesign row; replace error icon with count badge; strip .val.ts. |
| packages/ui/spa/components/NavMenu/ErrorBadge.tsx | New shared error count badge with tooltip. |
| packages/ui/spa/components/NavMenu/errorAggregation.ts | Recursive total error counting helpers. |
| packages/ui/spa/components/NavMenu/mockData.ts | Add catch-all and multi-segment route fixtures; switch to new error shape. |
| packages/ui/spa/components/NavMenu/stories/SitemapSection.stories.tsx | New stories for catch-all, multi-segment, and validation error cases. |
| packages/ui/spa/components/NavMenu/stories/NewPageForm.stories.tsx | New stories covering the standalone form. |
| packages/ui/spa/components/NavMenu/index.ts | Export new modules. |
| packages/ui/.storybook/preview.js | Wrap stories in TooltipProvider for badge tooltips. |
| .changeset/six-laws-repair.md | Patch changeset note. |
Comment on lines
+19
to
+21
| /** Optional element wrapping the badge inside the tooltip trigger, for | ||
| * cases where the badge sits inside a button row. */ | ||
| asChild?: boolean; |
Comment on lines
+178
to
+186
| function walk(item: SitemapItem, parentPath: string) { | ||
| const displayUrl = | ||
| item.name === "/" || item.name === "" | ||
| ? "/" | ||
| : `${parentPath}/${item.name}`; | ||
|
|
||
| if (item.sourcePath || item.children.length === 0) { | ||
| urls.push(displayUrl); | ||
| } |
| ); | ||
| } | ||
| // Aggregate-only: descendants carry the errors. | ||
| return <span>{count === 1 ? "1 error below" : `${count} errors below`}</span>; |
freekh
force-pushed
the
ui-improv-pages-nav-menu
branch
from
May 19, 2026 19:30
2406d12 to
6ab38fa
Compare
# Conflicts: # packages/ui/spa/components/NavMenu/SitemapItem.tsx
Contributor
Author
|
Some more things we want before this the nav menu updates have been improved enough:
|
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.
No description provided.