Skip to content
Draft
Show file tree
Hide file tree
Changes from 136 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
3dd581e
feat(core): one progress module for the motion foundation
vjeux Nov 3, 2026
3cfb3b1
refactor(animatedLayout): take the settle spring's progress from prog…
cixzhang Nov 3, 2026
273da1e
feat(core): the rect morph's paths, the rect a grow-out presentation …
vjeux Nov 3, 2026
f1149cd
Merge remote-tracking branch 'origin/main' into motion/morph-path
cixzhang Nov 3, 2026
131ca14
feat(core): one rect morph for touch presentations that grow out of a…
vjeux Nov 3, 2026
b9b630a
feat(TextInput, TextArea, NumberInput): fields stay above the keyboard
vjeux Nov 3, 2026
f19df27
fix(rectMorph): a handed-in animator stays on the element through a c…
cixzhang Nov 3, 2026
e3a43d0
fix(motion): one timed curve keeps a retargeted velocity, for the pag…
cixzhang Nov 4, 2026
c99210a
fix(rectMorph): a timed motion from rest plays its easing as given
cixzhang Nov 4, 2026
3272828
docs(rectMorph): the timing follows the component's motion record
cixzhang Nov 5, 2026
c311399
docs(AST-099): TextInput, TextArea and NumberInput meet FR9
vjeux Nov 7, 2026
df642e0
Merge main into motion/morph-path
vjeux Nov 8, 2026
8c8f726
Merge motion/morph-path into motion/rect-morph
vjeux Nov 8, 2026
3fdca8f
fix(rectMorph): AST-094 links the morph; the proof imports a safe test
vjeux Nov 8, 2026
d4903e2
test(SnapPaging): the pager's bundle lists the progress module
vjeux Nov 8, 2026
1b794af
test(motion): the popover's proofs read Popover's live geometry
vjeux Nov 8, 2026
5dd6a6a
Merge motion/morph-path into motion/rect-morph
vjeux Nov 8, 2026
3bfa524
refactor(motion): one eased progress, with a retargeted velocity
vjeux Nov 8, 2026
ad7f8fb
test(motion): the popover's turn-around reads Popover's live curves
vjeux Nov 8, 2026
99d352d
Merge motion/morph-path into motion/rect-morph
vjeux Nov 8, 2026
33a3ee8
docs(changeset): the rect morph's note names the eased-progress move
vjeux Nov 8, 2026
2bf8f8a
Merge main into motion/rect-morph
vjeux Nov 9, 2026
822013a
test(motion): the popover's turn-around compares opacity as drawn
vjeux Nov 9, 2026
2651e17
Merge motion/morph-path into motion/rect-morph
vjeux Nov 9, 2026
d9d89ea
Merge main
vjeux Nov 10, 2026
6354fa3
fix(motion): a popover's morph never reads an opacity below 0
vjeux Nov 10, 2026
dcfa346
Merge motion/morph-path into motion/rect-morph
vjeux Nov 10, 2026
75391ad
feat(DropdownMenu): a finger or a pen opens the menu as it presses
vjeux Nov 10, 2026
6b6310c
test(motion): the morph proofs drop the menu's old straight line
vjeux Nov 10, 2026
e8face7
Merge main
vjeux Nov 10, 2026
d08f0d3
Merge main
vjeux Nov 10, 2026
eb2c859
docs(DropdownMenu): open-on-press notes name the anchored menu
vjeux Nov 10, 2026
3603adb
Merge main
vjeux Nov 10, 2026
de86bc9
sandbox: a page to try a menu's press under a finger
vjeux Nov 10, 2026
7419b9d
Merge main
vjeux Nov 10, 2026
927c081
Merge the open-on-press change into the rect morph stack
vjeux Nov 10, 2026
61b57b9
feat(DropdownMenu): a finger's open grows the menu out of its trigger
vjeux Nov 10, 2026
badea5d
fix(DropdownMenu): under Reduce Motion a finger's open only fades in
vjeux Nov 10, 2026
1f576a5
test(DropdownMenu): touch specs wait out a finger's grow
vjeux Nov 10, 2026
75b3111
refactor(core): one Reduce Motion predicate for the animator and menu
vjeux Nov 10, 2026
b3d3565
fix(DropdownMenu): every copy of Core shares the grow's one load
vjeux Nov 10, 2026
86871f9
fix(DropdownMenu): taps stay off the page until the menu shows
vjeux Nov 11, 2026
36122dd
docs(AST-094): FR31 grows once the grow's code is loaded
vjeux Nov 11, 2026
be132da
Merge main
vjeux Nov 11, 2026
b08ab80
docs(AST-094): FR31's faded open closes with no shrink
vjeux Nov 11, 2026
87ccfba
fix(keyboard): the scroll back's records are one per page across copies
vjeux Nov 11, 2026
3f35abd
fix(DropdownMenu): the grow's code loads through the shared loader
vjeux Nov 11, 2026
b5e93ce
Merge main
vjeux Nov 11, 2026
e6190c0
fix(keyboard): a field focused as it mounts starts its session at attach
vjeux Nov 11, 2026
a71e804
Merge main
vjeux Nov 11, 2026
bf9675e
Merge the open-on-press change into the rect morph stack
vjeux Nov 11, 2026
2e37b3a
Merge main and the open-on-press change
vjeux Nov 11, 2026
78442d4
Merge commit 'ebb9ddecc0219bc6eaf3caf40b6e4e45f81dc0e5' into motion/r…
cixzhang Nov 11, 2026
09bb9c2
fix(motion): existing callers keep easedProgress's values; the pager …
cixzhang Nov 11, 2026
b24c23c
test(paging): a retarget at the first instant goes on at the starting…
cixzhang Nov 11, 2026
9d40852
test(paging): a 0 ms move is on its target at once, at rest
cixzhang Nov 11, 2026
6c17632
test(motion): compare the callers' values with copies of the earlier …
cixzhang Nov 11, 2026
542e150
Merge the open-on-press change into the rect morph stack
vjeux Nov 11, 2026
bdb2003
Merge the rect morph's new head
vjeux Nov 11, 2026
3b7e253
refactor(core): one useMenuPress for every menu
vjeux Nov 11, 2026
7093e59
refactor(keyboard): read Reduce Motion through reducedMotionFade
vjeux Nov 11, 2026
55490ae
refactor(keyboard): the scroll back lives in keyboardTarget.ts
vjeux Nov 11, 2026
08ae3b6
docs(AST-099): name the keyboard module's new cross-module exports
vjeux Nov 11, 2026
92dd62a
Merge the open-on-press change into the rect morph stack
vjeux Nov 11, 2026
a831c2c
Merge the open-on-press change's rework
vjeux Nov 11, 2026
60ed7c7
docs(AST-099): Gap 19, a field in a modal sheet shorter than tall
vjeux Nov 11, 2026
2d41fe6
refactor(DropdownMenu): grow with the page, on Popover's surface motion
vjeux Nov 11, 2026
a88dfbb
docs(Popover): name the surface motion options DropdownMenu passes
vjeux Nov 11, 2026
cab4595
Merge main
vjeux Nov 11, 2026
a0bdb12
Merge main
vjeux Nov 11, 2026
3b51d59
Merge the open-on-press change into the rect morph stack
vjeux Nov 11, 2026
14f3d32
Merge the open-on-press change's main merge
vjeux Nov 11, 2026
c13c351
test(DropdownMenu): read the row under a held finger once the grow rests
vjeux Nov 11, 2026
ac25529
docs(AST-099): name Gap 19 where the fields meet FR9
vjeux Nov 11, 2026
e2bbbe7
refactor(input): one touch reader in the input stream
vjeux Nov 11, 2026
d4a7d3b
docs(AST-099): name the input stream's one touch reader
vjeux Nov 11, 2026
18fcf70
Merge commit '7e7fbae0fa0ba389ad37fafdb26e6495fab19fd4' into motion/r…
cixzhang Nov 11, 2026
801dc38
Merge main into the rect morph stack
vjeux Nov 12, 2026
5a7e8b1
Merge main and the rect morph stack's live head
vjeux Nov 12, 2026
6176b9d
docs(AST-094): name the morph path module
cixzhang Nov 12, 2026
f082fe6
Merge commit '6176b9dccc1986b83713e4c9dcf39688e7c5b3e6' into motion/r…
cixzhang Nov 12, 2026
b957453
docs(AST-094): name the rect morph module
cixzhang Nov 12, 2026
138f80f
refactor(Popover): name the tap hold until the grow's first frame
vjeux Nov 12, 2026
672d67a
Merge main into the rect morph stack
vjeux Nov 12, 2026
55f0340
Merge main and the rect morph stack's live head
vjeux Nov 12, 2026
6f51984
refactor(DropdownMenu): grow on Popover's own surface motion
vjeux Nov 12, 2026
ea3b6ce
Merge main, without the rect morph stack
vjeux Nov 12, 2026
d15f2d7
fix(Popover): grow from the trigger's box without its press scale
vjeux Nov 12, 2026
b074ed2
Merge main for useCommittedRefInto
vjeux Nov 12, 2026
dfbaecc
fix(DropdownMenu): commit presentSurfaceRef through useCommittedRefInto
vjeux Nov 12, 2026
1a4c38a
refactor(DropdownMenu): read the click's press from the press model
vjeux Nov 12, 2026
681ed71
docs(DropdownMenu): record the press report and the entrance without one
vjeux Nov 12, 2026
a2c2f3c
docs(DropdownMenu): word the press records in the present tense
vjeux Nov 12, 2026
6c8aeaa
Merge main for the press model's committed refs
vjeux Nov 12, 2026
0cd83b8
fix(DropdownMenu): mark a finger's open only where the menu opens
vjeux Nov 12, 2026
bfb1a32
Merge main
vjeux Nov 12, 2026
dd68a2a
fix(DropdownMenu): tie a finger's open to its gesture
vjeux Nov 12, 2026
a539222
fix(core): keep the keyboard store apart from copies of another shape
vjeux Nov 12, 2026
b9c1bdb
fix(DropdownMenu): an open from code plays the layer's entrance
vjeux Nov 12, 2026
bfb9d29
Merge main
vjeux Nov 12, 2026
2ed29e9
refactor(core): state the keyboard store's constraint in its comment
vjeux Nov 12, 2026
26af8e6
Merge main for the menu press's touch identifier
vjeux Nov 12, 2026
827967d
fix(DropdownMenu): under Reduce Motion a menu fades out where it stands
vjeux Nov 12, 2026
edced5f
Merge main
vjeux Nov 12, 2026
e15b9fd
Merge main for the menu's show and hide refs at commit
vjeux Nov 12, 2026
a99b97f
Merge main
vjeux Nov 13, 2026
c765ff2
fix(DropdownMenu): say Reduce Motion fades only on a coarse pointer
vjeux Nov 13, 2026
6a89434
Merge main for the layer's show from another trigger
vjeux Nov 13, 2026
babd93d
Merge main
vjeux Nov 14, 2026
929b3a5
Merge main
vjeux Nov 14, 2026
9fa057e
Merge main for the alert dialog's touch motion and the swipe actions
vjeux Nov 14, 2026
efe9125
Merge main for the popover's focus-return target
vjeux Nov 14, 2026
d6a5376
fix(Layer): an exit copy keeps the padding and colors of what it copies
vjeux Nov 14, 2026
3529093
Merge the exit copy fix, with main
vjeux Nov 14, 2026
c0dc00f
test(DropdownMenu): a finger's close copy draws the menu's rows in place
vjeux Nov 14, 2026
f25d71c
test(Layer): the browser's popover style reaches the exit copy
vjeux Nov 14, 2026
f9885ce
docs(DropdownMenu): the press model's record says why no engine fits
vjeux Nov 14, 2026
1acd00c
Merge the exit copy fix's test update
vjeux Nov 14, 2026
2937d9a
Merge main into the exit copy fix
vjeux Nov 15, 2026
37cf451
Merge main for the kept-inside hold's release
vjeux Nov 15, 2026
7373633
Merge main into the exit copy fix
vjeux Nov 15, 2026
f894ca8
Merge main
vjeux Nov 15, 2026
946e2b5
Merge main
vjeux Nov 15, 2026
804b708
Merge main
vjeux Nov 16, 2026
2db3ef8
fix(DropdownMenu): a finger's open that waits still grows
vjeux Nov 15, 2026
5c3698c
Merge main
vjeux Nov 17, 2026
315db84
Merge main
vjeux Nov 17, 2026
c820a48
docs(keyboard): record Back in Firefox for Android as a gap
vjeux Nov 17, 2026
584d8a3
docs(keyboard): say that Gap 21 shows more often on main
vjeux Nov 17, 2026
01f57af
Merge #9777
vjeux Nov 17, 2026
5a216db
docs(keyboard): narrow the changeset for Back in Firefox for Android
vjeux Nov 17, 2026
9318341
test(DropdownMenu): pin a waiting finger open that another press leaves
vjeux Nov 17, 2026
c3e3df7
Merge main
vjeux Nov 17, 2026
76439a4
Merge #9777
vjeux Nov 17, 2026
f1b8bf3
Merge main
vjeux Nov 17, 2026
42d1bf8
Merge #9777
vjeux Nov 17, 2026
6ff65df
Merge main
vjeux Nov 18, 2026
02b9ae6
Merge main
vjeux Nov 19, 2026
53e66d6
Merge main
vjeux Nov 19, 2026
093df78
Merge main
vjeux Nov 20, 2026
5c385e8
Merge main
vjeux Nov 20, 2026
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/inputs-stay-above-keyboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[feat] On a phone or tablet, TextInput, TextArea and NumberInput keep themselves above the on-screen keyboard, with nothing to turn on. A field in a page that scrolls is scrolled 10 px above the keyboard as it opens, rising with the keyboard on iOS and at once under Reduce Motion; on a page with nothing to scroll, the browser's own reveal stays. When the keyboard closes, the page or scroll area goes back to where it was, sliding down with the keyboard on iOS, unless the person scrolled it meanwhile. In Firefox for Android on a slow device, Back can sometimes leave the page where the reveal scrolled it. A field in a scrolling area is scrolled 10 px above the keyboard when the area can bring it there; otherwise the page brings it into view. A field in a bar fixed at the bottom of the viewport rides up with the keyboard, the bar's bottom on the keyboard's top, and back down when it closes, even in a bar the app owns. A field inside a fully expanded Tall BottomSheet leaves that to the sheet. In a fixed container the app positions itself, such as a full-viewport dialog, a floating bar or a bar with its own `translate`, a scroller around the field brings it above the keyboard when it can; otherwise the page brings it into view, or the browser's own reveal does. In Firefox for Android, where the page cannot scroll further, a field the page should bring into view can stay under the keyboard. Nothing changes under a mouse or a trackpad.

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

[feature] Under a finger or a pen, a DropdownMenu or MoreMenu now grows out of its trigger as it opens and shrinks back into it as it closes, on a Popover's path and timing (`spec:AST-094` FR31). A tap's open grows as a hold's does. Under Reduce Motion on a phone or tablet (a coarse primary pointer), the menu fades in at its size and out where it stands. A mouse, the keyboard and `presentation="popover"` keep the layer's own entrance.

@vjeux
2 changes: 2 additions & 0 deletions apps/sandbox/scripts/next-export-routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"/pages/markdown-perf/",
"/pages/media-mode/",
"/pages/mega-menu/",
"/pages/menu-grow-cases/",
"/pages/menu-press-cases/",
"/pages/minute-wheel-loop/",
"/pages/mobile-keyboard-fields/",
"/pages/mobile-prototypes/",
"/pages/mobile-spacing/",
"/pages/mobile-type/",
Expand Down
204 changes: 204 additions & 0 deletions apps/sandbox/src/app/(raw)/pages/menu-grow-cases/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

/**
* @file page.tsx
* @input None
* @output A bare page of large DropdownMenus and a Popover, spread down a
* page that scrolls with the document
* @position A raw page, with no sandbox chrome, for checking on a phone how
* menus grow out of their trigger and shrink back. It has a tall menu that
* scrolls, a wide one and a filter menu with many rows. It also has nested
* sub-menus, menus at each edge, one that flips above, and a Popover.
*/

import {Button} from '@astryxdesign/core/Button';
import {
DropdownMenu,
type DropdownMenuOption,
} from '@astryxdesign/core/DropdownMenu';
import {HStack, VStack} from '@astryxdesign/core/Layout';
import {Popover} from '@astryxdesign/core/Popover';
import {Heading, Text} from '@astryxdesign/core/Text';

const SHORT: DropdownMenuOption[] = [
{label: 'Edit'},
{label: 'Duplicate'},
{label: 'Share'},
{label: 'Delete', variant: 'destructive'},
];

const TALL: DropdownMenuOption[] = Array.from({length: 40}, (_, index) => ({
label: `Project ${index + 1}`,
}));

const WIDE: DropdownMenuOption[] = [
{
label: 'Export the whole workspace as a spreadsheet',
description: 'Every table, with its filters and hidden columns',
},
{
label: 'Copy a link that opens this exact view',
description: 'Sorting, grouping and the scroll position travel with it',
},
{
label: 'Send a weekly summary to the team channel',
description: 'Every Monday morning, in the channel time zone',
},
];

function section(title: string, labels: string[]): DropdownMenuOption {
return {type: 'section', title, items: labels.map(label => ({label}))};
}

const FILTERS: DropdownMenuOption[] = [
section('Status', ['Open', 'In progress', 'In review', 'Blocked', 'Done']),
{type: 'divider'},
section('Priority', ['Urgent', 'High', 'Medium', 'Low']),
{type: 'divider'},
section('Owner', [
'Anyone',
'Me',
'My team',
'Unassigned',
'Recently active',
'Former members',
]),
{type: 'divider'},
section('Labels', [
'Bug',
'Feature',
'Design',
'Docs',
'Performance',
'Accessibility',
'Security',
'Mobile',
]),
];

const NESTED: DropdownMenuOption[] = [
{label: 'New file'},
{
label: 'Move to',
items: [
{label: 'Inbox'},
{
label: 'Projects',
items: [
{label: 'Website'},
{label: 'Mobile app'},
{
label: 'Archive',
items: [{label: '2024'}, {label: '2025'}, {label: '2026'}],
},
],
},
{label: 'Shared with me'},
],
},
{
label: 'Share',
items: [{label: 'Copy link'}, {label: 'Email'}, {label: 'Message'}],
},
{label: 'Delete', variant: 'destructive'},
];

const FILLER = Array.from({length: 12}, (_, index) => `Row ${index + 1}`);

function Filler() {
return (
<VStack gap={2}>
{FILLER.map(row => (
<Text key={row} color="secondary">
{row}
</Text>
))}
</VStack>
);
}

function Case({title, children}: {title: string; children: React.ReactNode}) {
return (
<VStack gap={2}>
<Text weight="semibold">{title}</Text>
{children}
</VStack>
);
}

export default function MenuGrowCasesPage() {
return (
<VStack gap={6} padding={4}>
<HStack justify="between">
<DropdownMenu button={{label: 'Top left'}} items={SHORT} />
<DropdownMenu
button={{label: 'Top right'}}
items={SHORT}
alignment="end"
/>
</HStack>
<VStack gap={1}>
<Heading level={1}>Menu grow cases</Heading>
<Text color="secondary">
Tap or hold each trigger: the menu grows out of it and shrinks back
into it. The Popover below grows the same way.
</Text>
</VStack>
<Case title="A tall menu that scrolls (40 rows)">
<DropdownMenu button={{label: 'Projects'}} items={TALL} />
</Case>
<Case title="A wide menu">
<DropdownMenu button={{label: 'Export'}} items={WIDE} menuWidth={360} />
</Case>
<Case title="A filter menu with many rows in sections">
<DropdownMenu
button={{label: 'Filters'}}
items={FILTERS}
menuMaxHeight={520}
/>
</Case>
<Filler />
<Case title="Nested sub-menus">
<DropdownMenu button={{label: 'File'}} items={NESTED} />
</Case>
<Case title="A Popover, for comparison">
<Popover
label="Filter"
width={280}
content={
<VStack gap={2} padding={3}>
<Text weight="semibold">Filter</Text>
{['Open', 'In progress', 'In review', 'Done'].map(label => (
<Text key={label}>{label}</Text>
))}
</VStack>
}>
<Button label="Popover" />
</Popover>
</Case>
<Case title="At the side edges">
<HStack justify="between">
<DropdownMenu button={{label: 'Left edge'}} items={FILTERS} />
<DropdownMenu
button={{label: 'Right edge'}}
items={WIDE}
alignment="end"
/>
</HStack>
</Case>
<Filler />
<Case title="At the bottom: scroll to the end, and it flips above">
<HStack justify="between">
<DropdownMenu button={{label: 'Bottom left'}} items={FILTERS} />
<DropdownMenu
button={{label: 'Bottom right'}}
items={NESTED}
alignment="end"
/>
</HStack>
</Case>
</VStack>
);
}
46 changes: 46 additions & 0 deletions apps/sandbox/src/app/(raw)/pages/mobile-keyboard-fields/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.

/**
* @file page.tsx
* @position Mobile keyboard fields: an unframed page for checking fields with
* a phone's on-screen keyboard. The document itself scrolls, with no inner
* scroll box, and the fields sit in the middle of the page.
* @input TextInput, NumberInput and TextArea
* @output A tall page with three fields between an intro and a tail
*/

'use client';

import {useState} from 'react';
import * as stylex from '@stylexjs/stylex';
import {VStack} from '@astryxdesign/core/Layout';
import {NumberInput} from '@astryxdesign/core/NumberInput';
import {Heading, Text} from '@astryxdesign/core/Text';
import {TextArea} from '@astryxdesign/core/TextArea';
import {TextInput} from '@astryxdesign/core/TextInput';

const styles = stylex.create({
intro: {minHeight: '60dvh'},
tail: {minHeight: '60dvh'},
});

export default function MobileKeyboardFieldsPage() {
const [title, setTitle] = useState('');
const [quantity, setQuantity] = useState<number | null>(null);
const [notes, setNotes] = useState('');
return (
<VStack gap={4} padding={4}>
<VStack gap={2} xstyle={styles.intro}>
<Heading level={3}>Mobile keyboard</Heading>
<Text type="supporting" color="secondary">
Focus a field in the middle of the page, then close the keyboard. The
page scrolls the field above the keyboard, and back when it closes.
</Text>
</VStack>
<TextInput label="Title" value={title} onChange={setTitle} />
<NumberInput label="Quantity" value={quantity} onChange={setQuantity} />
<TextArea label="Notes" value={notes} onChange={setNotes} />
<VStack xstyle={styles.tail} />
</VStack>
);
}
6 changes: 6 additions & 0 deletions apps/sandbox/src/app/sandboxPages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export const categories: SandboxCategory[] = [
description:
'A pushed NavigationStack screen with a Done row or a strip at its edge, and a RefreshControl list, on a page that scrolls with the document, to check taps and pulls on a phone',
},
{
name: 'Menu Grow Cases',
href: '/pages/menu-grow-cases/',
description:
'Large DropdownMenus and a Popover that grow out of their trigger: tall, wide, many rows, nested, at the edges and flipped, on a page that scrolls with the document',
},
{
name: 'List Reorder Cases',
href: '/pages/list-reorder-cases/',
Expand Down
Loading