You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d0bb7e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ContextMenu): a held finger opens the menu at UIKit's long press, with none of the hold options meta#8670 cut (spec:AST-094 FR43)
meta#8670 cuts the context request's two-stage hold (commitMs, requestMs,
requestOnLift), allowableMovement and isPerAxis, as asked there: the hold
is UIKit's long press and requests as it begins. ContextMenu and the
factory passed them for UIContextMenuInteraction's 400 ms commit, 735 ms
menu, open at a lift and 11.5 pt on each axis. They pass none now: under
any primary pointer a held finger gets the menu at 500 ms, a lift before
it is a tap, and a drift past 10 pt (a distance) opens nothing. Under the
touch model the commit, now the long press, plays the haptic and the
press feedback plays UIKit's press curve until the menu shows.
The UIKit table's per-axis drift guess has no reader left and goes. The
tests, the interaction specs, the docs, the story and the changesets
that described the two-stage hold describe the long press; the tests of
a lift after the commit and of a drag between the commit and the menu
go with that window.
Copy file name to clipboardExpand all lines: .changeset/contextmenu-press-constants.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,6 @@
3
3
'@astryxdesign/cli': patch
4
4
---
5
5
6
-
[chore] The UIKit constants table gains ContextMenu's touch timeline as measured on iOS 26.2: the press feedback starts at 150 ms, the press commits at 400 ms, and the menu displays at 735 ms. It also records the drift tolerance, and the press feedback's growth, spring and display latency. A closed-form press-feedback curve, checked against UIKit's per-frame presentation, comes with them. ContextMenu's touch timeline uses them.
6
+
[chore] The UIKit constants table gains ContextMenu's touch timeline as measured on iOS 26.2: the press feedback starts at 150 ms, the press commits at 400 ms, and the menu displays at 735 ms. It also records the press feedback's growth, spring and display latency. A closed-form press-feedback curve, checked against UIKit's per-frame presentation, comes with them. ContextMenu's press feedback uses them.
Copy file name to clipboardExpand all lines: .changeset/contextmenu-touch-timeline.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
'@astryxdesign/core': patch
3
3
---
4
4
5
-
[feat] ContextMenu opens from a held finger on iOS 26's measured timeline, on every touch device (a coarse primary pointer, iOS and Android alike). The trigger starts to grow at 150 ms (the onset of core's one press machine), following UIKit's measured press curve on the compositor, and the hold runs on the trigger's context request with UIKit's measured moments. At 400 ms the press takes the finger: its lift no longer sends a click, and the page cannot scroll under it. The menu opens at 735 ms if the finger is still down, or as soon as it lifts after 400 ms. A finger that lifts before 400 ms, or drifts more than 11.5 px on either axis before the menu opens, gets no menu, and the trigger springs back. The page stays still while the menu is up, and the trigger returns to its size when the menu closes. A touch open lights no row: the menu takes the focus, and a row lights only under the finger, as in UIKit (keyboard and pointer opens still focus the first item). A second finger cancels the press, and Android's own long-press menu no longer opens a second menu. A fine pointer (a mouse) keeps the right-click menu, and UIKit's timeline stays off there.
5
+
[feat] ContextMenu opens from a held finger as on iOS, on every touch device (a coarse primary pointer, iOS and Android alike). The trigger starts to grow at 150 ms (the onset of core's one press machine), following UIKit's measured press curve on the compositor, and the hold is the trigger's context request: UIKit's long press. At 500 ms the press takes the finger and the menu opens: its lift sends no click, and the page cannot scroll under it. A finger that lifts before 500 ms, or drifts more than 10 px before it, gets no menu, and the trigger springs back. The page stays still while the menu is up, and the trigger returns to its size when the menu closes. A touch open lights no row: the menu takes the focus, and a row lights only under the finger, as in UIKit (keyboard and pointer opens still focus the first item). A second finger cancels the press, and Android's own long-press menu no longer opens a second menu. A fine pointer (a mouse) keeps the right-click menu, with no press feedback.
Copy file name to clipboardExpand all lines: apps/storybook/stories/ContextMenu.stories.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -611,7 +611,7 @@ export const TouchLongPress: Story = {
611
611
docs: {
612
612
description: {
613
613
story:
614
-
'On a touch screen (iOS or Android), hold a finger on the card. As on iOS, it starts to grow after 150 ms, a haptic plays at 400 ms where the device can play one, and the menu opens at 735 ms, or as soon as the finger lifts after 400 ms. A finger that lifts before 400 ms, or drifts more than 11.5 px on either axis before the menu opens, gets no menu, and the card springs back. While the menu is up the page stays still, and the card returns to its size when the menu closes.',
614
+
'On a touch screen (iOS or Android), hold a finger on the card. As on iOS, it starts to grow after 150 ms; at 500 ms, UIKit’s long press, a haptic plays where the device can play one and the menu opens. A finger that lifts before 500 ms, or drifts more than 10 px before it, gets no menu, and the card springs back. While the menu is up the page stays still, and the card returns to its size when the menu closes.',
615
615
},
616
616
},
617
617
},
@@ -642,7 +642,7 @@ export const TouchLongPressPopover: Story = {
642
642
docs: {
643
643
description: {
644
644
story:
645
-
'With `presentation="popover"`, ContextMenu keeps today’s menu on every device: a finger held for 500 ms opens it at the finger, with no growth and no iOS timeline. A finger on a device whose primary pointer is fine (a mouse or a trackpad) gets the same long press.',
645
+
'With `presentation="popover"`, ContextMenu keeps today’s menu on every device: a finger held for 500 ms opens it at the finger, with no growth. A finger on a device whose primary pointer is fine (a mouse or a trackpad) gets the same long press.',
Copy file name to clipboardExpand all lines: packages/core/src/ContextMenu/ContextMenu.doc.mjs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ export const docs = {
159
159
usage: {
160
160
anatomy,
161
161
description:
162
-
'A right-click context menu that appears at the cursor position. Use to provide contextual actions for specific elements or regions without cluttering the UI with visible buttons. Under a finger, on every touch device, a held finger opens it with iOS timing: the trigger starts to grow at 150 ms, and the menu opens at 735 ms, or as soon as the finger lifts after 400 ms. A block trigger then lifts out of the page, as on iOS: it grows about 13% over a tinted backdrop, and the menu grows out of the finger to sit beside it, below when it fits and above otherwise.',
162
+
'A right-click context menu that appears at the cursor position. Use to provide contextual actions for specific elements or regions without cluttering the UI with visible buttons. Under a finger, on every touch device, a held finger opens it at UIKit’s long press, 500 ms; the trigger starts to grow at 150 ms, as on iOS. A block trigger then lifts out of the page, as on iOS: it grows about 13% over a tinted backdrop, and the menu grows out of the finger to sit beside it, below when it fits and above otherwise.',
'A right-click context menu that appears at the cursor position. Use to provide contextual actions for specific elements or regions. Under a finger (any touch device): a held finger opens it at 735 ms, or on a lift after 400 ms; the trigger grows from 150 ms, then a block trigger lifts (about 13%) over a tint with the menu below or above it.',
272
+
'A right-click context menu that appears at the cursor position. Use to provide contextual actions for specific elements or regions. Under a finger (any touch device): a held finger opens it at 500 ms (UIKit’s long press); the trigger grows from 150 ms, then a block trigger lifts (about 13%) over a tint with the menu below or above it.',
273
273
bestPractices: [
274
274
{guidance: true, description: 'Keep items concise and action-oriented.'},
0 commit comments