Repository navigation
Let a gesture area's pan trigger when let go far enough - #651
Merged
Merged
Conversation
…trigger) A swipe-to-reply needs a pull that follows the finger one way, buzzes once it's far enough, acts if let go there and springs back either way. Snap points can't do it: they settle the row open, and PHP only hears where it settled after the finger lifts. trigger-x / trigger-y set how far from rest a pull on a bound pan axis goes to trigger, the sign giving the way. They go out as pan-x-trigger / pan-y-trigger and take the place of snap points on that axis. @trigger registers on_trigger, which rides the PRESS event with no payload. The renderers are in NativePHP/mobile-ui. Native::test() gets trigger($target) to fire it by method or ref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
simonhamp
marked this pull request as ready for review
November 3, 2026 20:48
gwleuverink
added a commit
that referenced
this pull request
Nov 4, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
trigger-x/trigger-yand@triggertonative:gesture-area, for a pull that does something when you let go far enough. It's the swipe-to-reply pattern: the row follows the finger one way, the phone buzzes once it's far enough, letting go there acts, and the row springs back either way.Snap points couldn't do this. They settle the row open, and PHP only hears where it settled once the finger lifts, so a haptic at the point would have needed a round trip per frame.
The distance is measured from where the pan rests, and its sign is the way the pull goes. It goes out as
pan-x-trigger/pan-y-trigger, and replaces any snap points on that axis.@triggerregisterson_trigger, which rides the PRESS event with no payload, so dispatch needed nothing new.triggerjoins the precompiler's core events and the collector's handlers.Native::test()getstrigger($target), which fires it by method or ref the waydragEnd()does.The renderers are in NativePHP/mobile-ui#197. The class docblock describes the attributes.
Tests cover the props (left off with no pan or a zero distance, and replacing snap points), the Blade path, the precompiler and the test harness. The full suite passes.
Used by NativePHP/dev-null-app#157.
🤖 Generated with Claude Code