Repository navigation
Conversation
While a reason tooltip covers a control, every other tooltip on that control, inside it, or wrapping it renders no text: it neither shows nor adds to the control's accessible description. useTooltip gains the Core-only isReason option (useTooltipInternal; the public TooltipOptions is unchanged), the reason's trigger carries a private mark from its INV23 owner module, and the 23 disabled-reason components opt in. Label-tooltip callers change nothing. Tooltip FR14 records the rule.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec e2b1029 |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Not ready to approve yet: this needs an owner decision on the desktop behavior change, plus five fixes.
Needs an owner decision
- For mouse and trackpad users, hovering no longer shows any tooltip on, inside, or around a control that shows a disabled reason, including a
<Tooltip>around a whole region that merely contains such a field, and that desktop behavior change needs an owner decision (or gating to touch input).
Required changes
- The new Effect in
useTooltip.tsx(lines 928-935) callssetIsCoveredafter every render, so aCheckboxListwith a pendingchangeActionre-renders without end: the existing test "shows a spinner only on the toggled item while changeAction is pending" hangs on this branch and passes onmain; set state only when coverage changes. ComplexSelectorgaineddisabledMessageonmainafter this branch forked and still uses plainuseTooltip, so after merging, a<Tooltip>around a disabled ComplexSelector or a caller-rendered trigger with its owntooltipstill shows two tooltips; rebase and passisReason: truethere.- Coverage is read only after the covered tooltip itself re-renders, so a reused child element (hoisted,
useMemo,React.memoor the React Compiler) keeps its label in the control's accessible description when a reason turns on; notify covered tooltips when the mark changes and add a stable-child test. - A controlled
isOpentooltip under a reason is closed byhideLayer()from an Effect, which reportsonOpenChange(false), and it stays hidden after the reason ends whileisOpenis stilltrue. - The title, changeset and FR14's first sentence say "a control never shows two tooltips", but a
<Tooltip>around aButtonwith its owntooltipstill shows two; reword them to what the change does, for example "a disabled reason is the only tooltip its control shows".
The new tests fail on main and pass here for the cases they cover, so please add the missed cases above as tests too.
…with coverage A covered tooltip renders no layer element, so its description id resolves to nothing. Coverage state changes only when coverage changes, which ends the re-render loop CheckboxList's pending changeAction hit. A controlled isOpen label keeps the caller's value under a reason and shows once the reason ends. ComplexSelector's disabled reason opts in. FR14 now reads "a disabled reason is the only tooltip its control shows" and states the memoized-child limit, with a pending test.
|
/approve-spec 8b03e26 |
There was a problem hiding this comment.
Not ready to approve yet: three fixes are needed, and the desktop behavior change still needs an owner decision.
Needs an owner decision
- For mouse and trackpad users, hover no longer shows any other tooltip on, inside or around a control that shows a disabled reason, including a
<Tooltip>around a whole region that merely contains such a field, which stays closed even while the pointer is on another control in that region; that desktop change needs an owner decision, or gating to touch input.
Required changes
- Miss: a TextInput, TextArea or NumberInput with
statusVariant="tooltip"and a status message loses that status while it is disabled with a reason, becauseisCoveredByTooltipReason(privateAttributes/tooltipReason.stylex.ts:28-32) also covers the status button inside the field, so its tooltip never opens and the input'saria-describedbypoints at an id that is no longer in the page, against TextInput FR9 and TextArea FR8; let the field's own status tooltip opt out of coverage and add astatusVariant="tooltip"case totooltipReason.test.tsx. - The
typecheckjob fails becausetooltipReason.test.tsx:257passesonOpenChangetouseTooltip, which has no such option, so the spy is never wired and the assertion at line 277 cannot fail; passonHideand assert it is not called. - The
lintjob fails on three errors this change adds (set-state-in-effectatuseTooltip.tsx:359,exhaustive-depsatuseTooltip.tsx:932, andno-nested-component-definitionsattooltipReason.test.tsx:256); moveControlledLabelto module scope and fix or justify the other two with a reasoned disable comment.
The CheckboxList hang, the ComplexSelector opt-in, the controlled isOpen behavior and the wording from the last review are fixed, and the new tests fail on main and pass here. A smaller comment suggestion is inline.
…oltip-one-per-control # Conflicts: # docs/specs/components/Tooltip/Tooltip.spec.md
|
/approve-spec aa1be68 |
There was a problem hiding this comment.
Not ready to approve yet: the desktop behavior change still needs an owner decision, and three fixes are needed whatever that decision is.
Needs an owner decision
- For mouse and trackpad users, while a field shows a disabled reason, hovering a Button, IconButton, Link or Avatar with its own tooltip inside that field, or a
<Tooltip>around just that field, now shows only the reason, and a<Tooltip>around a container whose only control is that field no longer opens at all, even on its heading (useTooltip.tsx,privateAttributes/tooltipReason.stylex.ts); approval waits on an owner decision that covers this desktop change, or on gating that part to touch input.
Fixes needed
- A
<Tooltip>around a ComplexSelector withstatusVariant="tooltip"still opens beside the disabled reason, because the status button sits outside the marked trigger and makes the wrapper count as a region (tooltipReason.stylex.ts:91-99); recording status-tooltip triggers the way InfoTip triggers are recorded, with a test for this case, would fix it. - Newly live check:
isReason,syncCoverageandhasOwnControlare added tohandlersRef.current, a latest-value ref written during render (useTooltip.tsx:811-813), whicharchitecture:react-component-runtimeINV17 and DEC-3 forbid, so they should go throughuseCommittedReforuseCommittedRefInto, which this branch already has. - FR14 and the description say "No Effect reads coverage", but the mount-only
isDefaultOpenEffect reads it throughshowLayer(useTooltip.tsx:992-997), so that sentence needs rewording, for example to "No Effect polls coverage after a render".
CI's accessibility browser-spec leg 1/3 stopped at its 15-minute limit after every spec it ran had passed, so it needs a rerun; the new tests, lint and typecheck pass.
Claims and files checked
Claims:
- A disabled reason is the only tooltip on its control, inside it, or on a Tooltip around just that field: verified by code and the new tests, except a wrapped ComplexSelector with a tooltip status (fix above).
- Screen readers hear the reason without the label: verified; a covered tooltip renders no layer, so its description id resolves to nothing.
- No API change and
TooltipOptionsunchanged: verified; no package entry reachesuseTooltipInternalor its options, and CI's API delta lists no row. - A label tooltip held open with
isOpenkeeps the caller's value and shows once the reason ends: verified by code and its test. - The mark is a private attribute with one owner module: verified.
- A Tooltip around a region with another control still opens, an InfoTip does not count as another control, and the known limit holds: verified by code and tests.
- A field's status message and a tooltip with its own control are never covered: verified for the status icon hook, Selector, MultiSelector, InfoTip and a
show()hold. - Coverage is decided on show and on mark changes through a list shared across copies, and a memoized child follows: verified (it is also decided on attach and when a hold changes).
- No Effect reads coverage: false (fix above).
- The 24 components that show a disabled reason pass
isReason: verified (24 sites, every Core disabled-reason tooltip). - The owner decided the one-tooltip rule for every pointer: not verified (owner decision above).
- The new tests pass: verified in CI; that they fail on main was not rerun.
- The consumer suites pass: CI's unit suites pass at this head.
- +805 / -95 lines: verified; about 460 of them tests: approximately (the test file is 436 lines).
- Bundle size changes: not measured.
- The changeset's scope (status and help stay available, region tooltips still open,
isOpenkept): verified, except the ComplexSelector case above.
Files:
.changeset/tooltip-one-per-control.md: accurate except the ComplexSelector case.docs/specs/components/Tooltip/Tooltip.spec.md: FR14's "No Effect reads coverage" (fix above).packages/core/src/Tooltip/useTooltip.tsx: render-time ref write and the Effect sentence (fixes above).packages/core/src/privateAttributes/tooltipReason.stylex.ts: the ComplexSelector status case (fix above).packages/core/src/ComplexSelector/ComplexSelector.tsx: its status button sits beside the marked trigger (fix above).packages/core/src/Tooltip/tooltipReason.test.tsx: clear; no case for the ComplexSelector status wrapper.packages/core/src/hooks/useInputStatusIcon.tsx,Selector/Selector.tsx,MultiSelector/MultiSelector.tsx,InfoTip/InfoTip.tsx: clear.- The other 21 reason sites (CheckboxInput, CheckboxList, DateInput, NativeDateField, TouchDateField, DateRangeInput, DateTimeInput, TouchDateTimeField, FileInput, NumberInput, PowerSearch, RadioList, SegmentedControl, Slider, Switch, TextArea, TextInput, TimeInput, TouchTimeField, Tokenizer, Typeahead): clear.
… reads a committed ref The owner module records the trigger of a field's own status tooltip, as it does an InfoTip's, so a Tooltip around a ComplexSelector with a tooltip status is still that field's wrapper and shows only the reason (red-first). The trigger's attach reads isReason, isStatus, hasOwnControl and syncCoverage through a committed ref instead of a ref written during render. FR14 says no Effect polls coverage after a render.
|
/approve-spec 56c4227 |
There was a problem hiding this comment.
Not ready to approve yet: the desktop behavior change still needs an owner decision; the fixes requested earlier are in place and nothing else blocks.
Needs an owner decision
- For mouse and trackpad users, while a field shows a disabled reason, hovering a Button, IconButton, Link or Avatar with its own tooltip inside that field, or a
<Tooltip>around just that field, now shows only the reason, and a<Tooltip>around a container whose only control is that field no longer opens at all, even on its heading (useTooltip.tsx,privateAttributes/tooltipReason.stylex.ts); approval waits on an owner decision that covers this desktop change, or on gating that part to touch input.
One new non-blocking note is inline: a covered tooltip leaves its id in the trigger's aria-describedby with no element behind it. CI's first accessibility run stopped at its 15-minute limit in one browser leg after 160 passing tests; CI is running again on this head.
Claims and files checked
Claims:
- A disabled reason is the only tooltip on its control, inside it, or on a Tooltip around just that field: verified by the new tests, which fail on main, and in Chromium for a wrapped TextInput and a ComplexSelector custom trigger.
- Screen readers hear the reason without the label: verified; Chromium resolves the control's description to the reason alone (a dangling id remains, noted inline).
- The desktop change follows the owner's recorded answer on an earlier pull request: not verified; no words or time of that answer are on record.
- No API change and
TooltipOptionsunchanged: verified; the API generator lists no row, anduseTooltipInternalreaches no package entry. - When the reason ends, the label tooltip works again: verified by tests.
- A label held open with
isOpenkeeps the caller's value without a close report and shows once the reason ends: verified by code and test. - The reason marks its trigger through a private attribute with one owner module: verified; strict lint passes.
- Other tooltips on, inside or wrapping just the field render no layer, and an open uncontrolled one closes: verified.
- A Tooltip around a region with another control still opens: verified by test and in Chromium.
- InfoTip and the field's own status triggers count as part of the field: verified by tests; the record's known limit names only an unrelated InfoTip (earlier inline note).
- Status tooltips, InfoTip and
show()holds are never covered: verified. - Coverage is decided on show and on mark changes through a list shared across copies of Core, no Effect polls it, and a memoized child follows: verified (it is also decided when a trigger attaches and when a hold changes).
- The status icon, Selector and MultiSelector status tooltips pass
isStatus, and InfoTip passeshasOwnControl: verified. - The 24 disabled-reason sites pass
isReason: verified; that is every Core disabled-reason tooltip. - ComplexSelector's record places the guardrail in Tooltip: verified for its custom-trigger case; the wrapper and container cases go beyond it.
- The listed red-first cases fail on main and pass here: verified; 12 of the 15 new tests fail on main and 3 are guards.
- The earlier-round fixes (Selector and MultiSelector status, labelTooltip wrapper,
setHelddependency, ComplexSelector status wrapper, committed-ref read, FR14 wording): verified. - The consumer suites pass, including the five left to CI: verified (141 files, 5,206 tests).
- +836 / -95 lines, about 480 of them tests: verified; the test file is 459 lines.
- Bundle size changes: not verified; no size report exists for this head yet.
- The changeset (reason shown alone, status and help stay available, region tooltips still open,
isOpenkept, no API change): verified.
Files:
.changeset/tooltip-one-per-control.md: clear.docs/specs/components/Tooltip/Tooltip.spec.md: FR14's known limit omits status triggers (non-blocking, earlier inline note).packages/core/src/Tooltip/useTooltip.tsx: a covered tooltip's dangling describedby id (non-blocking, inline) and two stale comments (non-blocking, earlier threads).packages/core/src/privateAttributes/tooltipReason.stylex.ts: clear.packages/core/src/Tooltip/tooltipReason.test.tsx: clear.packages/core/src/InfoTip/InfoTip.tsx,hooks/useInputStatusIcon.tsx,Selector/Selector.tsx,MultiSelector/MultiSelector.tsx: clear.- The other 22 reason-site files (CheckboxInput, CheckboxList, ComplexSelector, DateInput, NativeDateField, TouchDateField, DateRangeInput, DateTimeInput, TouchDateTimeField, FileInput, NumberInput, PowerSearch, RadioList, SegmentedControl, Slider, Switch, TextArea, TextInput, TimeInput, TouchTimeField, Tokenizer, Typeahead): clear; inline-arrow refs re-mark the trigger on each render (non-blocking, earlier thread).
| | FR11 | A press inside an open Tooltip surface acts only within that surface: it never activates the trigger, a clickable container around it, or the control a label names. A tooltip that renders inside a FileInput dropzone, a ClickableCard, an Item row, or a `<label>` keeps a click on its text from opening the file picker, activating the container, or toggling or focusing the labelled control. The press still reaches page-level listeners, so a menu or Typeahead inside the surface keeps working. `architecture:layer-runtime` INV17 states this stop for every layer root. | `component:InfoTip` FR2 (a pinning press stops at its button); `component:Tooltip` DEC-1 (one tap does one thing); `architecture:layer-runtime` INV17 | | ||
| | FR12 | `useTooltip`'s return includes imperative `show(): void` and `hide(): void`. `show()` opens the tooltip and keeps it open until `hide()`, Escape, a press outside, or focus leaving its trigger, as a pinned tooltip does (FR6, FR9). A `show()` hold that begins during a press on the trigger ends when that press ends off the trigger without a click; the hover rules then decide whether the tooltip stays. `hide()` closes it. Both report through the hook's `onShow` and `onHide`, which the Tooltip component maps to `onOpenChange` (FR8). While `isEnabled` is false, `show()` does nothing. Under a controlled `isOpen`, they report the request through `onShow`/`onHide` and do not override `isOpen` (FR7). They are how an app builds a toggle-style trigger: the app's own button calls them, carries `aria-expanded` (true while shown) and `aria-controls` naming the surface, and keeps its own accessible name. | Owner decision, 2026-11-02: app control through `useTooltip`'s imperative show and hide, not a prop. | | ||
| | FR13 | Keys typed into a text-entry field after a finger or pen pressed the trigger are text entry, not keyboard input: character keys, Backspace, Delete, Enter (an on-screen keyboard's Go key), Shift, CapsLock, Dead, Process, Unidentified, and any key during composition leave a pointer press the last input, so focus a closing dialog then returns opens no tooltip (FR4); Tab, Escape, arrow keys, and other named keys are keyboard input. Implementation gap: a field in another document, such as an iframe or a Picture-in-Picture window, is not read as a text-entry field, so typing there still opens the tooltip on the focus a closing dialog returns (Current-state impact). | Current source and tests | | ||
| | FR14 | A disabled reason is the only tooltip its control shows, for every pointer and for the keyboard. While a reason tooltip (a component's disabled reason, through `useTooltip`'s Core-only `isReason` option) covers a control, every other tooltip on that control, inside it, or on the field's own wrapper renders no layer: it neither shows nor adds to the control's accessible description, and the reason is announced alone. A tooltip around a larger region that holds the field and other controls is not covered; a tooltip whose trigger is its own control (an InfoTip), or the field's own status message, does not count as another control when deciding whether a Tooltip wraps a field. Known limit: a region whose only other control is an unrelated InfoTip counts as the field's wrapper. A field's own status (`statusVariant="tooltip"`, through the Core-only `isStatus` option) is not covered, and a tooltip whose trigger is its own control (InfoTip, a `show()`-pinned trigger, through the Core-only `hasOwnControl` option or a hold) is never covered. An uncontrolled open tooltip that a reason comes to cover closes; a controlled one keeps the caller's `isOpen` and renders again when the reason ends. Coverage is decided when a tooltip would show and when a reason mark changes: the mark's owner module tells each tooltip that reads it, so a child that does not re-render follows too. No Effect polls coverage after a render (one layout Effect writes a reason's mark as its enabled state changes), nothing watches the page, and no caller code is involved. | Owner decision (one tooltip per control) | |
There was a problem hiding this comment.
Non-blocking: the known limit names only "an unrelated InfoTip", but isCoveredByTooltipReason skips every recorded status trigger as well (tooltipReason.stylex.ts:95-98), and a field's status button stays focusable while its field is disabled (useInputStatusIcon.tsx:217-228). So a <Tooltip> around a field disabled with a reason plus a second disabled field with a tooltip status never opens, even on the second field. Suggested: "Known limit: a region whose only other controls are an unrelated InfoTip or another field's status button counts as the field's wrapper."
…oltip-one-per-control
|
/approve-spec dcd3924 |
|
Decision: D-20261113-094 Records the owner's words covering the inner-control case at dcd3924: the disabled reason replaces a control's own tooltip while disabled ("Wire it for render trigger"). The container case, where a caller's Tooltip wraps a disabled field that has a reason, is not yet decided; an owner decision is pending, and this pull request waits for it. |
There was a problem hiding this comment.
Changes requested: the part of this change that keeps a <Tooltip> around a disabled field closed needs an owner decision for desktop, and the description says it already has one.
- Desktop behavior change needs an owner decision: for mouse and trackpad users, a
<Tooltip>around a field disabled with a reason, or around a container whose only control is that field, no longer opens at all, even on the container's own heading (packages/core/src/privateAttributes/tooltipReason.stylex.tslines 88-103); gate that branch to touch input, or cite the owner decision that covers it. - The description's "Owner decision for desktop behavior" and "Authority" sections say the recorded owner answer covers that wrapper and container case, but that case has not been decided yet; limit those sentences to the inner-control case, or cite the decision once it is made.
The inner-control part (a label tooltip on or inside the disabled control) has its owner decision and its tests, and nothing else blocks. Three non-blocking notes are in the existing inline threads: the covered tooltip's id left in aria-describedby, inline-arrow refs that re-mark the trigger on every render, and two stale comments. CI has not run on this head while it is a draft.
Claims and files checked
Claims:
- A disabled reason is the only tooltip its control shows, and a covered tooltip adds nothing to the control's description: verified by the new tests (12 fail on main, all 15 pass here) and in Chromium.
- The desktop change, including the wrapper and container case, follows a recorded owner answer: false; the owner's latest comment says the wrapper and container case is still pending.
- The owner decided "a control never shows two tooltips" for mouse and trackpad, including the field's own wrapper: false for the wrapper; true for the inner-control case.
- Any pointer or the keyboard shows only the reason: verified; the coverage check has no pointer gate.
- Screen readers hear the reason alone: verified; the covered tooltip's id stays in
aria-describedbywith no element (non-blocking). - No API change;
TooltipOptionsunchanged; label-tooltip callers change nothing: verified; the API generator lists no row. - When the reason goes away the label tooltip works again, and an
isOpenlabel keeps the caller's value without a close report: verified by tests. - The reason marks its trigger through a private attribute with one owner module: verified; strict lint passes.
- Other tooltips on, inside or wrapping just the field render no layer, an open uncontrolled one closes, and a region with another control is not covered: verified by code, tests and Chromium.
- InfoTip and the field's own status triggers count as part of the field, with the stated known limit: verified.
- Status tooltips, InfoTip and
show()holds are never covered: verified. - Coverage is decided on show and on mark changes through a list shared across copies of Core, with one layout Effect, no document listener, and a memoized child that follows: verified (it is also decided when a trigger attaches and when a hold changes).
- The status icon, Selector and MultiSelector status tooltips pass
isStatus, and InfoTip passeshasOwnControl: verified. - The 24 disabled-reason sites pass
isReason: verified; no other disabled-reason tooltip remains in Core. - ComplexSelector's record places the guardrail in Tooltip for a caller-rendered trigger: verified.
- The red-first cases fail on main and pass here: verified.
- The earlier-round fixes (status tooltips,
labelTooltipand ComplexSelector status wrappers,setHelddependency, committed-ref read, FR14 wording, CheckboxList pending action): verified. - The consumer suites pass: verified; every listed suite passes here, and Core's typecheck passes.
- +836 / −95 lines, about 480 of them tests: verified.
- App-level gzip sizes: not verified; no size report exists for this head.
- The changeset: verified; it does not mention the container case, which is narrower than the change.
Files:
.changeset/tooltip-one-per-control.md: clear.docs/specs/components/Tooltip/Tooltip.spec.md: clear (owner-approved at this head).packages/core/src/privateAttributes/tooltipReason.stylex.ts: the wrapper and container branch needs the owner decision (blocking).packages/core/src/Tooltip/useTooltip.tsx: dangling description id and two stale comments (non-blocking).packages/core/src/Tooltip/tooltipReason.test.tsx: clear.packages/core/src/InfoTip/InfoTip.tsx,packages/core/src/hooks/useInputStatusIcon.tsx,packages/core/src/Selector/Selector.tsx,packages/core/src/MultiSelector/MultiSelector.tsx: clear.packages/core/src/TextInput/TextInput.tsxand the other reason sites with inline-arrow refs: clear; the re-marking on each render is non-blocking.- CheckboxInput, CheckboxList, ComplexSelector, DateInput, NativeDateField, TouchDateField, DateRangeInput, DateTimeInput, TouchDateTimeField, FileInput, NumberInput, PowerSearch, RadioList, SegmentedControl, Slider, Switch, TextArea, TimeInput, TouchTimeField, Tokenizer, Typeahead: clear.
| const marks = element.querySelectorAll(SELECTOR); | ||
| if (marks.length !== 1) { | ||
| return false; | ||
| } | ||
| const mark = marks[0]; | ||
| for (const control of element.querySelectorAll(FOCUSABLE_SELECTOR)) { | ||
| // A layer the field opens, such as its panel, belongs to the field. | ||
| if ( | ||
| !mark.contains(control) && | ||
| control.closest('[popover]') == null && | ||
| !fieldTooltipTriggers.has(control) | ||
| ) { | ||
| return false; | ||
| } | ||
| } | ||
| return true; |
There was a problem hiding this comment.
Desktop behavior change needs an owner decision: this wrapper branch makes a <Tooltip> around a field disabled with a reason, or around a container whose only control is that field, never open for mouse and trackpad users, even on the container's own heading (on main it opens). Gate this branch to touch input, or cite the owner decision that covers it; dropping the wrapper case, with its FR14 clause and tests, also clears it.
| props?: Omit<ContextRenderProps, 'positioning'>, | ||
| ): ReactNode => { | ||
| if (isCovered) { | ||
| return null; |
There was a problem hiding this comment.
Non-blocking: a covered tooltip renders nothing here, but its id stays in the trigger's aria-describedby. In Chromium a wrapping card's aria-describedby names an id no element has, and a ComplexSelector renderTrigger Button keeps the reason plus that id. Assistive technology skips the missing id, so the reason is still announced alone, but conformance checkers report a reference to a missing element. Rendering an empty element under the same id while covered keeps the description empty with no dangling reference.
Primary intent
Fix: a control could show two tooltips at once, its own label tooltip and a component's disabled reason. Now a disabled reason is the only tooltip its control shows. While a reason tooltip covers a control, the control's other tooltip stays closed and adds nothing to its accessible description, so the reason is shown and announced alone.
Owner decision for desktop behavior
This change has two desktop halves (mouse or trackpad hover):
User or maintainer impact
<Tooltip>) change nothing. When the reason goes away (the control is enabled), the label tooltip works again. A label tooltip you control withisOpenkeeps your value under a reason (noonOpenChange(false)) and shows once the reason ends.How
useTooltipgains a Core-onlyisReasonoption throughuseTooltipInternal, in the same module. The publicuseTooltip(options)calls it, andTooltipOptionsis unchanged.privateAttributes/tooltipReason.stylex.ts(writer plus reader).labelTooltiphelp) and the trigger of the field's own status message count as part of the field, so a Tooltip around a field withlabelTooltip, or a ComplexSelector with a tooltip status, is still its wrapper. Known limit: a region whose only other control is an unrelated InfoTip counts as the field's wrapper.statusVariant="tooltip", through the Core-onlyisStatusoption, since the field must show its status), and a tooltip whose trigger is its own control (InfoTip throughhasOwnControl, and any tooltip held open throughshow()).setTooltipReason, in the mark's owner module, tells each tooltip whose trigger has attached; each one updates its own covered state, and an open uncontrolled one closes. The list of tooltips is shared across copies of Core. No Effect polls coverage after a render (one layout Effect writes a reason's mark as its enabled state changes, which is what tells the tooltips), there's no document listener and no new public API, and a child that doesn't re-render (a memoized one) follows too.useInputStatusIcon) and Selector's and MultiSelector's own status tooltips passisStatus: true, and InfoTip passeshasOwnControl: true.isReason: true.Authority
Review outcomes: the owner decided the one-tooltip guardrail as "a control never shows two tooltips", with no pointer qualifier, on the tooltip itself (her recorded answer, B and C, to the one-tooltip question raised on feat(ComplexSelector): add disabledMessage #5984). It covers mouse and trackpad as well as touch and keyboard, for a tooltip on the control, inside it, or on its field's own wrapper. A region tooltip, a field's status and a tooltip with its own control stay outside it.
component:ComplexSelectorDEC-2 places the one-tooltip guardrail in Tooltip, for a caller-rendered trigger, and this change is that guardrail.The owner's decision: design the one-tooltip guardrail in the shared tooltip hook rather than in every tooltip caller.
component:TooltipFR14 (new) states the rule and when it's decided. An Internal modules table names theisReasonoption and the owner module, each with why existing code isn't enough.architecture:public-component-apiINV23: the private attribute has one owner module.Evidence
Red-first (
tooltipReason.test.tsx, 6 cases): Button, IconButton, Link, Avatar and a Tooltip-wrapped control, each under a reason; plus a Tooltip around a TextInput disabled with a reason. Each asserts:All 6 fail on
mainand pass with this change.Sixth round: a field's own status trigger is recorded like an InfoTip's, so a Tooltip around a ComplexSelector with a tooltip status shows only the reason (red-first). The trigger's attach reads its coverage values through a committed ref, not a ref written during render. FR14's wording is corrected.
Fifth round: Selector's and MultiSelector's status tooltips stay open under a reason; a Tooltip around a field with
labelTooltipshows only the reason (red-first); thesetHelddependency lint fix.Fourth round: coverage moved out of an every-render Effect into the show path plus the owner module's change notices. Red-first: a memoized child drops its label description when a reason turns on later (fails at da0246f, passes). An open label tooltip closes when a reason turns on and returns when it turns off, now without an Effect.
Third round: a field's status message under its disabled reason stays in the input's description (TextInput FR9, TextArea FR8). A Switch's help InfoTip opens on a press under the Switch's reason (InfoTip FR2). A Tooltip around a region with a disabled field and another control opens on that control.
Second round: a Tooltip around a ComplexSelector disabled with a reason shows only the reason, and a controlled
isOpenlabel tooltip under a reason keeps its value and shows once the reason ends. Both fail at the first head and pass. CheckboxList's pending-changeActiontest, which the first head's every-render state update hung, passes.Consumer suites (one worker):
All pass. The remaining five (CheckboxInput, CheckboxList, TextInput, Slider, TextArea) run in CI's full suite.
Size
Scope
Writing rubric results
Run over
component:TooltipFR14, its verification row and the Internal modules table:Owner: fix-loop lane 4. Land path: Held for the owner's answer on the container-Tooltip case; then CodeBunny, CI, and the drain merges.