Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 578373e |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Changes requested. The spec side is settled: an engineering owner approved ContextMenu FR11 at this head. Each item below still needs a fix before this can merge.
- The growth and its early-lift return read the generic
--duration-medium,--duration-fastand--ease-movetokens, whichspec:AST-094FR4 does not allow for touch motion ("MUST be a motion role named for its use"), so amend FR4 in this pull request or move the growth onto named motion roles. - If
isDisabledturns true while a finger-opened menu is up, the touch layer unmounts and disposes its animator without restoring the trigger's inlinescale, so the trigger stays about 7% larger after the menu closes (contextMenuPressFeedback.ts, the unmount cleanup). - ContextMenu now has two outside-press paths, the shared
watchOutsidePressfor touch and its ownmousedownEffect with a different shadow-root rule for everything else, so extend the shared watch to close at the press for a mouse and a pen and delete the Effect (architecture:react-component-runtimeINV16). useContextMenuPressFeedbackruns its own attach, replace and dispose lifecycle for its animator and press observer, so move both ontouseAttachment, which the same layer'suseGestureRecognizeralready uses.- The outside-press changeset says "No component passes these options yet", but ContextMenu passes all three at this head, so reword it.
- The diff against
mainis 4,013 authored lines because it carries #9814 and #8125, so land those first or base this branch on #8125 to leave this pull request's own 1,915 lines.
A few smaller comment and wording notes are inline.
[Automated review]
578373e to
0d1fdb7
Compare
|
/approve-spec 0d1fdb7 |
There was a problem hiding this comment.
Changes requested. The spec side is settled: an engineering owner approved ContextMenu FR11, and that approval still covers this head.
- The growth and its early-lift return play the generic
--duration-medium,--duration-fastand--ease-movetokens, whichspec:AST-094FR1 and FR4 do not yet allow for touch motion, so rebase after #9706 lands and cite its FR45 in FR11, or amend FR1 and FR4 here. ContextMenuTouchLayersubscribes to its recognizer's transitions from an Effect whose only dependency never changes, so add that listener in the recognizer factory passed touseGestureRecognizerand delete the Effect.ContextMenuPressRecognizergains anonPressStartoption that only a unit test passes, and its doc says the press feedback starts from it, so remove the option.- The diff against
mainis 4,132 authored lines because it carries #9814 and #8125, so land those first, or declare the stack with one identicalStack: #9814 → #8125 → #9816line in all three descriptions.
Thanks for fixing the stuck trigger scale and moving the press feedback onto useAttachment. The changeset and the story still say the trigger "springs back" after an early lift, which FR11 now times as a curve on the theme's tokens.
[Automated review]
0d1fdb7 to
caf271c
Compare
|
/approve-spec caf271c |
There was a problem hiding this comment.
Changes requested for this stack: #8125 is ready, and #9814 and #9816 each need one fix. A pull request lands only when it and every pull request below it are approved.
#9814: changes requested
- Miss: the title and
.changeset/outside-press-pan-watch.mdsay the watch can now "judge a press inside a shadow root", but a press inside an open shadow root was already judged through the event's composed path and every new test uses a closed root, so please say "closed shadow root" in both.
#8125: approved
Approved pending CI: CI has not run on this head yet, and it lands after #9814.
#9816: changes requested
- Miss:
PressTimingandtimedCurveincontextMenuPressTiming.ts, andthemeTimingincontextMenuPressFeedback.ts, copyThemeTiming,timedCurveandthemeTimingOffromSegmentedControl/useSegmentedSelectionMotion.ts, so please move them into one shared motion module that both components call. - Non-blocking: ContextMenu FR11 at this head no longer cites the measurement behind the 400 ms commit and 735 ms display, or the tests that verify them, which #8125's FR11 did.
Whole stack
The combined change adds no public API and follows spec:AST-094 and ContextMenu FR11, but it passes only once the two fixes above land.
[Automated review]
b168c85 to
037a530
Compare
|
/approve-spec 037a530 |
FR12 said "a finger that lands before the touch layer has loaded", which the knowledge check reads as project status and warns on. It now says "a finger down before", with the same meaning.
AST-094's late-begin evidence row said "a finger that lands before its recognizer attaches", which the knowledge check reads as project status and warns on. It now says "a finger down before", with the same meaning.
The record's current-state note still said ContextMenu owns its outside-press listener. Its outside press now goes through the shared outside-press watch, for a mouse and a finger alike. The note now says so: ContextMenu owns its invocation and open state, and it closes on an outside press through that watch, against AST-107 FR8.
|
|
|
/approve-spec b31c5fd |
There was a problem hiding this comment.
Changes requested. The record changes are owner-approved at this head, and clipping, ringed, badged and scrolling div triggers draw exactly as on main under a mouse and under a finger (checked locally at this head in Chromium). Three things still block.
Required
- The touch layer reads the trigger's
text-overflowonly when it mounts and when the trigger's class changes (ContextMenuTouchLayer.tsx:121-135), so a truncation set by a media or container query or a StyleX dynamic style loses its ellipsis under a finger after it changes (reproduced locally at this head with a dynamic style): read it again at each commit and when the viewport or container changes, or bound the description to atext-overflowthe trigger's class sets. - The description's "a box only where the hold grows it" is broader than the code, because under Reduce Motion the inner box is still a box that never grows; say "a box once the touch layer has loaded for a block trigger whose menu opens at the finger".
- At the head that lands, state in the description the touch-presentation spec's real-device iOS run and its Android runs (Chrome with Gboard, animations at normal scale and removed, plus a slow-device profile), because the earlier runs do not carry over the
ContextMenu.tsxandContextMenuTouchLayer.tsxchanges at this head.
Approval
A new commit voids the record approval, so an engineering owner comments /approve-spec with the full SHA of the head that lands; the author may do so as an engineering owner.
Non-blocking
Layer/outsidePress.ts:281adds a documentmousedownlistener in Layer that only ContextMenu uses; the comment notes ontoTriggerLocaland the 28-word Android comment stand, as you said, for a follow-up.
Claims and files checked
Review mode: same-head; reason: none
Changed rules (0): none
Claims:
- Title (live): feat(ContextMenu): a held finger grows a block trigger on UIKit's lift spring — verified (
contextMenuPressFeedback.tsplays the lift spring;ContextMenu.tsxgives only a block trigger at the finger a growing box) - Description: the growth starts at the first frame at or after the hold's start plus 150 ms, from rest, toward 1.0735 on the lift spring; an earlier finger's hold starts at the load — verified (frame watch from the landing plus 150 ms; late touch begun as the touch layer mounts)
- Description: it returns on the dismiss spring when the hold ends with no menu or the menu closes, and holds while the menu is up — verified (
end,releaseandholdin the press feedback) - Description: none inline, behind a sheet or under Reduce Motion; a nested trigger grows alone; an enabled touch-model trigger joins core's press machine — verified
- Description: the growth scales an inner box, a box only where the hold grows it — false: under Reduce Motion the box is still a box and never grows
- Description: the menu's anchor stays on the untransformed trigger — verified (the cursor anchor sits outside the box; the INV22 browser case)
- Description: no API change of its own; the omitted
presentationfollows the touch model as the records already state, andpopoverkeeps the released behavior — verified (one changed default in the API surface comparison run locally at this head) - Description: a block trigger grows about 7% and its docs ask for room; the motion engine loads with the touch layer — verified (
ContextMenu.doc.mjs; the animator is imported only through the touch layer) - Description: a late frame starts the grow-in from rest; the springs play on the compositor — verified
- Description (Testing): the visual is no box unless the hold can grow it, and stays the same element — verified
- Description (Testing): there the visual takes the trigger's overflow only when the trigger cuts its own text, so the ellipsis stays — false: a
text-overflowthat changes without a class change is never read again (reproduced locally at this head) - Description (Testing): the touch layer reads that, so the first load carries none of it — verified
- Description: line counts over the touch-hold pull request — verified
- Description: first-load sizes, local test, browser and simulator runs, and earlier device runs — reported
- Description: device takes at this head have not run — verified (the missing evidence above)
- Touch-timeline release note: the measured timeline, growth from 150 ms, no growth under Reduce Motion, the 400/735 ms moments, the drift and second-finger rules, the deferred load and the failed-load long press — verified; its new wording (keyboard and pointer opens of a popover menu focus the first item; the next touch asks for the code again) — verified
- Arena release note: a late deadline waits 50 ms when its timer is more than 17 ms late while the latest contact is a finger or a pen; finger or pen input over 33 ms late keeps it waiting 50 ms more; a mouse never makes it wait 50 ms; a deadline among coalesced samples runs between them — verified (
GestureArena.tstimer and late-input logic) - Outside-press release note: a popover menu closes through the layer's outside-press watch, a bottom-sheet menu as BottomSheet does, and a mouse or pen closes it at its
mousedownin the menu's own document — verified - Description (internal API): the private trigger mark's owner module marks a trigger while its press feedback is attached, returns the unmark call, and finds the trigger a press belongs to — verified (
privateAttributes/contextMenuTrigger.stylex.ts;contextMenuPressFeedback.ts:262,:281) - Description (internal API): the growth hook is used only by the touch layer — verified (a search of the head's packages and apps finds one caller,
ContextMenuTouchLayer.tsx:109, beside its own test) - Description: core's press machine marks late inside a scroll view and never for a press that travels past 10 px — reported (the author's reason for timing from the landing)
- Description (Scope): public text and artifacts carry no internal context — verified (no match in the title, body, branch or commit messages)
Files:
.changeset/contextmenu-outside-press-watch.md— clear.changeset/contextmenu-touch-timeline.md— clear.changeset/gesture-arena-late-input.md— clearapps/storybook/stories/ContextMenu.stories.tsx— cleardocs/architecture/layer-runtime.md— clear (owner-approved at this head)docs/specs/AST-094-touch-presentations/spec.md— clear (owner-approved at this head)docs/specs/components/ContextMenu/ContextMenu.spec.md— clear (owner-approved at this head)internal/eslint-plugin-astryx/no-comment-provenance.baseline.json— clearpackages/core/src/ContextMenu/ContextMenu.doc.mjs— clearpackages/core/src/ContextMenu/ContextMenu.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.touchLoadFailure.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.triggerProps.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.tsx— clear (the box fix holds; non-blocking comment notes carried)packages/core/src/ContextMenu/ContextMenuTouchGrowth.test.tsx— clearpackages/core/src/ContextMenu/ContextMenuTouchLayer.tsx— finding:text-overflowre-read only on a class changepackages/core/src/ContextMenu/ContextMenuTouchLayerProps.test.tsx— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.interaction.browser.spec.ts— clear (its pixel pairs set notext-overflowafter load)packages/core/src/ContextMenu/__tests__/ContextMenuLongPressLink.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/contextMenuPress.test.ts— clearpackages/core/src/ContextMenu/contextMenuPress.ts— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.test.tsx— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.ts— clearpackages/core/src/ContextMenu/contextMenuTouchLoader.boundary.test.ts— clearpackages/core/src/ContextMenu/contextMenuTouchLoader.ts— clearpackages/core/src/Indicator/boxHold.test.tsx— clearpackages/core/src/Layer/outsidePress.test.ts— clearpackages/core/src/Layer/outsidePress.ts— clear (behavior tag-along note only)packages/core/src/Layer/useLayer.test.tsx— clearpackages/core/src/Layer/useLayer.tsx— clearpackages/core/src/Table/__tests__/TableCellMenus.a11y.browser.spec.ts— clearpackages/core/src/gestures/GestureArena.ts— clearpackages/core/src/gestures/GestureHost.ts— clearpackages/core/src/gestures/__tests__/GestureHost.test.ts— clearpackages/core/src/gestures/__tests__/arena.test.ts— clearpackages/core/src/gestures/__tests__/arenaTimersAndClaims.test.ts— clearpackages/core/src/gestures/__tests__/harness.ts— clearpackages/core/src/gestures/types.ts— clearpackages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts— clearpackages/core/src/hooks/usePager.test.ts— clearpackages/core/src/motion/README.md— clearpackages/core/src/motion/uikit/contextMenu.ts— clear (named by owner-approved lines)packages/core/src/privateAttributes/contextMenuTrigger.stylex.ts— clear (named by owner-approved lines)packages/lab/src/PageControl/__tests__/PageControl.interaction.browser.spec.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.test.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.ts— clearscripts/shared-identity.baseline.json— clear
The touch timeline's note said the page stays free to scroll while the menu is up. A bottom-sheet menu's scrim locks the page's scroll, so the note now says that of a popover menu, as the outside-press note does.
The touch layer read whether the trigger cuts its own text only as it mounted and when the trigger's class changed. A cut that a media query starts after the load then lost its ellipsis under the touch model. The trigger-layouts story gains a trigger that cuts its text only in a narrow viewport, beside a plain box with the same style. The spec loads the touch layer in a wide viewport, narrows it, and compares the pair's pixels. It fails here.
The touch layer read whether the trigger cuts its own text only as it mounted and when the trigger's class changed. A cut that a media or container query or a dynamic style starts later lost its ellipsis under the touch model. The layer now reads it at each commit, when the trigger resizes and when the window resizes; the window's resize comes through core's shared input stream. The read stays in the touch layer, so the first load carries none of it. The visual's comments now say where it is a box: once the touch layer has loaded, for a block trigger whose menu opens at the finger.
The comment on the arena's latest-contact flag opened by restating the field's name. It now says only what the name does not: a late deadline waits for queued input only while the flag is true, and a mouse keeps the one-task yield.
The comment on a touch's input samples said "the arena's clock never runs back, so it holds a late input's time", where "it" reads as the clock. The arena holds that time and filters the samples, and it leaves the input's positions as they came. The comment now names the arena as the subject of each sentence.
There was a problem hiding this comment.
Changes requested: the text-overflow read and the box wording from the last review are fixed, and three things still block.
Required
- Miss: a finger held on a part of a block trigger that sits in a shadow root (a web component child) opens the menu but never grows the trigger, because
closestContextMenuTriggeruseselement.closest(), which stops at the shadow root (privateAttributes/contextMenuTrigger.stylex.ts:26, reached fromcontextMenuPressFeedback.ts:281; reproduced locally with a unit probe), so walk the flat tree there and add a case with a shadow-root child. - The description's "a class, a dynamic style, a media query, or a container query on a trigger that resizes with its container is read" is broader than the code, which reads only at a commit or a resize, so a media feature that changes with no resize (
prefers-contrast,prefers-color-scheme,forced-colors) or a class set through the forwardedrefis not read; bound it to "a class or dynamic style ContextMenu renders, a media query on the viewport's size, or a container query on a trigger that resizes with its container". - At the head that lands, state in the description the touch-presentation spec's real-device iOS run and its Android runs (Chrome with Gboard, animations at normal scale and removed, plus a slow-device profile), because the earlier runs do not carry over this round's
ContextMenuTouchLayer.tsxchange.
A new commit voids the record approval, so an engineering owner comments /approve-spec with the full SHA of the head that lands; the author may do so as an engineering owner.
Non-blocking
Layer/outsidePress.ts:281adds a documentmousedownlistener in Layer that only ContextMenu uses; the comment notes ontoTriggerLocaland the Android comment stand, as you said, for a follow-up.
Claims and files checked
Review mode: incremental; reason: none
Changed rules (2): Claim bounding in one round (edited); For a claim about focus, events or DOM placement (new)
- Claim bounding in one round: finding (both falsifying cases of the text-overflow claim, and the shadow-root growth case marked as missed by earlier reviews)
- For a claim about focus, events or DOM placement: finding (the shadow-root case falsifies the growth and nested-trigger claims); checked the touch-timeline and outside-press notes and the description's anchor and nested-trigger claims against an unfocused, SVG, second-document, shadow-root, disabled or removed opener, a stacked surface and a focus-target prop (ContextMenu has none)
Claims:
- Title (live): a held finger grows a block trigger on UIKit's lift spring — false for a finger on a shadow-root part of the trigger (first finding); otherwise verified (the press feedback plays the lift spring on the trigger's visual)
- Description: the growth starts at the first frame at or after the landing plus 150 ms, toward 1.0735 on the lift spring — verified (growth unit cases, run locally)
- Description: it returns on the dismiss spring when the hold ends with no menu or the menu closes, and holds while the menu is up — verified (
end,releaseandholdin the press feedback; unit cases) - Description: no growth inline, behind a sheet or under Reduce Motion — verified (
isShown, the reduced-motion check at the onset) - Description: a nested trigger grows alone — verified for nesting in the light DOM; a press inside a shadow root grows no trigger at all (first finding)
- Description: an enabled touch-model trigger joins core's press machine — verified (
pressablePropsunder the touch model) - Description: the growth scales an inner box, a box once the touch layer has loaded for a block trigger whose menu opens at the finger — verified (
growsVisual) - Description: the menu's anchor stays on the untransformed trigger — verified (the cursor anchor sits outside the visual)
- Description: no API change of its own; the omitted
presentationfollows the touch model andpopoverkeeps the released behavior — verified (one changed default) - Description: a block trigger grows about 7% and its docs ask for room; the motion engine loads with the touch layer — verified (the docs; the touch-loader boundary test, run locally)
- Description: a late frame starts the grow-in from rest; the springs play on the compositor — verified
- Description (Testing): the touch layer reads the cut at each commit, when the trigger resizes and when the window resizes, through the shared input stream — verified (the touch layer's layout effect, resize observer and window resize subscription)
- Description (Testing): so a class, a dynamic style, a media query or a container query on a trigger that resizes with its container is read — false (second finding)
- Description (Testing): the read stays in the touch layer, so the first load carries none of it — verified (the boundary test, run locally)
- Description (Testing): the three merges resolve as described and leave this pull request's own diff otherwise unchanged — verified (merge diffs and the patch comparison)
- Description: first-load sizes, red-first and green browser runs, preflight counts, simulator and earlier device runs — reported
- Description: no device takes at this head — verified (the missing evidence above)
- Description (internal API): the trigger mark's owner module marks a trigger while its feedback is attached and finds the trigger a press belongs to — false for a press inside a shadow root (first finding)
- Description (internal API): the growth hook is used only by the touch layer — verified (a search of the head's packages and apps finds one caller beside its own test)
- Description: core's press machine marks late inside a scroll view and never past 10 px — reported
- Description (Scope): public text and artifacts carry no internal context — verified
- Touch-timeline note: the measured timeline, growth from 150 ms, no growth under Reduce Motion, the 400/735 ms moments, the drift and second-finger rules, the deferred load and the failed-load long press; while a popover menu is up the page stays free to scroll — verified
- Arena note: the late-deadline waits for a finger or a pen, none for a mouse, and a deadline among coalesced samples runs between them — verified (the arena's timer and late-input logic; gesture units, run locally)
- Outside-press note: a popover menu closes through the layer's outside-press watch, a mouse or pen at its mousedown in the menu's own document, so a menu in an iframe or a Picture-in-Picture window no longer closes on a press in the page — verified (the second-document unit case; the same document path serves a Picture-in-Picture window; main listened on the page's document)
Files:
.changeset/contextmenu-outside-press-watch.md— clear.changeset/contextmenu-touch-timeline.md— clear (the popover-only scroll wording holds).changeset/gesture-arena-late-input.md— clearapps/storybook/stories/ContextMenu.stories.tsx— clear (the narrow-viewport cut case)docs/architecture/layer-runtime.md— clear (owner-approved)docs/specs/AST-094-touch-presentations/spec.md— clear (owner-approved)docs/specs/components/ContextMenu/ContextMenu.spec.md— clear (owner-approved)internal/eslint-plugin-astryx/no-comment-provenance.baseline.json— clearpackages/core/src/ContextMenu/ContextMenu.doc.mjs— clearpackages/core/src/ContextMenu/ContextMenu.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.touchLoadFailure.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.triggerProps.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.tsx— clear (non-blocking comment notes carried)packages/core/src/ContextMenu/ContextMenuTouchGrowth.test.tsx— gap: no case presses a shadow-root part of the triggerpackages/core/src/ContextMenu/ContextMenuTouchLayer.tsx— clear (the text-overflow read is fixed; the description over-claims it)packages/core/src/ContextMenu/ContextMenuTouchLayerProps.test.tsx— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.interaction.browser.spec.ts— clear (the narrowed-viewport pair)packages/core/src/ContextMenu/__tests__/ContextMenuLongPressLink.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/contextMenuPress.test.ts— clearpackages/core/src/ContextMenu/contextMenuPress.ts— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.test.tsx— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.ts— finding: the onset check misses a shadow-root targetpackages/core/src/ContextMenu/contextMenuTouchLoader.boundary.test.ts— clearpackages/core/src/ContextMenu/contextMenuTouchLoader.ts— clearpackages/core/src/Indicator/boxHold.test.tsx— clearpackages/core/src/Layer/outsidePress.test.ts— clearpackages/core/src/Layer/outsidePress.ts— clear (behavior tag-along note only)packages/core/src/Layer/useLayer.test.tsx— clearpackages/core/src/Layer/useLayer.tsx— clearpackages/core/src/Table/__tests__/TableCellMenus.a11y.browser.spec.ts— clearpackages/core/src/gestures/GestureArena.ts— clear (comment edit)packages/core/src/gestures/GestureHost.ts— clearpackages/core/src/gestures/__tests__/GestureHost.test.ts— clearpackages/core/src/gestures/__tests__/arena.test.ts— clearpackages/core/src/gestures/__tests__/arenaTimersAndClaims.test.ts— clearpackages/core/src/gestures/__tests__/harness.ts— clearpackages/core/src/gestures/types.ts— clear (comment edit)packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts— clearpackages/core/src/hooks/usePager.test.ts— clearpackages/core/src/motion/README.md— clearpackages/core/src/motion/uikit/contextMenu.ts— clear (named by owner-approved lines)packages/core/src/privateAttributes/contextMenuTrigger.stylex.ts— finding:closestContextMenuTriggerstops at a shadow rootpackages/lab/src/PageControl/__tests__/PageControl.interaction.browser.spec.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.test.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.ts— clearscripts/shared-identity.baseline.json— clear
|
/approve-spec 382d939 |
A finger held on a block trigger's child that renders inside an open shadow root opens the menu, but the trigger never grows: the press feedback finds the trigger a landing belongs to with `closest`, which stops at the shadow root. A unit case lands on a control inside a shadow root in the trigger. The touch stories gain a card whose label renders inside an open shadow root, and the long-press spec holds a finger on it and reads the trigger's growth. Both fail here.
The press feedback finds the trigger a landing belongs to with `closest`, which stops at a shadow root. A finger held on a trigger's child inside a shadow root opened the menu, but the trigger never grew. The lookup now goes on from each shadow root's host, open or closed, so the innermost trigger at or above the landing is found.
|
/approve-spec 031f8e1 |
There was a problem hiding this comment.
Changes requested: the record changes are approved by an engineering owner for this head, and two things still block.
Required
- A finger held on content slotted into a trigger (ContextMenu rendered inside a web component's shadow root around a
<slot>) opens the menu but never grows that trigger, and grows an outer trigger instead when the web component sits inside one, becauseclosestContextMenuTriggerclimbs onlyclosest()and shadow hosts while the gesture host routes the touch through the slot (privateAttributes/contextMenuTrigger.stylex.ts:33-43; reproduced locally with a unit probe), so walkparentAcrossShadowfromutils/flatTreethere and add slotted-content cases, alone and inside an outer trigger. - At the head that lands, state in the description the touch-presentation spec's real-device iOS run and its Android runs (Chrome with Gboard, animations at normal scale and removed, plus a slow-device profile), because the earlier runs do not carry over the
contextMenuTrigger.stylex.tschange.
A new commit voids the record approval, so an engineering owner comments /approve-spec with the full SHA of the head that lands; the author may do so as an engineering owner.
Non-blocking
Layer/outsidePress.ts:281adds a documentmousedownlistener in Layer that only ContextMenu uses; thetoTriggerLocalname and the Android comment stand, as you said, for a follow-up.
Claims and files checked
Review mode: same-head; reason: none
Changed rules (0): none
Claims:
- Title (live): feat(ContextMenu): a held finger grows a block trigger on UIKit's lift spring — false for a trigger whose content is slotted in (first finding); otherwise verified (growth unit cases, run locally; an earlier Chromium capture of the shadow-root story at this head)
- Description: the growth starts at the first frame at or after the landing plus 150 ms, toward 1.0735 on the lift spring — verified (growth unit cases, run locally)
- Description: it returns on the dismiss spring when the hold ends with no menu or the menu closes, and holds while the menu is up — verified (
end,releaseandholdin the press feedback; unit cases, run locally) - Description: no growth inline, behind a sheet or under Reduce Motion — verified (
isShown, the reduced-motion check at the onset) - Description: a nested trigger grows alone — verified for light-DOM and shadow-root children; false for slotted content, where no trigger or the outer one grows (first finding; unit probe, run locally)
- Description: an enabled touch-model trigger joins core's press machine — verified (
pressablePropsunder the touch model) - Description: the growth scales an inner box, a box once the touch layer has loaded for a block trigger whose menu opens at the finger — verified (
growsVisual) - Description: the menu's anchor stays on the untransformed trigger — verified (the cursor anchor sits outside the visual)
- Description: no API change of its own; the omitted
presentationfollows the touch model andpopoverkeeps the released behavior — verified (one changed default, from the API report generator at this head) - Description: a block trigger grows about 7% and its docs ask for room; the motion engine loads with the touch layer — verified (the docs; the touch-loader boundary test, run locally)
- Description: a late frame starts the grow-in from rest; the springs play on the compositor — verified
- Description (Testing): the trigger lookup used
closest, which stops at a shadow root — verified - Description (Testing): the lookup goes on from each shadow root's host, open or closed, so it finds the innermost trigger at or above the landing — verified for open and closed shadow roots; false for content slotted into the trigger (first finding)
- Description (Testing): red first, the unit case and the browser spec fail before the fix and pass after it — the unit case passes here, run locally; the fail-before run and the Chromium capture come from an earlier review of this head; the WebKit runs reported
- Description (Testing): the touch layer reads a cut that a commit or a resize starts, and a cut that starts with neither waits for the next one — verified (the touch layer's layout effect, resize observer and window resize subscription)
- Description (Testing): the read stays in the touch layer, so the first load carries none of it — verified (the boundary test, run locally)
- Description (Testing): earlier device runs do not carry, and no device takes exist at this head — verified (the missing evidence above)
- Description: first-load sizes, preflight counts, WebKit counts, simulator and earlier device runs — reported
- Description (internal API): the trigger mark's owner module finds the trigger a press belongs to, out of shadow roots in the trigger too — false for content slotted into the trigger (first finding)
- Description (internal API): the growth hook is used only by the touch layer — verified (one caller beside its own test)
- Description: core's press machine marks late inside a scroll view and never past 10 px — reported
- Description (Scope): public text and artifacts carry no internal context — verified
- Touch-timeline note: the measured timeline, growth from 150 ms, no growth under Reduce Motion, the 400/735 ms moments, the drift and second-finger rules, the deferred load and the failed-load long press whose popover menu focuses its first item; while a popover menu is up the page stays free to scroll — verified
- Arena note: the late-deadline waits for a finger or a pen, none for a mouse, and a deadline among coalesced samples runs between them — verified (gesture units, run locally)
- Outside-press note: a popover menu closes through the layer's outside-press watch, a mouse or pen at its mousedown in the menu's own document — verified (the second-document unit case, run locally)
Files:
.changeset/contextmenu-outside-press-watch.md— clear.changeset/contextmenu-touch-timeline.md— clear.changeset/gesture-arena-late-input.md— clearapps/storybook/stories/ContextMenu.stories.tsx— cleardocs/architecture/layer-runtime.md— clear (owner-approved)docs/specs/AST-094-touch-presentations/spec.md— clear (owner-approved)docs/specs/components/ContextMenu/ContextMenu.spec.md— clear (owner-approved)internal/eslint-plugin-astryx/no-comment-provenance.baseline.json— clearpackages/core/src/ContextMenu/ContextMenu.doc.mjs— clearpackages/core/src/ContextMenu/ContextMenu.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.touchLoadFailure.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.triggerProps.test.tsx— clearpackages/core/src/ContextMenu/ContextMenu.tsx— clear (non-blocking comment notes)packages/core/src/ContextMenu/ContextMenuTouchGrowth.test.tsx— clearpackages/core/src/ContextMenu/ContextMenuTouchLayer.tsx— clearpackages/core/src/ContextMenu/ContextMenuTouchLayerProps.test.tsx— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPress.interaction.browser.spec.ts— clearpackages/core/src/ContextMenu/__tests__/ContextMenuLongPressLink.a11y.chromium.spec.ts— clearpackages/core/src/ContextMenu/contextMenuPress.test.ts— clearpackages/core/src/ContextMenu/contextMenuPress.ts— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.test.tsx— gap: no case lands on content slotted into the triggerpackages/core/src/ContextMenu/contextMenuPressFeedback.ts— finding: the onset check gets no trigger, or the outer one, for slotted contentpackages/core/src/ContextMenu/contextMenuTouchLoader.boundary.test.ts— clearpackages/core/src/ContextMenu/contextMenuTouchLoader.ts— clearpackages/core/src/Indicator/boxHold.test.tsx— clearpackages/core/src/Layer/outsidePress.test.ts— clearpackages/core/src/Layer/outsidePress.ts— clear (behavior tag-along note only)packages/core/src/Layer/useLayer.test.tsx— clearpackages/core/src/Layer/useLayer.tsx— clearpackages/core/src/Table/__tests__/TableCellMenus.a11y.browser.spec.ts— clearpackages/core/src/gestures/GestureArena.ts— clearpackages/core/src/gestures/GestureHost.ts— clearpackages/core/src/gestures/__tests__/GestureHost.test.ts— clearpackages/core/src/gestures/__tests__/arena.test.ts— clearpackages/core/src/gestures/__tests__/arenaTimersAndClaims.test.ts— clearpackages/core/src/gestures/__tests__/harness.ts— clearpackages/core/src/gestures/types.ts— clearpackages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts— clearpackages/core/src/hooks/usePager.test.ts— clearpackages/core/src/motion/README.md— clearpackages/core/src/motion/uikit/contextMenu.ts— clear (named by owner-approved lines)packages/core/src/privateAttributes/contextMenuTrigger.stylex.ts— finding:closestContextMenuTriggernever enters a slotpackages/lab/src/PageControl/__tests__/PageControl.interaction.browser.spec.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.test.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.ts— clearscripts/shared-identity.baseline.json— clear
A web component can render a ContextMenu trigger in its shadow root, around a <slot>, with its own children slotted into the trigger. A finger held on that slotted content opens the menu, but the trigger never grows: the trigger lookup climbs the slotted content's own parents, outside the shadow root, and so never reaches the trigger. A unit case lands on a control slotted into the trigger. The touch stories gain a web component card whose label is slotted into the trigger, and the long-press spec holds a finger on the label and reads the trigger's growth. Both fail here.
The trigger lookup ran `closest` and then went on from each shadow root's host, so it climbed the parents an element has in its own tree. Content slotted into a trigger has its parents outside the shadow root that holds the trigger, so a finger held on it opened the menu, but the trigger never grew. The lookup now follows the flat tree the browser dispatches through, with core's flat-tree parent: slotted content goes to its slot, and a shadow root to its host. A landing inside a shadow root in the trigger still finds it.
|
/approve-spec b337bd9 |
There was a problem hiding this comment.
Changes requested: the description's line counts and Testing notes from the last review are fixed, and an engineering owner approved the record changes for this head; one thing still blocks.
Required
- At the head that lands, state in the description the touch-presentation spec's real-device iOS run and its Android runs (Chrome with Gboard in the emulator or on a real Pixel, animations at normal scale and removed, plus a slow-device profile), because the description now says no device ran here and only plans an iOS check on the preview, and this round's change to
contextMenuTrigger.stylex.tskeeps earlier runs from carrying over.
A new commit voids the record approval, so an engineering owner comments /approve-spec with the full SHA of the head that lands; the author may do so as an engineering owner.
Non-blocking
Layer/outsidePress.ts:281adds a documentmousedownlistener in Layer that only ContextMenu uses; thetoTriggerLocalname and the Android comment stand, as you said, for a follow-up.
Claims and files checked
Review mode: same-head; reason: none
Changed rules: none since the last review of this revision.
Claims:
- Title (live): a held finger grows a block trigger on UIKit's lift spring — verified (growth unit cases, run here)
- The growth starts at the first frame at or after the landing plus 150 ms, toward 1.0735 on the lift spring — verified (the press feedback's onset and spring; unit cases, run here)
- It returns on the dismiss spring when the hold ends with no menu or the menu closes, and holds while the menu is up — verified (
end,releaseandhold; unit cases, run here) - No growth inline, behind a sheet or under Reduce Motion — verified (
isShown, the reduced-motion check at the onset) - A nested trigger grows alone — verified for light-DOM children, children in a shadow root and content slotted into a trigger (unit cases, run here)
- An enabled touch-model trigger joins core's press machine — verified (
pressablePropsunder the touch model) - The growth scales an inner box, a box once the touch layer has loaded for a block trigger whose menu opens at the finger — verified (
growsVisual) - The menu's anchor stays on the untransformed trigger — verified (the cursor anchor sits outside the visual)
- No API change of its own; the omitted
presentationfollows the touch model andpopoverkeeps the released behavior — verified (one changed default, from the API report an earlier review built on both trees of this same code) - A block trigger grows about 7% and its docs ask for room; the motion engine loads with the touch layer — verified (the docs; the touch-loader boundary test, run here)
- A late frame starts the grow-in from rest; the springs play on the compositor — verified (the animation starts at the frame's own time on the compositor animator)
- First-load size figures over the touch-hold pull request — reported
- Simulator results and earlier device runs; no device runs at this head, with an owner iOS check planned on the preview — reported; the device runs are missing (blocking)
- Testing, this round: a web-component story whose shadow root renders the trigger around a slot, a unit case on a slotted control and a long-press case on the slotted label — verified (story, unit case and browser case present)
- Testing, this round: the old lookup climbed the slotted label's own parents; the new one follows the flat tree through a slot and out of a shadow root — verified
- Testing, this round: red-first failures, both engines passing, the preflight, prettier and WebKit counts — reported (the 19-file count is right; the unit cases pass, run here)
- Testing: this round changes the trigger-mark module, so earlier device runs do not carry — verified
- Testing, earlier rounds: the shadow-root lookup, and the touch layer reading a cut that a commit or a resize starts — verified
- Internal API: the trigger-mark module finds the trigger a press belongs to along the flat tree, through a slot and out of a shadow root — verified (a closed shadow root hides its slots from the lookup and from gesture routing alike)
- Internal API: the growth hook is used only by the touch layer, with the usage line shown — verified
- Internal API: core's press machine marks late inside a scroll view and never past 10 px — reported
- Line counts over the touch-hold pull request — verified (all 19 files, figure for figure)
- Scope: public text and artifacts carry no internal context — verified
- Touch-timeline release note: the measured timeline, growth from 150 ms, no growth under Reduce Motion, the 400/735 ms moments, the drift and second-finger rules, the deferred load and the failed-load long press whose popover menu focuses its first item; a menu the hold opens lights no row; the page stays free to scroll under a popover menu — verified
- Arena release note: the late-deadline wait for a finger or a pen, none for a mouse — verified (gesture units, run here)
- Outside-press release note: a popover menu closes through the layer's outside-press watch, a mouse or pen at its mousedown in the menu's own document — verified (Layer units, run here)
Files:
.changeset/contextmenu-outside-press-watch.md— clear.changeset/contextmenu-touch-timeline.md— clear.changeset/gesture-arena-late-input.md— clearapps/storybook/stories/ContextMenu.stories.tsx— clear (slotted-child story)docs/architecture/layer-runtime.md— clear (owner-approved for this head)docs/specs/AST-094-touch-presentations/spec.md— clear (owner-approved for this head)docs/specs/components/ContextMenu/ContextMenu.spec.md— clear (owner-approved for this head)internal/eslint-plugin-astryx/no-comment-provenance.baseline.json— clearpackages/core/src/ContextMenu/ContextMenu.doc.mjs— clearpackages/core/src/ContextMenu/ContextMenu.test.tsx— clear (passes, run here)packages/core/src/ContextMenu/ContextMenu.touchLoadFailure.test.tsx— clear (passes, run here)packages/core/src/ContextMenu/ContextMenu.triggerProps.test.tsx— clear (passes, run here)packages/core/src/ContextMenu/ContextMenu.tsx— clear (non-blocking comment notes)packages/core/src/ContextMenu/ContextMenuTouchGrowth.test.tsx— clear (passes, run here)packages/core/src/ContextMenu/ContextMenuTouchLayer.tsx— clearpackages/core/src/ContextMenu/ContextMenuTouchLayerProps.test.tsx— clear (passes, run here)packages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts— clear (not run here)packages/core/src/ContextMenu/__tests__/ContextMenuLongPress.interaction.browser.spec.ts— clear (slotted case present; not run here)packages/core/src/ContextMenu/__tests__/ContextMenuLongPressLink.a11y.chromium.spec.ts— clear (not run here)packages/core/src/ContextMenu/contextMenuPress.test.ts— clear (passes, run here)packages/core/src/ContextMenu/contextMenuPress.ts— clearpackages/core/src/ContextMenu/contextMenuPressFeedback.test.tsx— clear (slotted case passes, run here)packages/core/src/ContextMenu/contextMenuPressFeedback.ts— clearpackages/core/src/ContextMenu/contextMenuTouchLoader.boundary.test.ts— clear (passes, run here)packages/core/src/ContextMenu/contextMenuTouchLoader.ts— clearpackages/core/src/Indicator/boxHold.test.tsx— clearpackages/core/src/Layer/outsidePress.test.ts— clear (passes, run here)packages/core/src/Layer/outsidePress.ts— clear (behavior tag-along note only)packages/core/src/Layer/useLayer.test.tsx— clear (passes, run here)packages/core/src/Layer/useLayer.tsx— clearpackages/core/src/Table/__tests__/TableCellMenus.a11y.browser.spec.ts— clear (not run here)packages/core/src/gestures/GestureArena.ts— clearpackages/core/src/gestures/GestureHost.ts— clearpackages/core/src/gestures/__tests__/GestureHost.test.ts— clear (passes, run here)packages/core/src/gestures/__tests__/arena.test.ts— clear (passes, run here)packages/core/src/gestures/__tests__/arenaTimersAndClaims.test.ts— clear (passes, run here)packages/core/src/gestures/__tests__/harness.ts— clearpackages/core/src/gestures/types.ts— clearpackages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts— clear (not run here)packages/core/src/hooks/usePager.test.ts— clearpackages/core/src/motion/README.md— clearpackages/core/src/motion/uikit/contextMenu.ts— clear (named by owner-approved lines)packages/core/src/privateAttributes/contextMenuTrigger.stylex.ts— clear (the lookup walks the flat tree)packages/core/src/utils/flatTree.ts— clear (header comment only)packages/lab/src/PageControl/__tests__/PageControl.interaction.browser.spec.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.test.ts— clearpackages/lab/src/PageControl/__tests__/holdBegin.ts— clearscripts/shared-identity.baseline.json— clear
Stack: #11837 → #8125 → #9816 → #8133 → #8201
Merge group: #8125, #9816, #8133
Behavior module: ContextMenu's press feedback.
User need
A held finger should see the trigger grow from 150 ms, as in UIKit, before the menu at 735 ms.
Problem and solution fit
springs.contextMenuLift.springs.contextMenuDismisswhen the hold ends with no menu or the menu closes, and holds while the menu is up.architecture:layer-runtimeINV22).Current specification
component:ContextMenuFR5 makes the long press a gesture component: the lift playssprings.contextMenuLift, the returnsprings.contextMenuDismiss(spec:AST-094FR7, FR45). FR12 adds the growth on those springs.design:reduced-motiongoverns.Public delta and caller burden
No API change of its own. With #8125 under it, an omitted
presentationfollows the touch model under a coarse pointer, ascomponent:ContextMenuandspec:AST-094FR25 already record.presentation="popover"keeps the released behavior. A block trigger grows ~7%; its docs ask for room. The motion engine loads with the touch layer. First-load gzip over #8125: menu +156 B, table +266 B.Design and alternatives
Evidence
spec:AST-094Platform support:Scope
Writing rubric results
Over
component:ContextMenu: FR12 adds the growth on FR5's springs beside the hold's internal moments; Ownership names the trigger mark's module. Owner-gated.Testing
This round, from review, at b337bd9, on main 4d0a3d8:
utils/flatTree.tschanges only its header comment, so its other users run unchanged code. They are Layer, Popover, Selector, the gesture host, native scroll, scroll lock, the mobile keyboard, motion's presentation, the scroll view, selection lock and lab's Tour.privateAttributes/contextMenuTrigger.stylex.ts, so earlier device runs do not carry (spec:AST-094DEC-31).On b337bd9's tree,
pnpm preflight --browser, based on 46c21bf's tree:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;Prettier, with no ignore file and a misformatted control in the same run, passes the 19 changed files and refuses the control.
WebKit, on the interaction specs CI selects: 418 passed, 61 skipped.
The previous round, from review, at 031f8e1, on main 4d0a3d8:
closest, which stops at a shadow root.privateAttributes/contextMenuTrigger.stylex.ts, so earlier device runs do not carry (spec:AST-094DEC-31).On 031f8e1's tree,
pnpm preflight --browser, based on 46c21bf's tree:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;WebKit, on the interaction specs CI selects: 417 passed, 61 skipped.
The previous round, from review, at 382d939, on main 4d0a3d8:
ContextMenuTouchLayer.tsx, so earlier device runs do not carry (spec:AST-094DEC-31).On 1dabfe7's tree,
pnpm preflight --browser, based on c723e88's tree:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;WebKit, on the interaction specs CI selects: 416 passed, 61 skipped.
The previous round, from review, at b31c5fd, on main 3e9743a:
display: contents) unless the hold can grow it. It stays the same element, so the children never remount.text-overflow), so the ellipsis stays. The touch layer reads that, so the first load carries none of it.spec:AST-094. One conflict, FR12's row, keeps this pull request's line with that edit.ContextMenu.tsxandContextMenuTouchLayer.tsx, so earlier device runs do not carry (spec:AST-094DEC-31).On e5ae83a's tree,
pnpm preflight --browser, based on 030309c's tree:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;WebKit, on the interaction specs CI selects: 415 passed, 61 skipped.
The previous round, from review, at a7c1bd7, on main 3e9743a:
overflowandtext-overflow, so it cuts the text as the trigger would. The case passes in both. A trigger that scrolls its own content scrolls the inner box instead.spec:AST-094DEC-31).On 6eb342b's tree,
pnpm preflight --browser, based on eab562a's tree:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;WebKit, on the interaction specs CI selects: 414 passed, 61 skipped.
The previous round, at 03955ac, on main 3e9743a:
ContextMenu.tsx: a menu that closes clears main's submenu titles, then ends the touch open (endTouchOpen());ContextMenu.test.tsx: main's arrow-key test stays the last case ofdescribe('ContextMenu').spec:AST-094DEC-31).Before #8125's test-only fc6df46 came in,
pnpm preflight --browseragainst #8125's merge ran on this merge's tree. Its interaction step hit a 3 h limit, so the whole suite below stands in. The rest passed, except as noted:pnpm review:pre(0 findings), the build, the typecheck, strict eslint and prettier on the changed files, check:knowledge and the changeset checks;On the same tree, the whole Chromium interaction suite: 2,072 passed, 55 skipped. WebKit, on the interaction specs CI selects: 413 passed, 61 skipped.
At 03955ac: the a11y specs this change selects, 382 passed; TableCellMenus in WebKit, three runs, 18 passed; the build and the typecheck pass.
The previous round, at 9c1cd2b, on main 64806d0:
prepare()from the publicuseLayerby type only.useLayer's return type..github/scripts/lib/component-size.jsmeasures an import: the size report's esbuild options, eager chunks only.Layer/useLayer.tsx,Layer/outsidePress.ts,GestureArena.tsandGestureHost.tschange in feat(ContextMenu): open from a held finger on iOS 26's timeline #8125 and fix(gestures): behind a blocked page, a deadline waits for touch input stamped before it #11837, not in this pull request's own diff. The figures over main cover them.spec:AST-094DEC-31).Local checks at cdd8ebc, one worker:
test:ui --changed, the boundary test included): 518 files, 15,375 passed;pnpm review:pre(0 findings; merges clean).Final local checks at 8ed1ce9, one worker:
test:ui --changed, the boundary test included), from a fresh results cache: 518 files, 15,376 passed. Runs that reused an earlier run's order timed out main'ssemanticFence.sharedtest at the cold start;pnpm review:pre(0 findings; merges clean).This pull request's own change since cdd8ebc is one comment. #8125's changes ran in #8125's browser specs.
At 9c1cd2b, which brings #8125's loader fix, the ContextMenu, Layer, DropdownMenu and
useMenuPressunits ran again: 1,400 passed. So did the core typecheck, strict eslint, prettier, check:knowledge, the shared-identity check andpnpm review:pre(0 findings; merges clean).The previous round, at d5a7049:
component:ContextMenuFR12: this pull request's growth wording, and feat(ContextMenu): open from a held finger on iOS 26's timeline #8125's before-load sentence with its evidence;ContextMenu.tsx: this pull request'sendTouchOpen, beside feat(ContextMenu): open from a held finger on iOS 26's timeline #8125's loader hook and late-touch slot;ContextMenuTouchLayer.tsx: the header, the imports and the doc comment, each with both sides' lines.lazy-sheet-bundle.test.mjsdrops ContextMenu's eager-animator row and reads as on main.presentation="popover"the touch layer never loads, so the popover case no longer waits for it. It checks that the page never requests the layer's chunk..github/scripts/lib/component-size.jsmeasures an import: the size report's esbuild options, eager chunks only.spec:AST-094DEC-31). The device runs start again at feat(ContextMenu): after the touch model's hold opens the menu at the finger, the same finger slides onto an item, and its lift selects it once it has moved 10 px #8133's head, which contains this head.Local checks at d5a7049, one worker:
test:ui --changed, the boundary test included): 516 files, 15,337 passed;lazy-sheet-bundle.test.mjs: 4 passed;pnpm review:pre(0 findings; merges clean).The previous round, at cda2451:
toTriggerLocal, where this pull request's sentence on the press feedback now follows feat(ContextMenu): open from a held finger on iOS 26's timeline #8125's new wording. This pull request's own diff over feat(ContextMenu): open from a held finger on iOS 26's timeline #8125 is otherwise unchanged.utils/pressFeedback.ts(feat(core): swipe actions come from createSwipe on the shared drag path #8690) directly, so earlier device runs do not carry (spec:AST-094DEC-31). The device runs start again at feat(ContextMenu): after the touch model's hold opens the menu at the finger, the same finger slides onto an item, and its lift selects it once it has moved 10 px #8133's head, which contains cda2451.Local checks at cda2451, one worker:
test:ui --changed): 515 files, 15,313 passed;The previous round, at eb3d17d:
Layer/useLayer.tsx(see feat(ContextMenu): open from a held finger on iOS 26's timeline #8125). It merges with no conflict, and this pull request's own diff over feat(ContextMenu): open from a held finger on iOS 26's timeline #8125 is unchanged (same patch-id).Layer/useLayer.tsx, a shared layer module this pull request's code loads, so earlier device runs do not carry (spec:AST-094DEC-31). The Android emulator takes did not run at that head.Local checks at eb3d17d, one worker:
test:ui --changed): 499 files, 14,838 passed;The previous round, at a42af3e:
DropdownMenu/DropdownMenu.tsx, whichContextMenu.tsximports types from (import type). None of them changed. The Android emulator takes did not run at that head.Local checks at a42af3e, one worker:
test:ui --changed): 498 files, 14,750 passed;The previous round, at cd6d257:
Local checks at cd6d257, one worker:
The previous round, at 44ab755:
Local checks at 44ab755, one worker (the unit, gesture and a11y runs at b8c7cb2, which differs only in that spec):
test:ui --changed): 498 files, 14,722 passed;The previous round, at c11eb1f:
motion/animator.ts, whichcontextMenuPressFeedback.tsimports. No press-feedback call passes the newstart: 'next-frame', so each keeps its start.Local checks at c11eb1f, one worker:
test:ui --changed): 496 files, 14,484 passed;The previous round, at a1cc302:
isShown.useCommittedRef. It writes whether the recognizer follows a contact withuseCommittedRefInto, into the ref the press feedback was handed. The press feedback readsisShownthroughuseCommittedRef. No committed ref is read in an Effect cleanup.release()goes. Two test headers and a test comment say the growth follows a finger or a pen. The popover story again says it has no growth.Local checks at a1cc302, one worker (the unit, gesture and a11y runs at 01f5f22, which differs only in that spec):
test:ui --changed): 487 files, 14,335 passed;The previous round, at 8fc523e:
Local checks at 8fc523e, one worker:
test:ui --changed): 488 files, 14,345 passed;The previous round, at 8fb305f, from review:
Local checks at 1d6ec37, one worker (8fb305f changes one comment):
test:ui --changed): 485 files, 14,214 passed;The previous round, at 850a9c2:
data-astryx-context-menu-trigger, written and read through one owner module. A nested trigger still grows alone.component:ContextMenu's Ownership names that module, its writer and its reader.ContextMenuTouch.tsgoes, so the touch layer importscontextMenuPressandcontextMenuPressFeedbackdirectly. A press that ends with no menu springs back and releases what the commit mounted. The long-press spec keeps both pull requests' cases.Local checks at 850a9c2, one worker:
test:ui --changed): 485 files, 14,213 passed;The previous head, 0b1f31c, merged #8125's head cae3644 with no conflict. There the press reads the page's time from the arena's injected clock, which is
performance.now()in a browser. Before it, 2a36eba merged #8125's 45bfb44. There a menu timer that runs more than a frame late waits up to 50 ms for moves queued behind the block. 782cdbd merged #8125's cad79ec. There the press judges each coalesced sample at its own time. The menu waits at its moment only when the page is behind its input, so an on-time finger gets it at 735 ms. Before that, e25ec8c merged #8125's 88cc0d8, and its one conflict dropped the touch layer's pointer follow. Before that, c346da0 merged #8125's a4e0404, and three commits answer the review of 2ef1714:Under a fine pointer, all 31 ContextMenu story captures match main's pixel for pixel: 18 stories at rest, 13 with the menu open. That ran at 55f84be, whose
ContextMenu.tsxdiffers from 850a9c2's in one comment line. The change adds no publicdata-*attribute; 4e93b5f's privatedata-astryx-context-menu-triggerhas its owner module (INV23).Local checks at 0b1f31c, one worker:
The previous head, 2ef1714, sat on a merge of #8125's head a5a0e12 (704cff3). The one conflict put two new browser cases side by side in the long-press spec. Three commits follow:
architecture:layer-runtimeINV21 and INV22 (spec:AST-059DEC-9 and DEC-10, from#11024). A finger's or a pen's press leaves the open menu as an unpressed open. A layout case checks block, row and grid triggers against plain boxes.Red first, at fb27cdc (the same tree as 06c942c), in Chromium and WebKit: the press cases fail. The menu's box matched, but the trigger above the anchor carried scale 1.0735, and the anchor carried an inline counter-scale and translate. The layout case passed, as it should with no inner box.
Local checks at 9de7a99, which differs from 2ef1714 only in that changeset sentence, one worker:
Before and after, a finger held near the card's corner, at 450, 900 and 1,400 ms. The top row is before the inner box, the bottom row 850a9c2. The menu opens at the same place under the finger, and only the card grows: capture.
At earlier heads, below, "this head" means cc254d7.
Android exit timing (contextmenu-default): main none/70 ms, head none/90 ms (6 interleaved rounds; main max gap 107 ms)Frames, not timers, decide the onset: Chromium holds a page's timers for about 100 ms after it handles a touchstart.
Replayed onto main cd748d0 after #9814's squash: 1cedda2 carries this pull request's earlier own diff (old head 63c7a6c). Its message lists the folded commits, and the newer commits sit on top of it. It sits on #8125's 3d78dae, which now carries the menu's commit inside its deciding task and its commit-time mount. With those, this head's ContextMenu files equal 0c316d9's plus #8125's second-document test, its 735 ms proof, its PR1 sentences and one lint-directive comment line. So the menu behaves the same. The tree also carries main 92784f6, which #8125 merges. Commits c9d07a9 and cc254d7 merge #8125's heads. FR8 keeps main's text from #10160 in this pull request's table. Red first: 791357d (a touch 90 ms late, 3 of 3 red before the frame watch).
Touch to first grown frame, Chromium phone profile: 170–173 ms at normal speed and 164–182 ms at 4× CPU. With a 60 ms input lag, it is 166–167 ms (183 ms, at 1.0110, before the frame watch). Each first frame shows the spring's one-frame value, 1.0033, after an exact 1.000. A quick tap starts no animation and writes no style. The touch handlers' cost does not change. It is 1.50 / 1.85 ms at 1× (1.50 / 1.70 ms before) and 6.60 / 7.95 ms at 4× (6.70 / 8.30 ms before).
A lift between the commit and 735 ms shows the menu 2–3 ms into the lift's own dispatch in WebKit. Before #8125's commit-time mount, it took 17 ms. The lift proof, d44956d, asserts that dispatch, not a time. Under Reduce Motion, the 735 ms proof also wants the show inside its deciding task (4edb900).
App-level size and the eager-animator bundle row measured then predate the deferred touch layer, so they no longer hold. This round's first-load figures replace them.
Local checks at an earlier head, cc254d7, which adds only #8125's two record sentences: check:knowledge. At c9d07a9:
ContextMenuLongPressin Chromium (21 passed, 1 skipped) and in WebKit under the CI profile (17 passed, 5 skipped). At 343df06, which differs only in #8125's 735 ms proof: core typecheck; the ContextMenu, Layer and DropdownMenu units (1,135 passed);CI=true pnpm lint(0 errors); check:knowledge. At the stack's top on the same main, the ui suite passed 22,774.DropdownMenuLazySheet's keyboard-open case failed once under load, and it passes alone on main and here. The node suite (test:node) passed 17,446; its one failure is the WebKit leg budget (see #8133). Earlier versions of this description saidCI=true pnpm lint, but those runs werepnpm lint, which reports@eslint-react/dom-no-flush-synconly as a warning; that claim is corrected here.The Android run at an earlier head, cc254d7 (Chrome with Gboard; normal, 4× CPU and animations removed):
Earlier, at 0c316d9, the takes were Chrome with Gboard: normal ×2, 4× CPU ×2 and animations removed ×2. There, the growth animation's start time is 152–165 ms after the landing. It starts from 1.000 (first frames 1.000, then 1.002–1.005), with no back-dated jump. This head carries 0c316d9's ContextMenu files apart from one lint-directive comment line, and it also carries main's own changes. Both returns take about 285–354 ms, and Reduce Motion shows no growth. At 63c7a6c, an earlier head, the animation was created about 238 ms after the landing with a back-dated start. So its first painted frame was already at 1.016–1.039 after an exact 1.000.
Public and internal API delta
Public: none of its own; #8125's default move shows in this diff against main.
Internal, new:
privateAttributes/contextMenuTrigger.stylex.ts: the owner module of the privatedata-astryx-context-menu-triggerattribute (architecture:public-component-apiINV23), named incomponent:ContextMenu's Ownership.markContextMenuTrigger(trigger)marks a trigger while its touch press feedback is attached and returns the call that unmarks it.closestContextMenuTrigger(element)finds the trigger a press belongs to, along the flat tree: through a slot and out of a shadow root. Usage:const unmark = markContextMenuTrigger(trigger);.Why: a press on a nested trigger grows only that trigger. Existing ones considered:
data-astryx-pressable, which also sits on every pressable control inside a trigger. So the nearest one can be a nested control, not the trigger. A module-level set of mounted triggers came before; the mark replaces it.ContextMenu/contextMenuPressFeedback.ts:useContextMenuPressFeedback, the trigger's growth (component:ContextMenuFR12), used only by the touch layer. Usage:const feedback = useContextMenuPressFeedback(triggerRef, visualRef, isShown, isFollowedRef);.Why: the growth's timing is ContextMenu's own. It starts 150 ms after the landing the recognizer records, holds while the menu is up, and plays UIKit's springs. Existing ones considered: core's press machine (
utils/pressFeedback.ts). Its mark comes late inside a scroll view, and never for a press that travels past 10 px first. So the hook times a finger and a pen from the landing.Lines, over #8125's head:
contextMenuPressFeedback.ts+296,ContextMenuTouchLayer.tsx+101/−7,ContextMenu.tsx+86/−6,privateAttributes/contextMenuTrigger.stylex.ts+41,motion/uikit/contextMenu.ts+35/−8,contextMenuPress.ts+6,utils/flatTree.ts+3/−2);Drafted with an AI coding agent; the tests were run as described.