Skip to content

feat: double-tap recognizer with tap/doubletap arbitration - #2

Merged
akoreh merged 3 commits into
mainfrom
feature/doubletap
Apr 2, 2026
Merged

feat: double-tap recognizer with tap/doubletap arbitration#2
akoreh merged 3 commits into
mainfrom
feature/doubletap

Conversation

@akoreh

@akoreh akoreh commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • DoubleTapRecognizer: two consecutive taps within configurable interval/threshold
  • Tap/doubletap arbitration via requireFailureOf — tap defers until doubletap fails
  • onResolved callback system for deferred recognition
  • Convenience doubleTap() function with callback and options forms
  • CustomEvent dispatch (fngr:doubletap)
  • Remove bundlephobia badge (rate limited by upstream)

Test plan

  • npm test — 212 unit tests pass
  • npm run test:e2e — Playwright tests pass on chromium/firefox/webkit
  • npm run build — tsup builds cleanly
  • npm run lint — no ESLint errors
  • npm run test:mutate — Stryker score above 85%

akoreh added 3 commits April 2, 2026 19:28
DoubleTapRecognizer detects two consecutive taps within a configurable
interval and movement threshold. TapRecognizer gains deferred recognition
via requireFailureOf so single-tap waits for doubletap to fail first.

68 unit tests, 22 E2E tests across 3 browsers, Stryker 89.05%.
- Clear onResolvedCallbacks in reset() to prevent unbounded accumulation
- Require same pointer ID for second tap in doubletap recognizer
- Add activePointerId guard to onPointerCancel in doubletap recognizer
- Reorder tracker.onPointerMove after pointerId guard in tap recognizer
- Fix test description that contradicted its assertion
- Fix interval docs to clarify pointerup-to-pointerup measurement
- Fix misleading priority comment in doubletap docs
- Remove incorrect Arbitrator step from contributing.md routing diagram
@akoreh
akoreh merged commit 76a18c7 into main Apr 2, 2026
5 checks passed
@akoreh
akoreh deleted the feature/doubletap branch April 3, 2026 06:03
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.

1 participant