fix: make folding sidebar touch interactions reliable - #4423
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChangesSidebar pointer interactions
Poem
Merge Risk: ⚪ Minimal · up to This localized sidebar interaction change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
|
|
In desktop folding mode, choosing a sidebar navigation item is meant to return the dynamic sidebar to its narrow state.
SidebarRootcurrently recognizes selections through a nativemouseuplistener, so touch input depends on browser-generated compatibility mouse events and behaves inconsistently in Firefox on Windows. The reporter has observed the sidebar remaining expanded, briefly expanding and collapsing, or staying collapsed after otherwise equivalent touches.In desktop folding mode, completing a primary touch pointer interaction on a navigation link applies the deferred temporary narrow state and leaves route selection behavior intact.
Summary by CodeRabbit
Update
SidebarRootto handle completed primary pointer interactions directly so mouse, touch, and pen navigation share one fold-after-selection path without relying on synthetic mouse events. Preserve the existing exclusions for secondary-button context menus, group toggles, footer controls, blank areas, and mobile-mode dismissal, including the deferred state update that avoids racing route navigation. Account for non-hover touch pointers re-entering a temporarily narrowed folding sidebar so the explicit narrow state does not prevent a subsequent touch from expanding and selecting another item.Closes #4361
Summary by CodeRabbit
Bug Fixes
Tests