fix(sidebar): SW-2097 keep collapsed SidebarSeparator within the rail #154
Open
boramyi-ts wants to merge 1 commit into
Open
fix(sidebar): SW-2097 keep collapsed SidebarSeparator within the rail #154boramyi-ts wants to merge 1 commit into
boramyi-ts wants to merge 1 commit into
Conversation
`SidebarSeparator` tried to override the base `Separator`'s `data-horizontal:w-full` with a plain `w-auto`. tailwind-merge keys those under different variants, so both survived and `w-full` won — the divider rendered at full rail width *plus* its `mx-2` margins, spilling ~8px past the right edge. Most visible in the collapsed icon rail, where the line crossed the rail border into the content area. Override on the matching variant (`data-horizontal:w-auto`) so it dedupes against `data-horizontal:w-full`. `width: auto` then subtracts the `mx-2` margins, leaving the separator inset and centered under the icon column. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
GracePan-Tetra
approved these changes
Jun 24, 2026
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.
Sidebarprimitive — collapsed separator overflows the railIn the
ui/sidebar.tsxshadcn primitive,SidebarSeparatoroverrode the baseSeparator'sdata-horizontal:w-fullwith a plainw-auto. tailwind-merge keys those under different variants, so both classes survived anddata-horizontal:w-fullwon — the divider rendered at full rail width plus itsmx-2margins, spilling ~8px past the right edge. In the collapsed icon rail (Components/Sidebar → CollapsedIcon) the line visibly crossed the rail border into the content area and no longer aligned under the icon column.Measured (collapsed, 47px rail): separator was
x: 8 → 55(width 47, +8px past the rail's right edge of 47).Fix
Override on the matching variant so tailwind-merge dedupes it:
width: auto(unlikew-full) subtracts themx-2margins, so the line sits inset and centered. After: separator isx: 8 → 39(width 31), centered in the rail under the icon column. This also corrects the (less obvious) slight overflow in the expanded sidebar.Before / After (collapsed rail, zoomed)
In before the line crosses the rail's right border into the content area; in after it's inset within the rail, aligned under the icons.
Verification
yarn lint— clean (zero warnings)yarn typecheck— cleanyarn test:storybook sidebar— 15/15 passNote
Sibling to #153 (SW-2097), which fixes the analogous full-width-divider issue in the
DataAppShellcomposed component. This PR targets the shadcnSidebarprimitive specifically.🤖 Generated with Claude Code