style: nimbus design polish#31891
Conversation
Review
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
ConventionsChecks PR title, description, and redirect checklist. No convention issues found. Style Guide ReviewNo style-guide issues found. RedirectsNo missing redirect entries found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
There was a problem hiding this comment.
Review: style: nimbus design polish
Summary of Changes
This PR polishes the Nimbus UI with several coordinated changes across 24 files:
- Navigation strategy shift: Replaces Astro
ClientRouterview transitions with native Astro prefetch (prefetchAll: true,defaultStrategy: "hover") across all layouts. Removes alltransition:name="nb-content"attributes and the associated view-transition CSS animations. - Package bump: Updates
nimbus-docs0.1.21 → 0.1.22 and pulls in@shikijs/*4.3.0 → 4.3.1. - Component polish:
CopyPromptButtonnow accepts configurablevariantandsizeprops instead of hardcoded values.DirectoryListing/DirectoryListingItemnow honorexternal_linkfrontmatter for stub pages.ResourcesBySelectoruseshistory.replaceStatefor filter updates (avoids polluting back button) and hides the left filter rail on mobile (hidden md:block).TabBarunderline variant gets updated background colors (bg-muted/50,bg-card,hover:bg-muted).Heroremoves staggered entrance animations;animation.tsis deleted.
- Agent setup page refactor: Simplifies the hero to use
PageHeaderwithCopyPromptButtonandLinkButton, removing the custom two-column layout and embedded<style>block. - TOC performance: Refactors SVG path length calculation in
toc.client.tsby accumulating segment lengths incrementally instead of repeatedly measuring the full path (reduces DOM measurement complexity). - Theme fix: Corrects
AnimatedWorkflowDiagramdark mode selectors from:root[data-theme="dark"]to:root[data-mode="dark"]to match the existing Tailwind custom variant and the rest of the codebase. - Prose styling: Adds
overflow-wrap: normalfor inline code inside table cells. - Sidebar tweak: Adds
pr-1.5to collapsible sidebar group labels.
Issues Flagged
All of the following are non-blocking, but should be addressed either here or in a fast-follow:
1. Stale comments / orphaned listeners after ClientRouter removal
src/nimbus/scripts/table-scroll.client.ts (line 10) and src/nimbus/scripts/mermaid.client.ts (lines 4–5, 302–303) still reference the "view-transitions ClientRouter" in comments and attach listeners to astro:page-load. Without ClientRouter, this event never fires on prefetch navigations. Because Astro prefetch performs full page loads, the scripts re-run anyway, so behavior is correct — but the comments and listeners are misleading. Consider updating or removing them.
2. Dead code: PromptCopyBlock.astro is now orphaned
The component at src/nimbus/components/agent-setup/PromptCopyBlock.astro was replaced by CopyPromptButton in the agent-setup page and is no longer imported anywhere in the Nimbus tree. It can be deleted in this PR or a follow-up.
3. Inconsistent data-theme vs data-mode in other diagram components
AnimatedWorkflowDiagram was correctly migrated to data-mode, but the following files still use data-theme="dark":
src/nimbus/components/cf/R2LocalUploadsDiagram.astrosrc/nimbus/components/cf/AutoconfigDiagram.astrosrc/nimbus/components/ai-gateway/code-examples.astro
If the live theme system uses data-mode (as the Tailwind custom variant and globals.css indicate), those components likely have broken dark-mode styling. Worth auditing separately.
4. Lockfile noise from tarball: fields
The pnpm-lock.yaml diff adds tarball: https://registry.npmjs.org/... annotations to several @cloudflare/workerd-* packages without changing their versions. This appears to be unrelated noise from the lockfile regeneration. Consider reverting those lines to keep the diff focused on the actual dependency changes.
5. PR description understates the change
"Bunch of UI tweaks" is accurate but undersells the architectural shift (view transitions → hover prefetch), the external_link behavior change, and the package bump. A short paragraph covering the major themes would help reviewers and future readers.
Verdict
Changes look correct and well-scoped. The prefetch migration is a sensible simplification, and the external_link + mobile filter fixes are welcome UX improvements. Please consider the cleanup items above.
|
I've completed the review for PR #31891. What I didLabels applied: Review posted as a PR SummaryThis PR is a well-scoped Nimbus UI polish that:
Issues flagged (non-blocking)
No blocking issues were found; the diff is clean and the changes are coherent. |
|
Preview URL: https://6fe8c993.preview.developers.cloudflare.com |
Summary
Bunch of UI tweaks
Screenshots (optional)
Documentation checklist