Slide the desktop sidebar open and closed - #848
Merged
Merged
Conversation
The desktop panel used to mount and unmount, so hiding or showing it snapped the whole content area sideways. It now stays in the DOM inside a clipping column whose width animates, while the panel itself translates by the same amount, so the nav slides out of view instead of squashing. The collapsed rail animated nowhere before, which would have made the content edge jump partway through the slide, so its width animates on the same curve. Timing lives in one module shared with the mobile overlay. Transitions are dropped while resizing so the drag still tracks the mouse, the hidden panel is inert, and reduced motion keeps the instant toggle. Claude-Session: https://claude.ai/code/session_014wNyh9fXHD9UmbEqDJQ6QH
|
Warning Review limit reachedNext included review available in 52 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Hiding or showing the desktop sidebar mounted and unmounted the panel, so the content area snapped sideways. Mobile already slid; desktop now does too.
What changed
sidebarMotion.ts(new): the 200ms duration and easing in one place, shared by the desktop panel, the collapsed rail and the mobile overlay so they cannot drift apart.Sidebar.tsx: the desktop panel stays mounted inside a clipping column whose width animates between the sidebar width and0, while the panel keeps its full width and translates left by the same amount. The nav slides out of view rather than reflowing mid-animation.AppLayout.tsx: the 40px collapsed rail used to appear and disappear instantly, which would have made the content edge jump partway through the slide. Its width now animates on the same curve, so the edge moves once.Details
aria-hiddenandinert, so neither sits in the tab order.motion-reduce:transition-nonekeeps the instant toggle for reduced-motion users.transitionTimingFunction.Verification
Typecheck, lint and format pass. No dev server was started, so the animation has not been watched in a browser yet - worth a quick look at a narrow and a wide sidebar width before merging.
https://claude.ai/code/session_014wNyh9fXHD9UmbEqDJQ6QH