Skip to content

Slide the desktop sidebar open and closed - #848

Merged
InfinityBowman merged 1 commit into
mainfrom
feat/sidebar-slide-transition
Sep 19, 2026
Merged

InfinityBowman merged 1 commit into
mainfrom
feat/sidebar-slide-transition

Conversation

@InfinityBowman

Copy link
Copy Markdown
Owner

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 and 0, 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

  • Transitions are dropped while the resize handle is being dragged, so the drag still tracks the mouse 1:1.
  • The collapsed panel and the hidden rail are both aria-hidden and inert, so neither sits in the tab order.
  • The sidebar body still unmounts when hidden, just on a timer after the slide finishes, preserving the existing "no sidebar queries while hidden" behaviour.
  • motion-reduce:transition-none keeps the instant toggle for reduced-motion users.
  • The mobile overlay is unchanged in behaviour; it just reads the shared constants instead of an inline 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

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
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b805067e-ac50-44be-960f-b9cd1207141f

📥 Commits

Reviewing files that changed from the base of the PR and between 0d09fc5 and 79094fa.

📒 Files selected for processing (3)
  • packages/web/src/components/layout/AppLayout.tsx
  • packages/web/src/components/layout/Sidebar.tsx
  • packages/web/src/components/layout/sidebarMotion.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@InfinityBowman
InfinityBowman merged commit cfbdc8b into main Sep 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant