Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 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/browser-support-ios-keyboard-ride.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/cli': patch
---

[docs] The browser-support guide's on-screen keyboard section describes the ride in Safari on iOS: ChatLayout's composer and a Tall BottomSheet's focused field ride UIKit's keyboard motion, the scroll room stays until Safari reports the keyboard gone, and the ride starts once the page has loaded Core's touch support.

@vjeux
7 changes: 7 additions & 0 deletions .changeset/keyboard-ride-ios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[feat] In Safari on iOS, ChatLayout's composer and a Tall BottomSheet's focused field ride the on-screen keyboard on UIKit's own keyboard motion. They rise from Safari's report as the keyboard starts up; before, they moved up in one step. The composer also goes down from the blur that takes the keyboard down, as the sheet already did. The ride starts once the page has loaded Core's touch support, shortly after first paint; before that, they move in one step. Chrome on Android and Firefox for Android are unchanged. Under Reduce Motion nothing travels.

@vjeux
12 changes: 10 additions & 2 deletions docs/architecture/react-component-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,16 @@ those contracts.
and Switch work by taps, clicks and keys, with no drag tracking and no slide
or spring, and a tap under a finger or under Reduce Motion changes them at
once, with no cross-fade; a bottom sheet still drags, and a drag that closes
it takes the stylesheet exit instead of the spring. A gesture in that window
does not start the load. The bundler keeps one copy per page however many
it takes the stylesheet exit instead of the spring. ChatLayout loads the touch
runtime after first paint under a coarse pointer, for the keyboard ride; it
adds no gesture, and under a fine pointer it never loads it. The runtime
exposes Safari on iOS's keyboard schedule
(`keyboard/uikitKeyboardSchedule.ts`): UIKit's keyboard spring and the
layout guide's focus rules there. The keyboard riders build it with the
duration and focus checks they hold, and register it with the layout guide.
No first-load module imports it. The layout guide cannot hold it, since
nearly every page loads the guide first. A gesture in that
window does not start the load. The bundler keeps one copy per page however many
components use them. If the runtime's chunk fails to load, the page stays as
it is before the load: components work by taps, clicks and keys, and no
gesture retries the load. The loader's `import()` targets
Expand Down
68 changes: 55 additions & 13 deletions docs/specs/AST-099-mobile-keyboard/spec.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/cli/assets/docs/browser-support.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ export const docs = {
type: 'prose',
text: 'In Chrome on Android, ChatLayout\u2019s composer rides the keyboard as Gboard slides it up and down. A Tall BottomSheet\u2019s focused field rides the keyboard as Gboard slides it up, and as Gboard slides it down after the field loses focus. The scroll room stays until the keyboard is down. A hide Chrome reports late, such as Back, which keeps the focus, rides down from Chrome\u2019s report. When the keyboard is reported, the sheet places the field just above it in that same frame, so Chrome has no covered field to pan to; if Chrome pans anyway, the sheet puts the page back when that pan ends. Chrome follows your viewport setting, which Astryx documents and never sets: your app owns its viewport `<meta>` element. By default (`interactive-widget=resizes-visual`) Chrome lays the keyboard over the page and pans to a focused field elsewhere on the page. With `interactive-widget=resizes-content` it shrinks the layout viewport instead, so content anchored to the bottom sits above the keyboard, and those components measure no keyboard and change nothing: the browser has already made the room.',
},
{
type: 'prose',
text: 'In Safari on iOS, in the browser and as a home-screen app, ChatLayout\u2019s composer and a Tall BottomSheet\u2019s focused field ride the keyboard on UIKit\u2019s own keyboard motion. They rise from Safari\u2019s report of the keyboard, which comes as the keyboard starts up, and go down from the blur that takes the keyboard down. Safari reports the keyboard gone only once it is down, so the scroll room stays until then. The ride starts once the page has loaded Core\u2019s touch support, shortly after first paint; before that, they move in one step.',
},
{
type: 'code',
lang: 'html',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/__golden__/no-icon-set/docs-topics.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"supporting-older-browsers",
"how-these-tiers-move-over-time"
],
"skeleton": "463a740e90118dea23181c46a2cca01695d9295027863282835518f0bd655bdb",
"skeleton": "5aafc0d8f21d2f2961fb98ee722499ec146ae6cac841b036e019c03e4cdf8073",
"mentions": []
},
"color": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/BottomSheet/BottomSheet.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const docs = {
name: 'height',
type: "'hug' | 'capped' | 'tall' | number | string",
description:
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page. This accommodation applies where the visual viewport shrinks for the keyboard, as in Safari on iOS, Firefox for Android and Chrome on Android, where the sheet places the focused control just above the keyboard as it comes up, and the control rides the rest of Gboard\u2019s slide up, and the slide down after it loses focus; a hide Chrome reports late, such as Back, rides down from Chrome\u2019s report (`astryx docs browser-support`).",
"How tall the sheet is. Named budgets: 'hug' fits its content up to 92% of the viewport, 'capped' is a scrolling mid-height panel (~62%), and 'tall' is a pinned near-full panel (~92%) for content that streams in. Or pass a number (px) / CSS length for a custom budget. Give snapPoints to let the user drag between heights. On shorter viewports the sheet fills the available height. Only a fully expanded 'tall' sheet provides mobile-keyboard accommodation: it stays put and scrolls each focused control above the keyboard. Hug, Capped, numeric and CSS-length heights never do, and a Tall sheet stops doing it the moment the user drags it to a shorter detent, resuming when they drag it back. Outside that state the sheet neither moves nor adds keyboard scroll space, and the browser's own focus reveal is left in place; on iOS that reveal can shift the whole page. This accommodation applies where the visual viewport shrinks for the keyboard, as in Safari on iOS, Firefox for Android and Chrome on Android, where the sheet places the focused control just above the keyboard as it comes up, and the control rides the rest of Gboard\u2019s slide up, and the slide down after it loses focus; a hide Chrome reports late, such as Back, rides down from Chrome\u2019s report. In Safari on iOS the content rides UIKit\u2019s keyboard motion, up from Safari\u2019s report and down from the blur (`astryx docs browser-support`).",
default: "'capped'",
},
{
Expand Down
Loading