Skip to content

fix: lock drawer intent during interactive drags#547

Open
lukemmtt wants to merge 1 commit intoletsar:masterfrom
TimeFinderApp:fix/lock-drawer-intent
Open

fix: lock drawer intent during interactive drags#547
lukemmtt wants to merge 1 commit intoletsar:masterfrom
TimeFinderApp:fix/lock-drawer-intent

Conversation

@lukemmtt
Copy link
Copy Markdown
Contributor

@lukemmtt lukemmtt commented Apr 23, 2026

Summary

This locks action-pane intent for a continuous interactive drag so the slidable cannot switch to the opposite pane after crossing neutral in the same gesture.

The controller now infers the pane direction once per drag, or reuses the already-open pane when a drag begins from an open state.

If the user reverses past neutral before releasing, the slidable keeps the originally inferred pane active and shows only a small resisted rubber-band offset.

If the user releases from that overscrolled state, the child animates back to neutral instead of jumping.

Programmatic open and close flows are unchanged, and there are no public API changes.

Before & After

Before: the opposite pane activates during one continuous drag After: the original pane stays locked and settles back smoothly

Tests

  • fvm flutter test test/controller_test.dart test/slidable_test.dart test/dismissal_test.dart

Closes #546

Locks the drawer side inferred at the start of a continuous drag so reversing across neutral no longer activates the opposite action pane mid-gesture.

Adds a resisted rubber-band movement while the user pulls toward the non-inferred side, then resets the intent only after the drag settles back to neutral.

Covers the behavior with LTR, RTL, neutral-reset, and already-open-pane regression tests. This is the same UX class as upstream issue letsar#311.
lukemmtt added a commit to TimeFinderApp/flutter_slidable that referenced this pull request Apr 23, 2026
Adds the updated after-capture GIF used in upstream PR letsar#547 so the embedded media shows the overscrolled release settling back to neutral with animation instead of appearing to jump.
lukemmtt added a commit to TimeFinderApp/flutter_slidable that referenced this pull request Apr 23, 2026
Adds the updated after-capture GIF used in upstream PR letsar#547 so the embedded media shows the overscrolled release settling back to neutral with animation instead of appearing to jump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock action-pane intent for a continuous drag until neutral settle

1 participant