Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/gesture-arena-late-input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[fix] A touch gesture's deadline now runs after the input stamped before it. Behind a blocked page, a finger's or pen's deadline whose timer runs more than 17 ms late waits 50 ms for input still queued. Each input from before it that comes late keeps it waiting. A mouse's or trackpad's deadline does not wait. A deadline that falls among a coalesced move's samples runs between them. A List reorder hold or a Pager's catch whose finger drifted or lifted in time now ends as it should.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss: "A mouse's or trackpad's deadline does not wait" is not what the arena does, and neither is "a finger's or pen's deadline … waits 50 ms": the gate is the latest contact (isLatestContactFingerOrPen, written in began() and untrackedBegan() and read in the timer's gate), which is also what the amended FR16 says. Probed on this head: a long press begun with a mouse waits the 50 ms once a finger lands elsewhere, and a long press begun with a finger keeps the single-task yield once a mouse press lands, so its drift stamped before the deadline still misses it. Suggested wording: "While the latest contact is a finger or a pen, a deadline whose timer runs more than 17 ms late waits 50 ms for input still queued; with a mouse or trackpad as the latest contact, deadlines keep today's single-task yield."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description now states the record's gate. Its unchanged-path line reads:

main's one-task yield, with a mouse or trackpad as the latest contact or a timer at most 17 ms late.

The release note changes in this pull request's next push, which merges main once #11450 lands. That commit is ready, and its note uses FR16's words:

While the latest contact is a finger or a pen, a deadline behind a blocked page waits for input still queued before it.

It adds: "With a mouse or trackpad as the latest contact, deadlines keep today's single-task yield."


@vjeux
13 changes: 11 additions & 2 deletions docs/specs/AST-094-touch-presentations/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,16 @@ a measured, sourced difference exists.
- **FR16 — Gestures keep the event clock.** Recognizers MUST read time from the
input events' timestamps. Durations (a long press, the interval between
taps) MUST be deadlines on that clock, so a blocked main thread delays the
report and never the moment reported.
report and never the moment reported. While the latest contact is a finger
or a pen, a deadline behind a blocked page waits for input still queued
before it. It waits 50 ms when its timer runs more than 17 ms late. While the
latest contact is a finger or a pen, every recognizer's late deadline waits
those 50 ms, even with nothing queued. Each finger's or pen's
input from before it that reaches the page more than 33 ms late keeps it
waiting 50 ms more. An input stamped at or past the deadline ends the wait.
A deadline that comes due during the wait runs as it ends. A deadline among
a coalesced move's samples runs between them: the samples stamped before it
come first.
- **FR17 — Native readings.** A recognizer's thresholds MUST follow UIKit's
measured values (FR1, FR2). A pan begins at 10 pt of travel on either axis (a
screen-edge pan attached to an element within the band at 15 px, FR18),
Expand Down Expand Up @@ -1133,7 +1142,7 @@ Motion that FR45 moves, by component. Each component's record carries its own li
| FR11 theme | `generateThemeRules.test.ts` themed-`:active` cases; real-browser forced `:active` on the Themed press story | a theme `:active` on a base and on a variant with a trailing pseudo; fine pointer; coarse pointer with forced `:active` and with the press attribute | a bare theme `:active` rule a coarse pointer matches, or a coarse arm keyed on `:active`, fails |
| FR13 | Resolver unit tests and a server-render test | coarse and fine pointer; narrow, wide and short; server render; hydrating render | a component that answers the conditions differently, or a touch presentation in the server or hydrating render, fails |
| FR14 | Browser tests of a sheet over a scrolled list | scrolled and at its top | a midway handoff fails |
| FR15–FR17 | Recognizer unit tests on synthetic streams with explicit timestamps | exclusive, simultaneous, require-to-fail, nested; a watcher beside a claiming winner; a blocked main thread; a pan at 10 pt per axis | a wrong winner, a late deadline, or a translation that keeps the hysteresis, or a watcher failed or cancelled by a claiming winner fails |
| FR15–FR17 | Recognizer unit tests on synthetic streams with explicit timestamps | exclusive, simultaneous, require-to-fail, nested; a watcher beside a claiming winner; a blocked main thread; a deadline run late behind a block, with a drift that reaches the page after the next task; an on-time deadline while input from before it still comes late; a coalesced move whose samples straddle a deadline; a wait whose own timer runs late; a mouse's late deadline and a pen's; a pan at 10 pt per axis | a wrong winner, a late deadline, a deadline that runs before input queued before it, or a translation that keeps the hysteresis, or a watcher failed or cancelled by a claiming winner fails |
| FR18–FR22 | Browser tests with real touch input (`spec:AST-013` FR10) | per-axis pans beside native scrolling, page zoom, cancelled touches, clicks after taps, keyboard activation, a modal scroll lock, a control that keeps its press through a drag; a still finger with sub-pixel jitter over a scroll view; a finger moved 9 px and 10 px straight, and (7, 7) and (8, 8) diagonally; a recognizer on an element whose author `touch-action` is narrower, including one without `pinch-zoom`; a screen-edge pan landing at 40 px and at 41 px from the edge, at 14 px and 15 px of travel, and a horizontal scroll that starts outside the band; a screen-edge pan on an element within the band, and on one that reaches beyond it; a sheet's pull from a list at its top, and from a list scrolled away from its top; a long press dragged past its tolerance after it began, which never scrolls the page | a ghost click, a scroll or zoom blocked other than by the author's `touch-action`, or a cancelled unowned touchmove outside FR19's five exceptions, a tap cancelled by sub-pixel movement or by under 10 px of travel, a scroll that does not take the touch at 10 px, or a derived `touch-action` wider than the author's, a screen-edge pan that claims outside its band or before 15 px on an element within the band, or has not claimed at 15 px, or an author scroll outside the band that is blocked, a band claim of `pan-x` on an element that reaches beyond the band, or a 15 px start there, or a scroll-edge pan that cancels a move a scroller could scroll, or begins before 10 pt, fails |
| FR19 (DEC-30) | Gesture unit tests on synthetic streams; browser tests with real touch input in WebKit and Chromium | a tap that wobbles 2–4 px toward a scroll edge keeps every move, and a 5 px move is cancelled; a sideways move is never held; NavigationStack's content back swipe on a pushed screen; RefreshControl's pull at its top, whose touch path is not a scroll-edge pan (a guard) | a move under 5 px along the pan's axis cancelled, a move from 5 px left uncancelled while every scroller under the finger sits at its edge, a sideways move held, or a pan that begins before its hysteresis fails |
| FR20 | Browser tests with real touch input in Chromium phone emulation (`spec:AST-013` FR10) | a horizontal drag under `pan-y`; a vertical drag under `pan-y` over a scroller with room; a vertical drag where no scroller has room | a horizontal drag under `pan-y` counted as the browser taking the touch, a vertical one over a scroller with room not counted, or a later uncancelable move counted, fails |
Expand Down
Loading