Refactor Sidebar Resizing Logic for Improved User Interaction
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
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:
parent
3b00d86531
commit
cf1b7a792a
@ -248,7 +248,7 @@ const DashboardSidebarSplitter = ({ sidebar, children }) => {
|
|||||||
if (collapsedRef.current) {
|
if (collapsedRef.current) {
|
||||||
if (size - collapsedWidth > EXPAND_DRAG_PX) {
|
if (size - collapsedWidth > EXPAND_DRAG_PX) {
|
||||||
expandSidebar()
|
expandSidebar()
|
||||||
lockResizeFor(SIZE_TRANSITION_MS)
|
lockResizeUntilPointerUp()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setSidebarSize(Math.max(collapsedWidth, size))
|
setSidebarSize(Math.max(collapsedWidth, size))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user