fix(layout-v2): settle the panel on open, and ship the rail compact by default - #6497
fix(layout-v2): settle the panel on open, and ship the rail compact by default#6497tsahimatsliah wants to merge 2 commits into
Conversation
The context panel animates its own width from 0 to 240px, and its children stretch to that animating width, so everything inside is being laid out again on every frame of the transition. List panels survive it because their rows are left-aligned and simply get clipped, but the streak panel is built from a 10-column calendar grid and justify-between hero rows: the dot columns redistribute and the rows slide apart for the length of the animation. Pinning the content to the panel's open width leaves the layout settled and lets overflow-hidden reveal it, which is what the other panels already looked like they were doing. Settings keeps stretching, since that panel legitimately fills the whole sidebar. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The rail's label-free density is the one we want accounts to land on, so an unset `sidebarCompact` now reads as compact. The flag stays three-valued rather than being flipped: unset means the user never chose and gets the new default, while an explicit `false` still means they picked Comfortable and keeps their labels. All three readers go through one hook, because they have to agree without looking related. The rail sizes itself from the flag, MainLayout pads the page content to match that width, and the appearance settings page renders the selected density. Two of them disagreeing puts the content over the rail or leaves a gap beside it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…debar-compact-c9b70f Brings in the panel expand-reflow fix and the compact-by-default rail (#6497). Two resolutions on top of the automatic merge: - appearance.tsx: this branch already moved the compact switch into SidebarDensitySection, so #6497's hook swap on the old switch is dropped rather than reinstated. - SidebarDensitySection now reads useSidebarCompact() instead of the raw flag, so the picker and the rail can't report different densities for an account that never touched the setting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Superseded by #6415, which now contains every commit from this branch — The panel expand-reflow fix, #6415's Closing in favour of #6415. |
Two v2 rail fixes. They share
SidebarDesktopV2.tsx, so they ride together as separate commits rather than as two PRs that would conflict with each other.1. Panel content reflows while the panel opens
The context panel animates its own width from 0 to 240px, and its children stretch to that animating width, so everything inside is laid out again on every frame of the transition.
List panels survive it: their rows are left-aligned, so they simply get clipped and it reads as a reveal. The streak panel does not, because it is built from a
grid-cols-10calendar andjustify-betweenhero rows. The dot columns redistribute and the rows slide apart for the length of the animation, which is the "moves in a weird way" the report describes.The content is now pinned to the panel's open width, so the layout stays settled and
overflow-hiddenreveals it. Settings keeps stretching, since that panel legitimately fills the whole sidebar.2. The rail ships compact by default
An unset
sidebarCompactnow reads as compact, so accounts land on the label-free rail.The flag stays three-valued rather than being inverted: unset means the user never chose and gets the new default, while an explicit
falsestill means they picked Comfortable and keeps their labels. Nobody's existing choice flips.All three readers go through one
useSidebarCompact()hook, because they have to agree without looking related: the rail sizes itself from the flag,MainLayoutpads the page content to match that width, and the appearance settings page renders the selected density. Two of them disagreeing puts the content over the rail or leaves a gap beside it.Follow-ups this creates
Verification
typecheck-strict-changedand eslint cleanNot verified in a browser: the v2 rail needs an authenticated session, so the preview on this PR is the real check. Worth watching the panel open on the streak tab specifically, and confirming an account that previously chose Comfortable still gets labels.
🤖 Generated with Claude Code
Preview domain
https://claude-v2-panel-expand-reflow.preview.app.daily.dev