fix: expand sidebar when clicking on toggler#4136
Conversation
Previously clicking the sidebar-mode toggler would always leave the sidebar open until you moved off of it. This behavior was fixed in 4.3 so that it would fold immediately on click, but in so doing, it "broke" the behavior in the other direction if the user is clicking back-and-forth (i.e. without moving off of the sidebar). In this edge-case the sidebar remains narrow until you move off of it, regardless of which mode is being activated. This PR fixes the toggler so that the mode behavior takes place immediately upon click even in this edge case.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new control-flow branch was added to the sidebar's click handler in unfoldable mode. When the header toggler is clicked, the sidebar now immediately switches from narrow back to non-narrow state, preventing it from remaining narrow after a fold-then-click sequence. Changes
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Co-authored-by: Ari Kornfeld <arikorn@users.noreply.github.com>
Previously clicking the sidebar-mode toggler would always leave the sidebar open until you moved off of it. This behavior was fixed in 4.3 so that it would fold immediately on click, but in so doing, it "broke" the behavior in the other direction if the user is clicking back-and-forth (i.e. without moving off of the sidebar). In this edge-case the sidebar remains narrow until you move off of it, regardless of which mode is being activated.
This PR fixes the behavior so that the mode change takes place visually immediately upon click even in this edge case.
Summary by CodeRabbit