feat: SW-2053 add collapsible nav rail (showNavRail) to Data App Shell#137
feat: SW-2053 add collapsible nav rail (showNavRail) to Data App Shell#137GracePan-Tetra wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace the demo breadcrumb trail with generic placeholder labels (All Projects / Project Name / worksession name). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a `navRailHidden` prop to DataAppShell. When true, the desktop icon nav rail is not rendered, so collapsing the sidebar panel can hide both the rail and the panel, giving the content full width. Wired in the Default story to the panel's collapsed state, with a play-test asserting the rail is hidden when collapsed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ca66967 to
dac22ff
Compare
15afa45 to
20f19ab
Compare
owilliams-tetrascience
left a comment
There was a problem hiding this comment.
Functionally this works and it's backward-compatible 👍 — one naming change before merge.
Rename navRailHidden → showNavRail (default true).
Everywhere else in the kit, visibility toggles are written in the positive: showLegend, showCloseButton, showLineNumbers, etc. There's no *Hidden prop anywhere, so this one stands out.
It also reads cleaner at the call site — showNavRail={!collapsed} ("show the rail when not collapsed") instead of the double-negative navRailHidden={collapsed} / navRailHidden = false.
/** Show the desktop icon nav rail. Set false to reclaim width when the panel is collapsed. */
showNavRail?: boolean; // default true{showNavRail && <IconRailSidebar {...sidebarProps} />}Since the prop is brand-new and unreleased, the rename is free now and would be a breaking change later. Behavior stays identical.
…true)
Adopt the kit's positive-visibility convention (showLegend, showCloseButton)
and avoid a double-negative at the call site: showNavRail={!collapsed}.
Prop is new/unreleased, so the rename is non-breaking. Behavior unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@owilliams-tetrascience done in 9728b25 — renamed Checks: @GracePan-Tetra heads up — pushed this rename straight to your branch. |
There was a problem hiding this comment.
Pull request overview
Adds an opt-in control to the DataAppShell composed component to hide the desktop icon nav rail when the workflow panel is collapsed, allowing the main content area to reclaim full width. This change fits into the library’s “composed” shell layout components by making the shell’s navigation chrome configurable for data-dense layouts.
Changes:
- Introduces a new
DataAppShellprop to conditionally render the desktop icon nav rail. - Wires the new prop into the default “workflow” story so the rail hides when the workflow panel is collapsed.
- Extends the
CollapsedWorkflowplay test to assert the icon rail is not present when collapsed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/components/composed/DataAppShell/DataAppShell.tsx | Adds a new prop and render guard around the desktop icon rail. |
| src/components/composed/DataAppShell/DataAppShell.stories.tsx | Updates the default shell story to drive the new prop from the collapsed state and adds a play assertion for the hidden rail. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
An automated "Potential fix" commit partially reverted the rename: it restored `navRailHidden` in the prop interface and render guard but left the destructured param as `showNavRail`, so the guard referenced an unbound `navRailHidden` → "navRailHidden is not defined" at render, crashing the Data App Shell docs/stories and the build. Re-apply the rename consistently across all four sites (interface, destructured default, render guard, story call site). Behavior unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
What
Adds a
showNavRail?: booleanprop toDataAppShell. Whenfalse, the desktop icon nav rail is not rendered.This lets a consumer collapse the sidebar so that both the workflow panel and the app nav rail hide, giving the content area full width — instead of leaving the rail behind.
API
Default
true— fully backward compatible.Scope
DataAppShell.tsx: new prop + render guard onIconRailSidebar.DataAppShell.stories.tsx: wire to the Default story's collapsed state + play-test asserting the rail is hidden when collapsed.Behavior
Checks
yarn lint✅yarn typecheck✅yarn test:storybook✅ (13/13)🤖 Generated with Claude Code