Skip to content

feat(gesture): implement PanGesture - #1170

Merged
Kyle-Ye merged 2 commits into
mainfrom
feature/pan_gesture
Oct 17, 2026
Merged

Kyle-Ye merged 2 commits into
mainfrom
feature/pan_gesture

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

Close #1169

  • Implement the PanGesture SPI and PanGesture.Value, which report translation, touch type, and velocity.
  • Average the translation of all tracked events, and start the pan only after it moves the minimum distance in an allowed direction.
  • End the pan when all tracked events end, and reset the velocity when the last movement is older than 0.2 seconds.
  • Add MultiEventListener, a gesture primitive that tracks a set of events by ID.

@github-actions github-actions Bot added area: event-gesture Events, gestures, tracing, or interaction plumbing. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 17, 2026
@tuist

tuist Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
Unknown ⏳ 7 ffb66e32c
OpenSwiftUI ✅ 7 ffb66e32c

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 12s ffb66e32c

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 177 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.42%. Comparing base (4a8e9bd) to head (6bf67d4).

Files with missing lines Patch % Lines
Sources/OpenSwiftUI/Event/Gesture/PanGesture.swift 0.00% 102 Missing ⚠️
...OpenSwiftUI/Event/Gesture/MultiEventListener.swift 0.00% 75 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1170      +/-   ##
==========================================
- Coverage   29.50%   29.42%   -0.08%     
==========================================
  Files         941      943       +2     
  Lines       74518    74695     +177     
==========================================
- Hits        21984    21980       -4     
- Misses      52534    52715     +181     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit fa18840 into main Oct 17, 2026
6 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/pan_gesture branch October 17, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: event-gesture Events, gestures, tracing, or interaction plumbing. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PanGesture support

1 participant