feat: add swipe-back from chat list to workspace list on mobile #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/workspace-swipe-back"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix the mobile swipe-back behavior so users can swipe right from the chat list
in a workspace to navigate back to the workspace list (matching the behavior on
the old task detail page).
Changes
In
ui/src/components/spaces/SpaceDetail.tsx:Pass
onSelectSpacetoSpaceChat: So thatSpaceChatcan triggerworkspace list return via
onSelectSpace(undefined).Add
useEdgeSwipetoSpaceChat: The existinguseEdgeSwipehook (alreadyused at the app level for opening the navigation drawer) is reused for the
chat list pane.
Enable only on the chat list: The edge swipe is enabled when:
onSelectSpaceis providedspaceTaskId == null) — i.e., the chat list view!showCreate)Design Notes
useEdgeSwipehook detects a right-edge swipe (starts within 20px from theleft edge, moves right by at least 60px or 22% of container width, with minimal
vertical movement).
SwipeableTabscomponent on the conversation detail pane alreadyhandles swipe-back from the detail to the chat list (
onSwipeBackFromFirst).Patch
Checkout
From your project repository, check out a new branch and test the changes.