Skip to content

Include release-only movement in DragGesture end values - #592

Open
shial4 wants to merge 1 commit into
skiptools:mainfrom
shial4:codex/fix-drag-release-position
Open

shial4 wants to merge 1 commit into
skiptools:mainfrom
shial4:codex/fix-drag-release-position

Conversation

@shial4

@shial4 shial4 commented Oct 24, 2026 •

Copy link
Copy Markdown

When an ACTION_UP event carries movement after the last MOVE, DragGesture.onEnded reports a stale location and translation. Forward the final pointer change from both regular and simultaneous detectors, then include its delta before completing the gesture.

Accepted cancellations retain their last known value; gestures that never pass touch slop do not produce an end callback. The existing SkipFuseUI callbacks remain compatible.

Validation

  • CI passed for 54e4b10, including Swift/Robolectric, iOS, and Android emulator tests.
  • Nine regression tests cover release-only movement, touch slop, global coordinates, repeated drags, and cancellation on Android API 34 ARM64 and Robolectric.
  • Reverting the gesture fix makes all five release-position cases fail while the four cancellation/unaccepted cases still pass. Restoring it passes all nine.

The broader local run combined the independent drag and path changes on upstream base 5504558. Host swift test --skip XCSkipTests completed 135 tests with 63 platform skips and no failures. The full Android run completed 228 tests: 211 passed, 14 skipped, and 3 failed. The three font-metric failures (testTextSizeHeadline, testTextSizeCaption, and testTextSizeBody) also reproduce on unchanged upstream source with its original dependencies: actual/expected values 18/19, 12/13, and 18/19 respectively. The focused regressions pass on Android and Robolectric.

Checklist

  • Signed the Contributor Agreement; the current CLA check passes.
  • Tested locally with swift test and separate Android/Gradle runs.
  • Tested on iOS through CI.
  • Tested on an Android emulator.
  • Checked Skip Fuse UI compatibility; no corresponding API change is needed.
  • Added a Showcase example (optional).
  • AI assistance: Codex assisted with implementation, regression tests, review, and automated validation.

@cla-bot cla-bot Bot added the cla-signed label Oct 24, 2026
@shial4

shial4 commented Oct 24, 2026

Copy link
Copy Markdown
Author

Additional reproduction and verification details for 54e4b10:

The regression injects a down at (20, 30), a move to (100, 50), then changes the pointer to (180, 90) immediately before release, without sending another MOVE. The assertions require the end value to include the final 80-by-40-pixel delta, converted to points, while preserving the start location. Repeating the gesture also checks that accumulated state is reset.

From the generated Gradle root, the focused Android suite is:

gradle :SkipUI:connectedDebugAndroidTest \
  '-Pandroid.testInstrumentationRunnerArguments.class=skip.ui.DragReleaseTests'

The saved API 34 ARM64 comparison has five release-position failures with the original implementation and all nine tests passing after restoration. The four cancellation/unaccepted cases pass in both runs.

The current PR CI run passed, including iOS and Android emulator jobs. The CLA check also passes. The broader local font-metric failures are documented in the description and reproduce without this change.

@shial4
shial4 marked this pull request as ready for review October 24, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant