Repository navigation
[drawer] Fix interrupted swipe dismiss cleanup - #4467
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review (GPT-5.4)This remains a focused bug-fix PR. The follow-up commit simplifies the local cleanup helper in 1. Bugs / Issues (None)2. Root Cause & Patch AssessmentThe issue report pointed at outside-press dismissal staying disabled when a swipe-open gesture exits through the hook’s cancel path instead of the normal release path. The change in The latest follow-up commit stays in 3. Simplification OpportunitiesHandled: the current tip drops the unnecessary 4. Edge Cases Worth NotingThe regression coverage in Merge Confidence ScoreOverall merge confidence is 4/5. I still did not find a branch-relevant correctness issue in the diff, and after the follow-up cleanup commit |
atomiks
left a comment
There was a problem hiding this comment.
Thanks for the fix @lunaxislu
Fixes #4471
Summary
Fix interrupted drawer swipe-open interactions so outside press dismissal is restored even when the swipe is canceled before normal release cleanup runs.
Changes
onCancelhook touseSwipeDismissDrawer.SwipeAreafor both release and cancel pathsReproduction
Drawer.SwipeAreaTesting
mise exec [email protected] -- pnpm test:jsdom DrawerSwipeArea --no-watchmise exec [email protected] -- pnpm test:jsdom useSwipeDismiss --no-watchmise exec [email protected] -- pnpm exec eslint packages/react/src/utils/useSwipeDismiss.ts packages/react/src/drawer/swipe-area/DrawerSwipeArea.tsx packages/react/src/drawer/swipe-area/DrawerSwipeArea.test.tsx