Repository navigation
[drawer] Ignore swipes without an attributed direction when using snap points - #5477
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,157.37 ms -31.53 ms(-2.7%) | Renders: 76 (+0) | Paint: 1,785.91 ms -64.26 ms(-3.5%)
14 tests within noise — details 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. |
bd14ad7 to
5b1a593
Compare
|
@claude review |
PR reviewThe core fix is sound: with snap points configured Bugs (1)1. 🟠 Nested swipe state is still stranded after an attributed snap point settleLocation: if (!direction) {
applySwipeProgress(0, true, true);
}The reset is gated on
Net result: the parent keeps Failure scenario: Nested drawer whose child has Fix: Move the reset out of the Tests (1)1. 🟡 No coverage for an unattributed release with
|
|
@claude review low |
Fixes #5471
With
snapPoints, the release logic decides to close from the vertical delta and release velocity alone. A mostly horizontal flick with a fast downward arc at lift passes those checks even thoughuseSwipeDismissnever attributed a swipe direction to the gesture. The viewport then commits the closing choreography (data-ending-style,data-swipe-dismiss, snap point set tonull), but the hook drops the release decision because it has no dismiss direction, soonOpenChangenever fires and the popup stays visually dismissed whileopenremainstrue.Changes
data-nested-drawer-swipingand a stale swipe progress.