Skip to content

Add Event API#13

Merged
Kyle-Ye merged 6 commits into
mainfrom
feature/event
Apr 15, 2026
Merged

Add Event API#13
Kyle-Ye merged 6 commits into
mainfrom
feature/event

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Contributor

@Kyle-Ye Kyle-Ye commented Apr 15, 2026

Summary

Introduce the core Event type hierarchy:

  • Event protocol (Identifiable, id/phase/timestamp requirements) + EventPhase enum (.began/.active/.ended/.failed).
  • EventID struct — Hashable, CustomStringConvertible, Sendable wrapper around Int.
  • SpatialEvent protocol (Event & LocationContaining).
  • ScrollEvent protocol with delta / acceleratedDelta, plus ConcreteScrollEvent concrete struct.
  • MouseEvent and TouchEvent concrete spatial events; MouseEvent.Button RawRepresentable struct (.primary/.secondary/.tertiary).
  • Promote LocationContaining to public and add IdentifiableLocation<ID>.

Adds compatibility tests for EventID, MouseEvent, TouchEvent, ConcreteScrollEvent. The description tests are parametric with exact == assertions against the full NestedCustomStringConvertible output, covering every EventPhase case.

Test plan

  • xcodebuild test -only-testing:OpenGesturesTests on iPhone 17 Pro / iOS 26.2 Simulator
  • OPENGESTURES_COMPATIBILITY_TEST=0 xcodebuild test -only-testing:OpenGesturesCompatibilityTests on the same simulator
  • OPENGESTURES_COMPATIBILITY_TEST=1 OPENGESTURES_USE_LOCAL_DEPS=1 xcodebuild test -only-testing:OpenGesturesCompatibilityTests on the same simulator (requires matching DarwinPrivateFrameworks branch)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.19%. Comparing base (7422712) to head (6a01ad0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenGestures/Event/Event.swift 0.00% 2 Missing ⚠️
Sources/OpenGestures/Event/ScrollEvent.swift 77.77% 2 Missing ⚠️
Sources/OpenGestures/Util/LocationContaining.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   71.85%   74.19%   +2.33%     
==========================================
  Files          56       62       +6     
  Lines        1439     1519      +80     
==========================================
+ Hits         1034     1127      +93     
+ Misses        405      392      -13     
Flag Coverage Δ
ios 70.19% <93.33%> (+2.99%) ⬆️
macos 74.19% <93.33%> (+2.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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 7ed2c4a into main Apr 15, 2026
4 of 5 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/event branch April 15, 2026 20:01
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.

2 participants