Repository navigation
spec(Tooltip, HoverCard): rename pressTrigger to triggerBehavior ('adaptive' | 'hover' | 'toggle') - #9379
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 9d7ccd1 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
The rename itself is owner-approved and complete across all six records; two small record edits are needed before merge.
HoverCard.spec.mdline 82 still says CLN-0024 brings FR5's walk toauto, but CLN-0024 now gives the walk totriggerBehavior="hover".- The
touchTrigger="none"fallback in CLN-0024 (Tooltip.spec.mdline 110) should say thatisEnabled={false}on coarse pointers also stops hover and keyboard-focus opening on those devices, and should name the media query.
Because a new commit clears the current approval, an engineering owner re-posts /approve-spec <full head SHA> once the edits land; the author can do this as an engineering owner.
[Automated review]
| `triggerBehavior="toggle"` a press on a controlled card reports the toggled | ||
| value through `onOpenChange` and does not change the state itself (FR9) | ||
| - Migration decision: `component:Tooltip` DEP-0016, then CLN-0024 in the next | ||
| minor; both cover HoverCard's and `useHoverCard`'s `touchTrigger`, with the |
There was a problem hiding this comment.
The next line still says CLN-0024 brings FR5's walk to auto. CLN-0024 now gives the walk to triggerBehavior="hover" (Tooltip.spec.md line 109), so this should name hover.
| | id | `CLN-0024` | | ||
| | lifecycle | `DEP-0016` | | ||
| | delta | `touchTrigger` is removed from `Tooltip`, `HoverCard`, `useTooltip`, and `useHoverCard`; `touchTrigger` remains supported until the next minor; only `"tap"` is deprecated now (DEP-0016). `triggerBehavior` keeps `hover` and `toggle`, default `hover`: `hover` takes on the released `touchTrigger="auto"` (a tap opens the layer unless the trigger performs its own action, and no press pins it), and `toggle` is unchanged. `touchTrigger="none"` has no value in `triggerBehavior`: remove it, and touch then follows FR5's rule (a tap that already acts leaves the layer shut; an info-only tap opens it); a caller who needs no touch opening at all sets `isEnabled={false}` on coarse pointers. `hover` gains FR5's walk: a tap that already acts on a control around the trigger does not open the layer. A hint-only trigger inside a control migrates by declaring `triggerBehavior="toggle"`, which no codemod can decide; Astryx's own info-only triggers (InfoTip, FieldLabel's info button, and a standalone StatusDot) declare it before this minor; a StatusDot inside a button, link, menu item, or option stays an image whose status the host's accessible name carries. One prop decides what a press does | | ||
| | replacement | `touchTrigger="none"` has no value in `triggerBehavior`: remove it, and touch then follows FR5's rule (a tap that already acts leaves the layer shut; an info-only tap opens it); a caller who needs no touch opening at all sets `isEnabled={false}` on coarse pointers. Each remaining `touchTrigger="tap"` site has a named replacement (`spec:AST-017` FR8): a button or link whose only job is its tooltip takes `triggerBehavior="toggle"`, so its tooltip keeps a touch path; a button or link with its own action whose accessible name already carries the layer's text drops `tap` and keeps the default `hover`, so a tap performs the action and opens no layer (`architecture:interaction-modality` INV4's case); any other button or link with its own action moves the layer's information to an adjacent info trigger that declares `triggerBehavior="toggle"`, such as an InfoTip, or into its visible label, so that information keeps a touch path, and then drops `tap`; a trigger whose tooltip repeats its own text takes `triggerBehavior="toggle"` (FR9's own-text exception); an unknown element is reported for a manual choice (`architecture:interaction-modality` INV4) | |
There was a problem hiding this comment.
isEnabled={false} on coarse pointers also stops hover and keyboard focus from opening the layer on those devices; released touchTrigger="none" only stopped taps. Worth one clause saying so, and naming the query (for example useMediaQuery('(pointer: coarse)')).
…| 'toggle', default 'adaptive'
|
/approve-spec 6ae5662 |
There was a problem hiding this comment.
The rename is owner-approved at this head and consistent across all six records; one wording fix is needed before merge.
Tooltip.spec.mdsaystriggerBehavior="hover"keeps a pen from opening the layer (lines 46, 111, 112, 204 and 344), but FR3 still opens the tooltip on a hovering pen, as the releasedtouchTrigger="none"does; say that no touch or pen tap opens it, as FR5 already does.
A new commit clears the current approval, so an engineering owner re-posts /approve-spec <full head SHA> once the edit lands; the author can do this as an engineering owner.
[Automated review]
| | Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior | | ||
| | ---------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------- | ------------------------------------------------------------------------- | -------------------------------- | | ||
| | Focus trigger | `auto`, `always`, `never` | Whether keyboard focus opens the tooltip: on focusable triggers (FR4's gap), always, or never. | Every trigger mode. | `auto` | `component:Tooltip` | Stable | TypeScript rejects other values. | | ||
| | Trigger behavior | `adaptive`, `hover`, `toggle` | How the trigger opens the tooltip; under every value, hover on a fine pointer and keyboard focus preview it (FR3, FR4). Under `adaptive`, a tap opens it unless the tap already acts (FR5, DEC-1), and no press pins it; under `hover`, touch and pen never open it, and no press pins it; under `toggle`, a click, a completed tap, Enter, or Space pins it, and the same press on a pinned tooltip closes it (FR9). | Every trigger; `toggle` pins only on a button or own-text trigger, and any other trigger keeps tap-only opening (FR9). | `adaptive` | `component:Tooltip` | Stable | TypeScript rejects other values. | |
There was a problem hiding this comment.
Under hover, a hovering pen still previews through FR3 (this cell's own first clause), and released touchTrigger="none" keeps a pen in detection range on the hover path. Suggest "no touch or pen tap opens it" here, and the same wording at L46, L111, L112 and L344.
…en still previews per FR3)
|
/approve-spec 456c674 |
There was a problem hiding this comment.
The pressTrigger to triggerBehavior rename is owner-approved at this head and consistent across all six records; one wording fix remains.
Tooltip.spec.mdDEC-1 (lines 344-345) still sayshovermeans "touch and pen never open the layer", but FR3, the trigger-behavior row and the releasedtouchTrigger="none"keep a hovering pen's preview; say "no touch or pen tap opens the layer", as the other four places now do.- The description's
'hover'bullet says the same and should match.
A new commit clears the current approval, so an engineering owner re-posts /approve-spec <full head SHA> once the edit lands; the author can do this as an engineering owner.
[Automated review]
| opens on a tap; `hover` previews on hover and keyboard focus only, so touch and | ||
| pen never open the layer; `toggle` adds the pin on every device. Under |
There was a problem hiding this comment.
Under hover a hovering pen still previews through FR3 (line 213), as the trigger-behavior row (line 204) and the released touchTrigger="none" say. Suggest: "hover previews on hover and keyboard focus only, so no touch or pen tap opens the layer".
|
/approve-spec e531412 |
There was a problem hiding this comment.
The pressTrigger to triggerBehavior rename is owner-approved at this head and consistent across all six records, and the earlier DEC-1 wording fix ("no touch or pen tap opens the layer") has landed, so this is ready to merge. Nothing else is needed; if the branch gets another commit, an engineering owner re-posts /approve-spec <full head SHA>, which the author can do as an engineering owner.
[Automated review]
Maintainer impact
Tooltip and HoverCard's pin-on-press prop is renamed from
pressTriggertotriggerBehavior, with the values'adaptive' | 'hover' | 'toggle'(default'adaptive'). One prop now answers how the layer opens on each device, sotouchTriggerfolds into it. Nothing has shipped under the old name: it exists only in merged records, so this is a rename before release, not a deprecation. The open implementation pull requests adopt the new name.'adaptive'(default): today's shipped behavior. Hover on a fine pointer and keyboard focus preview the layer; on touch and pen, a tap opens it unless the trigger performs its own action (Tooltip FR5, DEC-1; the releasedtouchTrigger="auto"); no press pins it.'hover': hover and keyboard focus preview only; no touch or pen tap opens it (the releasedtouchTrigger="none"); no press pins it.'toggle': hover and focus still preview it; on every device a click, a completed tap, Enter, or Space pins it, and the same press on a pinned layer closes it (Tooltip and HoverCard FR9, FR10). It replacestouchTrigger="tap"and the earlierpressTrigger="toggle".Exact decision needed
The public name and values of the prop that decides how a Tooltip or HoverCard opens on each device, including whether a press pins it.
Existing authority searched
Every merged occurrence of
pressTriggerunderdocs/and in*.doc.mjsfiles: the Tooltip, HoverCard, InfoTip, and StatusDot component records,architecture:interaction-modality(the toggletip guidance and the INV4 verification row), and the native-first surfaces spec. FieldLabel, AST-003, AST-090, and component docs do not name the prop.Decision
The owner decided the name
triggerBehaviorand the values'adaptive' | 'hover' | 'toggle', default'adaptive', on 2026-11-01. The records carry the decided values only; no option text is recorded.touchTrigger="tap"in favor oftriggerBehavior="toggle".touchTriggerremains supported until the next minor; only"tap"is deprecated now. Until then an explicittouchTriggerdecides taps under'adaptive', and'hover'and'toggle'ignore it. The deprecating release's codemod is unchanged apart from the target name: it rewrites only icon and span triggers and reports every other site.touchTriggerat the next minor, and'adaptive'gains FR5's walk then. The minor's codemod mapstouchTrigger="auto"by removing it (the default'adaptive'reproduces it),"none"totriggerBehavior="hover", and"tap"totriggerBehavior="toggle"on icon, span, and identifiable own-text triggers. Button, link, and unknown sites keep the per-kind replacements and reports already recorded.Rejected alternatives
touchTriggerbesidetriggerBehavior, which splits one question across two props (Tooltip DEC-1).Claim scope and non-goals
Only the prop's name, values, and default change, plus the DEP-0016 and CLN-0024 wording and the FR5, FR9, and DEC-1 text that name them. Every other rule and word is unchanged. Wider API guidance on behavior-based props is not part of this pull request.
Evidence and implementation relationship
Spec-only. The open implementation pull requests for the toggle, its HoverCard counterpart, InfoTip, the own-text pin, and the
tapdeprecation adopttriggerBehavior.Changed records
docs/specs/components/Tooltip/Tooltip.spec.md(contract table, compatibility, DEP-0016, CLN-0024, current-state impact, public concepts, FR5, FR9, FR10, AR6, verification map, DEC-1)docs/specs/components/HoverCard/HoverCard.spec.md(same sections)docs/specs/components/InfoTip/InfoTip.spec.mddocs/specs/components/StatusDot/StatusDot.spec.md(names the released default touch behavior that'adaptive'keeps)docs/architecture/interaction-modality.md(toggletip guidance, INV4 verification)docs/specs/AST-082-native-first-surfaces/spec.mdWriting rubric results
now, in the requested lifecycle sentence in DEP-0016 and CLN-0024 ("only"tap"is deprecated now"); it states the deprecation window, not history, so it stays. "Released" and "shipped" name the current public behavior that'adaptive'and'hover'keep, not history. No other narration added.Rejected:lines are one line each inside their decisions.Scope
Validation
pnpm check:knowledge: Knowledge templates and records are aligned.git diff --check: clean.