Skip to content
Draft
Show file tree
Hide file tree
Changes from 8 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
19 changes: 13 additions & 6 deletions docs/architecture/react-component-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,15 @@ those contracts.
shared internal hook in the keyboard module (`packages/core/src/keyboard/`)
measures the on-screen keyboard, keeps the page from panning on focus, and
dismisses the keyboard when a surface moves (`spec:AST-099`); it is not
exported. The keyboard height and each keyboard change's transition (start
time, resting value, curve) reach styles only as the hook's value and live
only in the hook: each consumer applies them through a StyleX functional style
exported. Apps read its value, read-only, from the public keyboard entry, and
Lab reads it from Core's internal keyboard entry (`spec:AST-099` FR3): the
height, whether a keyboard is up, and whether it has settled, with a
notification when it settles. The keyboard height
and each keyboard change's transition (start
time, resting value, curve) reach styles only as the hook's value, or as a
Core host's read-only layout value that includes the keyboard's lift
(`spec:AST-099` FR3), and live nowhere else: each consumer applies them
through a StyleX functional style
on its own element, and no CSS custom property on the document root or a
shared ancestor carries them. The keyboard module may also write, and remove,
a CSS `translate` on the nearest fixed-position ancestor of a focused Core
Expand Down Expand Up @@ -236,9 +242,10 @@ those contracts.
the hook makes at most one layout read per keyboard change. A component
outside Core does not ride; it commits the resting value once. Packages
outside Core cannot import the hook; a component there that responds to the
keyboard keeps one listener that measures as `spec:AST-099` FR2 defines, keeps
focus from panning as FR4 does, blurs as FR5 does, applies the height through
a functional style on its own elements, and follows INV3 and INV5. The hook
keyboard reads the hook's value through its entry and keeps no listener of its
Comment thread
astracat-bot[bot] marked this conversation as resolved.
Resolved
own that measures the keyboard. It keeps focus from panning as
`spec:AST-099` FR4 does, blurs as FR5 does, applies the height through a
functional style on its own elements, and follows INV3 and INV5. The hook
follows INV3 and INV5.
- **INV12 — Size changes inside a container have one module.** In
`@astryxdesign/core`, one internal module produces the size-change glide
Expand Down
10 changes: 7 additions & 3 deletions docs/specs/AST-094-touch-presentations/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,14 @@ a measured, sourced difference exists.
that gesture's click (DEC-17). A recognizer that begins MUST claim its touches by cancelling
`touchmove` through a non-passive listener on its element; a watcher,
which never claims, is exempt (DEC-7). A `touchmove` of a touch no recognizer owns MUST NOT be cancelled, with
five exceptions. While a scroll lock under a modal presentation holds the
six exceptions. While a scroll lock under a modal presentation holds the
page, it MAY cancel the moves of a one-finger touch that no recognizer owns
when that pan would scroll the page; a second finger is never cancelled
(FR10), and the page keeps pinch-zoom. A modal overlay that takes the page
(FR10), and the page keeps pinch-zoom. While a software keyboard is up, a
container that rides it MAY hold the page through the same page hold: it
cancels the moves of a one-finger touch that starts on the container and
that no recognizer owns, unless a scroller inside the container takes that
pan or the page is pinch-zoomed (`spec:AST-099` FR4). A modal overlay that takes the page
scroll lock also stops the page's pull-to-refresh and overscroll bounce
while it holds the lock, and releases them with it. Once its press is
delivered, a
Expand Down Expand Up @@ -1134,7 +1138,7 @@ Motion that FR45 moves, by component. Each component's record carries its own li
| 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 |
| 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 |
| 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 six 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 |
| FR23 | Haptics tests on the recorded moments | tap, drag, lift | a haptic outside a native moment fails |
Expand Down
Loading