Refactor Sidebar Resizing Logic for Improved User Interaction
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Updated the DashboardSidebarSplitter component to change the resize locking mechanism from a timed lock to a pointer-up event lock, enhancing responsiveness during sidebar adjustments.
- This change improves user experience by allowing for more intuitive interactions when expanding the sidebar.
This commit is contained in:
Tom Butcher 2026-08-20 22:37:47 +01:00
parent 3b00d86531
commit cf1b7a792a

View File

@ -248,7 +248,7 @@ const DashboardSidebarSplitter = ({ sidebar, children }) => {
if (collapsedRef.current) {
if (size - collapsedWidth > EXPAND_DRAG_PX) {
expandSidebar()
lockResizeFor(SIZE_TRANSITION_MS)
lockResizeUntilPointerUp()
return
}
setSidebarSize(Math.max(collapsedWidth, size))