Repository navigation
fix(Tooltip): a trigger that appears under a still pointer opens no tooltip - #11831
Conversation
…ooltip A browser sends a trigger its arrival (mouseenter) when the trigger appears or moves under a pointer that does not move, as after a click that opens a dialog whose close button lands under the pointer. The tooltip took that arrival as a hover and opened. Now the arrival only arms the hover, and the show delay starts on the first pointermove or mousemove over the trigger. A pointer that moves onto the trigger sends that move in the same frame, so a real hover opens as before. Firefox sends the pointermove before the mouseenter, so the mousemove after it counts too. Truncated Text and Heading (and Lab's LineClamp) mount their tooltip on the first hover. That hover now also counts from the first mouse or pen pointermove, not from pointerenter, which the browser sends with the arrival. A mouse press still ends that hover until the pointer leaves. Tests that opened a tooltip with a bare mouseEnter or pointerEnter now also send the move a browser sends with it. Fixes meta#11605
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| PowerSearch · Storybook | 322.1 kB (+518 B) · 27.3 kB CSS (0) | 7,198 (0) | — · ✗ · — |
| Tokenizer · Storybook | 114.8 kB (+474 B) · 21.9 kB CSS (0) | 2,680 (0) | — · ✗ · — |
| FileInput · Storybook | 78.5 kB (+454 B) · 12.9 kB CSS (0) | 794 (0) | — · ✗ · — |
157 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Tooltip · Storybook | 33.4 kB (+379 B) · 4.8 kB CSS (0) | 984 (+59) | — · ✗ · — |
| Text · Storybook | 11.9 kB (+255 B) · 5.8 kB CSS (0) | 1,039 (+23) | — · ✗ · — |
| MobileNav | 81.0 kB (+533 B) · 11.8 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 312.0 kB (+510 B) · 2.7 kB CSS (0) | — | — · — · — |
| RadioListItem | 80.0 kB (+502 B) · 11.2 kB CSS (0) | — | — · — · — |
| DialogHeader | 71.8 kB (+498 B) · 12.9 kB CSS (0) | — | — · — · — |
| AppShell | 92.7 kB (+497 B) · 14.9 kB CSS (0) | — | — · — · — |
| Calendar | 79.7 kB (+496 B) · 11.8 kB CSS (0) | — | — · — · — |
| NumberInput · Storybook | 107.3 kB (+493 B) · 13.1 kB CSS (0) | 1,482 (0) | — · ✓ · — |
| ComplexSelector · Storybook | 85.0 kB (+491 B) · 13.3 kB CSS (0) | 750 (0) | — · ✓ · — |
| MultiSelector · Storybook | 110.7 kB (+490 B) · 18.9 kB CSS (0) | 2,789 (0) | — · ✓ · — |
| TableSelectionToolbar | 79.1 kB (+490 B) · 14.6 kB CSS (0) | — | — · — · — |
| Thumbnail | 73.0 kB (+488 B) · 12.7 kB CSS (0) | — | — · — · — |
| Banner | 70.6 kB (+484 B) · 11.7 kB CSS (0) | — | — · — · — |
| CodeBlock | 84.7 kB (+484 B) · 12.9 kB CSS (0) | — | — · — · — |
| ChatSendButton | 69.0 kB (+482 B) · 11.2 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 385.2 kB (+482 B) · 2.4 kB CSS (0) | — | — · — · — |
| Link | 58.7 kB (+479 B) · 7.4 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 70.3 kB (+478 B) · 11.8 kB CSS (0) | — | — · — · — |
| lab/Comments | 392.1 kB (+477 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 97.7 kB (+477 B) · 2.3 kB CSS (0) | — | — · — · — |
| lab/TransferList | 141.1 kB (+477 B) · 1.2 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 106.3 kB (+476 B) · 1.8 kB CSS (0) | — | — · — · — |
| DrawerHeader | 71.9 kB (+475 B) · 14.3 kB CSS (0) | — | — · — · — |
| TableCell | 109.4 kB (+475 B) · 20.2 kB CSS (0) | — | — · — · — |
| lab/Schedule | 120.2 kB (+475 B) · 3.9 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 83.9 kB (+474 B) · 12.6 kB CSS (0) | — | — · — · — |
| ToggleButton | 96.0 kB (+474 B) · 11.3 kB CSS (0) | — | — · — · — |
| Pagination | 155.9 kB (+473 B) · 20.1 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 69.2 kB (+472 B) · 11.2 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 72.7 kB (+472 B) · 162 B CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 318.3 kB (+472 B) · 454 B CSS (0) | — | — · — · — |
| lab/TourStep | 98.0 kB (+471 B) · 691 B CSS (0) | — | — · — · — |
| SideNavHeading | 89.7 kB (+470 B) · 12.5 kB CSS (0) | — | — · — · — |
| ContextMenu | 108.1 kB (+469 B) · 19.6 kB CSS (0) | — | — · — · — |
| ListItem | 83.1 kB (+469 B) · 12.6 kB CSS (0) | — | — · — · — |
| TopNavHeading | 89.4 kB (+469 B) · 12.4 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 288.7 kB (+469 B) · 2.4 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 85.2 kB (+468 B) · 12.1 kB CSS (0) | — | — · ✓ · — |
| Button | 68.5 kB (+468 B) · 11.2 kB CSS (0) | — | — · — · — |
| TopNavMenu | 88.8 kB (+468 B) · 12.4 kB CSS (0) | — | — · — · — |
| RadioList | 63.8 kB (+467 B) · 7.7 kB CSS (0) | — | — · ✓ · — |
| Stepper | 70.3 kB (+467 B) · 11.3 kB CSS (0) | — | — · — · — |
| Table | 127.6 kB (+466 B) · 21.2 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 122.0 kB (+466 B) · 751 B CSS (0) | — | — · — · — |
| TabMenu | 85.9 kB (+465 B) · 12.3 kB CSS (0) | — | — · — · — |
| TextArea · Storybook | 96.0 kB (+464 B) · 10.0 kB CSS (0) | 509 (0) | — · ✓ · — |
| ChatLayout | 92.3 kB (+463 B) · 11.7 kB CSS (0) | — | — · — · — |
| Typeahead | 96.7 kB (+463 B) · 14.4 kB CSS (0) | — | — · ✓ · — |
| Toast | 108.5 kB (+461 B) · 11.5 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 188.5 kB (+461 B) · 1.9 kB CSS (0) | — | — · — · — |
| CheckboxList | 76.4 kB (+460 B) · 8.2 kB CSS (0) | — | — · ✓ · — |
| TableHeaderCell | 109.2 kB (+460 B) · 20.0 kB CSS (0) | — | — · — · — |
| Field | 62.3 kB (+459 B) · 7.7 kB CSS (0) | — | — · ✓ · — |
| lab/DialogHeroHeader | 93.2 kB (+459 B) · 372 B CSS (0) | — | — · — · — |
| ChatComposer | 91.9 kB (+458 B) · 13.5 kB CSS (0) | — | — · — · — |
| IconButton | 68.6 kB (+458 B) · 11.2 kB CSS (0) | — | — · — · — |
| Switch · Storybook | 112.6 kB (+458 B) · 10.5 kB CSS (0) | 1,815 (0) | — · ✓ · — |
| ChatLayoutScrollButton | 69.1 kB (+457 B) · 11.4 kB CSS (0) | — | — · — · — |
| MoreMenu | 134.9 kB (+457 B) · 19.8 kB CSS (0) | — | — · — · — |
| AlertDialog | 135.3 kB (+456 B) · 16.3 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 89.0 kB (+456 B) · 12.5 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 89.0 kB (+455 B) · 12.5 kB CSS (0) | — | — · — · — |
| CheckboxInput · Storybook | 72.4 kB (+453 B) · 10.7 kB CSS (0) | 457 (0) | — · ✓ · — |
| DateRangeInput · Storybook | 107.7 kB (+453 B) · 14.2 kB CSS (0) | 704 (0) | — · ✓ · — |
| DropdownMenu | 134.6 kB (+451 B) · 19.8 kB CSS (0) | — | — · — · — |
| Lightbox | 152.3 kB (+450 B) · 12.3 kB CSS (0) | — | — · — · — |
| Slider · Storybook | 117.9 kB (+449 B) · 9.3 kB CSS (0) | 2,497 (0) | — · ✓ · — |
| Selector | 123.0 kB (+448 B) · 19.7 kB CSS (0) | — | — · ✓ · — |
| lab/AudioPlayer | 240.5 kB (+448 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 131.4 kB (+448 B) · 1.1 kB CSS (0) | — | — · — · — |
| TopNav | 72.1 kB (+447 B) · 12.1 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 69.4 kB (+443 B) · 11.2 kB CSS (0) | — | — · — · — |
| SideNavItem | 83.8 kB (+443 B) · 12.3 kB CSS (0) | — | — · — · — |
| InputGroup | 64.4 kB (+441 B) · 8.9 kB CSS (0) | — | — · — · — |
| SideNav | 116.9 kB (+440 B) · 12.6 kB CSS (0) | — | — · ✓ · — |
| TopNavMegaMenu | 83.0 kB (+440 B) · 13.1 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 229.6 kB (+439 B) · 451 B CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 230.7 kB (+438 B) · 1.5 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 104.4 kB (+437 B) · 14.0 kB CSS (0) | — | — · — · — |
| TimeInput · Storybook | 182.9 kB (+437 B) · 17.9 kB CSS (0) | 1,890 (0) | — · ✓ · — |
| lab/MediaPlaybackRate | 230.7 kB (+437 B) · 1.5 kB CSS (0) | — | — · — · — |
| Markdown | 212.2 kB (+436 B) · 23.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 230.7 kB (+436 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 230.7 kB (+436 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/ListInput | 98.2 kB (+435 B) · 922 B CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 230.7 kB (+435 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 230.7 kB (+434 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 230.7 kB (+434 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 230.7 kB (+434 B) · 1.5 kB CSS (0) | — | — · — · — |
| Carousel | 78.9 kB (+433 B) · 12.1 kB CSS (0) | — | — · — · — |
| TextInput · Storybook | 102.3 kB (+432 B) · 12.9 kB CSS (0) | 416 (0) | — · ✓ · — |
| lab/TransferListSelector | 153.0 kB (+427 B) · 1.4 kB CSS (0) | — | — · — · — |
| Popover | 106.8 kB (+425 B) · 15.5 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 238.0 kB (+423 B) · 2.1 kB CSS (0) | — | — · — · — |
| DateInput · Storybook | 210.5 kB (+415 B) · 19.0 kB CSS (0) | 6,363 (0) | — · ✓ · — |
| lab/ChatEmojiPicker | 130.1 kB (+415 B) · 773 B CSS (0) | — | — · — · — |
| DateTimeInput · Storybook | 234.8 kB (+406 B) · 20.7 kB CSS (0) | 3,719 (0) | — · ✓ · — |
| charts/Chart | 253.0 kB (+405 B) · 516 B CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 53.5 kB (+392 B) · 6.0 kB CSS (0) | — | — · — · — |
| StatusDot | 35.2 kB (+391 B) · 5.7 kB CSS (0) | — | — · — · — |
| AvatarGroup | 50.2 kB (+386 B) · 6.1 kB CSS (0) | — | — · — · — |
| Avatar | 47.4 kB (+382 B) · 6.0 kB CSS (0) | — | — · — · — |
| FieldLabel | 57.8 kB (+375 B) · 6.1 kB CSS (0) | — | — · ✓ · — |
| lab/CommentPin · Storybook | 62.2 kB (+372 B) · 1.2 kB CSS (0) | 413 (0) | — · ✓ · — |
| Drawer | 59.0 kB (+371 B) · 8.7 kB CSS (0) | — | — · — · — |
| InfoTip · Storybook | 52.5 kB (+363 B) · 5.7 kB CSS (0) | 150 (0) | — · ✓ · — |
| SegmentedControl | 104.2 kB (+342 B) · 7.2 kB CSS (0) | — | — · ✓ · — |
| Spinner | 25.6 kB (+292 B) · 6.6 kB CSS (0) | — | — · — · — |
| charts/ChartLegend | 42.4 kB (+276 B) · 224 B CSS (0) | — | — · — · — |
| lab/LineClamp · Storybook | 14.4 kB (+272 B) · 168 B CSS (0) | 387 (+4) | — · ✓ · — |
| ChatMessageList | 29.0 kB (+261 B) · 7.4 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 33.5 kB (+261 B) · 8.8 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 82.0 kB (+260 B) · 11.0 kB CSS (0) | — | — · — · — |
| Timestamp | 28.3 kB (+259 B) · 11.4 kB CSS (0) | — | — · — · — |
| Timer | 14.4 kB (+256 B) · 6.4 kB CSS (0) | — | — · — · — |
| Heading | 12.8 kB (+254 B) · 5.8 kB CSS (0) | — | — · — · — |
| NavHeadingMenuItem | 19.7 kB (+248 B) · 6.7 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 34.6 kB (+240 B) · 7.9 kB CSS (0) | — | — · — · — |
| CommandPalette | 84.6 kB (+227 B) · 13.5 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 39.9 kB (+153 B) · 7.3 kB CSS (0) | — | — · — · — |
| SelectableCard | 19.8 kB (+55 B) · 8.1 kB CSS (0) | — | — · — · — |
| lab/NavigationScreen | 86.8 kB (+54 B) · 1.5 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 30.3 kB (+53 B) · 7.6 kB CSS (0) | — | — · — · — |
| Toolbar | 48.5 kB (+53 B) · 8.6 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 86.8 kB (+53 B) · 1.5 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 19.5 kB (+52 B) · 3.5 kB CSS (0) | — | — · — · — |
| lab/TabBar | 84.9 kB (+51 B) · 1.8 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 29.4 kB (+49 B) · 7.1 kB CSS (0) | — | — · — · — |
| Tab | 15.3 kB (+49 B) · 4.3 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.9 kB (+48 B) · 4.0 kB CSS (0) | — | — · — · — |
| TreeList | 47.8 kB (+48 B) · 6.0 kB CSS (0) | — | — · — · — |
| Item | 21.6 kB (+47 B) · 6.2 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 15.6 kB (+47 B) · 4.2 kB CSS (0) | — | — · — · — |
| SelectorOption | 25.4 kB (+45 B) · 6.8 kB CSS (0) | — | — · — · — |
| Step | 32.5 kB (+45 B) · 5.7 kB CSS (0) | — | — · — · — |
| TabList | 48.6 kB (+45 B) · 6.8 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 19.6 kB (+44 B) · 3.4 kB CSS (0) | — | — · — · — |
| ClickableCard | 19.6 kB (+44 B) · 7.9 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.9 kB (+44 B) · 3.6 kB CSS (0) | — | — · — · — |
| Dialog | 29.0 kB (+44 B) · 7.3 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 30.2 kB (+44 B) · 7.6 kB CSS (0) | — | — · — · — |
| HoverCard | 31.2 kB (+44 B) · 4.8 kB CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 58.0 kB (+44 B) · 223 B CSS (0) | — | — · — · — |
| Collapsible | 30.1 kB (+43 B) · 4.5 kB CSS (0) | — | — · — · — |
| Outline | 27.2 kB (+43 B) · 4.3 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 19.9 kB (+43 B) · 4.4 kB CSS (0) | — | — · — · — |
| lab/PageControl | 79.4 kB (+42 B) · 709 B CSS (0) | — | — · — · — |
| Token | 31.4 kB (+40 B) · 5.0 kB CSS (0) | — | — · — · — |
| ButtonGroup | 45.3 kB (+39 B) · 3.7 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 42.5 kB (+35 B) · 3.7 kB CSS (0) | — | — · — · — |
| BottomSheet | 77.1 kB (+32 B) · 7.8 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuFeaturedCard | 8.6 kB (+14 B) · 3.6 kB CSS (0) | — | — · — · — |
| ProgressBar | 12.5 kB (0) · 6.7 kB CSS (0) | — | — · — · — |
| SideNavSection | 7.2 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| TypeaheadItem | 6.7 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 8.02 MB packed (+4.2 kB); no new dependencies.
Wide change (27 components): add ci:run-visual for Visual, ci:run-rtl for RTL.
CI impact: 0 job-min per update · pool 0% · time to green −0.3 min · standard runners · 1 CI action or script file changed (not measured)
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 228.8 | 228.8 | 0 |
| Runner pool, runner-minutes a day | 54,880 | 54,880 | 0 (0%) |
| Average concurrent jobs | 38.1 | 38.1 | 0 |
| Time to green (median → this run) | 20.8 min | 20.5 min | −0.3 min |
| Runs a day | 240 | 240 | 0 |
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/lib/a11y-spec-files.mjs.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Accessibility: 5 violation(s)
Accessibility Audit
Status: 5 accessibility violation(s) found — 5 serious.
FileInput - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 3/16 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
PowerSearch - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/37 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Text - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/24 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Tokenizer - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/32 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Tooltip - 1 issue(s)
- 🟠 serious: Ensure elements that have scrollable content are accessible by keyboard in Safari
- Rule:
scrollable-region-focusable· Affects 1/28 stories · Learn more - WCAG: 2.1.1, 2.1.3 (Level A)
- Rule:
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approval waits on an engineering owner's reading of the Tooltip spec, not on a code change.
component:Tooltip FR3 says entering the trigger opens the tooltip after delay, but it does not say whether a trigger that appears or moves under a still mouse or pen, or content scrolled under it, has been entered, and this change alters that default hover behavior for every mouse and pen user, scroll case included. An engineering owner records the ruling by commenting /approve-spec followed by the full head commit SHA on this pull request; the author may do so if they are an engineering owner. CI has not run on this head yet: a maintainer adds the ci:run label so it runs.
There are no blocking code findings.
- Non-blocking: the new comment in
useTooltip.tsx(lines 529–530) says the delay starts "as before"; describing the current code instead (for example "so a real hover opens afterdelay") keeps it accurate after merge.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- A tooltip trigger that appears under a resting mouse opens its tooltip on main and stays closed here until the first move: verified in Chromium (Tooltip Default story, trusted enter events and no move) and by the new unit tests, which fail on main and pass here.
- Cause: the hook opened on the arrival event, which browsers send with no move after a layout change: verified in the base code and the Chromium event log.
- The arrival only arms the hover, and the first pointer or mouse move starts the delay: verified (
useTooltip.tsxlines 532–548, listeners at 801–803). - Firefox's move-before-enter order is covered by the following
mousemove: verified in code and a unit test; Firefox not run. - A finger's move never opens, and leaving before a move opens nothing later: verified (
useTooltip.tsxlines 540 and 555, unit tests). - Truncated Text, Heading and Lab LineClamp mount their tooltip on the first mouse or pen move, a press ends that hover until the pointer leaves, and the mounted tooltip answers at once: verified (
TruncationTooltip.tsxlines 116–157,useTooltip.tsxline 845, unit tests). - Callers' own pointer-enter and pointer-move handlers still run: verified (new Text, Heading and LineClamp tests pass).
- No public API change, and the internal line-clamp field rename is matched in Lab: verified (built API surfaces unchanged; Core and Lab source typecheck pass).
- No visual or string change: verified (no style or string edits).
- The
delaydocs say the delay starts on the first move: verified. - 61 existing hover calls (60 in Core, 1 in Lab) and 4 truncation calls now send a move: verified (65 one-line additions, plus one Heading call rewritten in place).
- 13 new unit cases, 5 of them failing on main: verified.
- Content scrolled under a still mouse also stays closed until a move: verified in Chromium (wheel scroll).
- The new browser spec passes in three engines, and every changed line and branch is covered: not checked here (spec not run, coverage not run).
- Build, typecheck and lint pass: Core build, Core typecheck, Lab source typecheck and lint of the changed sources verified; the full suites were not run.
- Changeset: a trigger that appears or moves under a mouse or pen that does not move opens no tooltip, truncated Text and Heading included, the delay starts on the first move, and a moving pointer opens as before: verified in Chromium and unit tests (pen by the shared code path); Firefox and WebKit not run.
Files:
useTooltip.tsx: clear apart from the comment wording above.TruncationTooltip.tsx,Text.tsx,Heading.tsx, LabLineClamp.tsx: clear.Tooltip.doc.mjs,useTooltip.doc.mjs, the changeset: clear.TooltipStillPointer.a11y.browser.spec.ts: clear.useTooltip.test.tsx,Tooltip.test.tsx,Text.test.tsx,Heading.test.tsx, LabLineClamp.test.tsx: clear.- One-line hover updates in the CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's reading of the Tooltip spec; there are no blocking code findings, and the reworded arrival comment resolves the earlier wording note.
component:Tooltip FR3 says entering the trigger opens the tooltip after delay, but it does not say whether a trigger that appears or moves under a still mouse or pen, or content scrolled under it, has been entered, and this change alters that default hover behavior for every mouse and pen user, scroll case included. An engineering owner records the ruling by commenting /approve-spec followed by the full head commit SHA on this pull request; the author may do so if they are an engineering owner. CI has not run on this head yet: a maintainer adds the ci:run label so it runs.
Claims and files checked
Review mode: full; reason: author-not-engowner
Claims:
- A trigger that appears under a resting mouse opens its tooltip on main and stays closed here until the first move: verified in Chromium (Tooltip Default story: trusted enter events and no move; main opens, this head stays closed, a 2 px move opens it) and by the new unit tests, which fail on main and pass here.
- Cause: the hook opened on the arrival event, which browsers send with no move after a layout change: verified in the base code and the Chromium and Firefox event logs.
- The arrival only arms the hover, and the first pointer or mouse move starts the delay: verified (
useTooltip.tsxlines 533–549, listeners at 803–804). - Firefox sends the pointer move before the arrival, so the mouse move that follows counts: verified in Firefox (event order pointerenter, pointermove, mouseenter, mousemove; the tooltip opens) and by a unit test.
- A finger's move never opens, and leaving before a move opens nothing later: verified (
useTooltip.tsxlines 541 and 556, unit tests). - Truncated Text, Heading and Lab LineClamp mount their tooltip on the first mouse or pen move, a press ends that hover until the pointer leaves, and the mounted tooltip answers at once: verified (
TruncationTooltip.tsxlines 116–157,useTooltip.tsxline 846, unit tests; truncated Text in Chromium and Firefox). - Callers' own pointer-enter and pointer-move handlers still run: verified (new Text, Heading and LineClamp tests pass).
- Selector already ignores a still mouse after a key scroll: verified (its listbox hold waits for a move or press).
- No public API change, and the internal line-clamp field rename is matched in Lab: verified (built API surfaces identical; Core and Lab source typecheck pass).
- No visual or string change: verified (no style or string edits).
- The
delaydocs say the delay starts on the first move: verified. - Existing hover calls (61 bare mouse-enter calls and 4 truncation pointer-enter calls) now send the move: verified (65 one-line additions, plus one Heading call rewritten in place).
- 13 new unit cases, 5 of them failing on main: verified.
- Content scrolled under a still mouse also stays closed until a move: verified in Chromium (wheel scroll).
- A trigger that moves under a still mouse stays closed too: verified through the shared code path and unit tests; not probed in a browser here.
- The new browser spec passes in three engines, and every changed line and branch is covered: not checked here (spec and coverage not run).
- Build, typecheck and lint pass: verified for the build, Core and theme builds, Core typecheck, Lab source typecheck and strict lint of the changed files; the full suites were not run.
- First-load cost on the four reference pages is under 0.3 KB: not checked here (default behavior is outside the size rule).
- The review follow-up only rewords one source comment: verified.
- Claims about the other pull request for the same issue: not checked (context only).
- Changeset: a trigger that appears or moves under a mouse or pen that does not move opens no tooltip, truncated Text and Heading included; the delay starts on the first move; a moving pointer opens as before in Chromium, Firefox and WebKit: verified in Chromium and Firefox and by unit tests (pen through the shared code path); WebKit not run here.
Files:
useTooltip.tsx: clear.TruncationTooltip.tsx,Text.tsx,Heading.tsx, LabLineClamp.tsx: clear.Tooltip.doc.mjs,useTooltip.doc.mjs, the changeset: clear.TooltipStillPointer.a11y.browser.spec.ts: clear (read, not run).useTooltip.test.tsx,Tooltip.test.tsx,Text.test.tsx,Heading.test.tsx, LabLineClamp.test.tsx: clear.- One-line hover updates in the CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests: clear.
… two more cases Maintainer edit after the specification review: - Tooltip FR3 states its meaning: entering means the pointer moves onto the trigger; a trigger that appears or moves under a pointer that has not moved is not entered until the pointer moves. The wording follows bezabyte's proposal in meta#11819. - Two browser cases keep the line from reaching too far: a wheel or keyboard scroll that brings the trigger under a still mouse opens nothing until the mouse moves; a mouse already over the trigger when it mounts opens it on its first move. - The still-pointer unit cases press the trigger, which sets the document's interaction modality. They now reset it, so the keyboard-focus cases main added after this branch began still run with the keyboard default. Co-authored-by: bezabyte <[email protected]>
|
/approve-spec 4412dae |
There was a problem hiding this comment.
Approved pending CI: lint has passed, and the unit test shards, typecheck, builds and browser legs are still running on this head, so merging waits for them.
The still-pointer change for Tooltip triggers and truncated Text, Heading and LineClamp follows the Tooltip spec as amended here, which an engineering owner approved for this exact head, and the new unit cases fail on main and pass with this change. This head only merges main, which changes none of this pull request's files, so the earlier findings stand unchanged. The WebKit limit the description discloses stays a known, non-blocking gap, and it also applies when a page's only hover tooltip is disabled and enabled again (see the open inline note on the input stream).
Claims and files checked
Review mode: carry-forward; reason: none
- Changeset: a trigger that appears or moves under a mouse or pen that does not move opens no tooltip — verified (the still-arrival unit case fails on main and passes here; in Chromium main shows the tooltip after a click-away with the mouse still, this change waits for a 1 px move).
- Changeset: this includes the full-text tooltip of truncated Text and Heading — verified (the Text and Heading arrival-without-move cases fail on main; Chromium frames of the truncated Text story).
- Changeset: the show delay starts on the first move over the trigger — verified (closed 199 ms after the move, open at 200 ms).
- Changeset: a pointer that moves onto the trigger opens as before in Chromium, Firefox and WebKit — verified in Chromium (identical frames on both trees) and for Firefox's event order (unit case); Firefox and WebKit browsers not run here.
- Changeset: after a scroll the same holds once the mouse has moved since the trigger appeared — verified for a wheel scroll in Chromium; in WebKit consistent with the input stream's record lifetime, which also restarts when a page's only hover tooltip is disabled and enabled again (non-blocking note).
- Changeset: a test that opens a tooltip with a bare mouseEnter now has to send a move — verified (a bare arrival opens nothing).
- Description: main schedules the show on mouseenter and mounts the truncation tooltip on pointerenter, which engines send after a layout change with no move — verified (base code; Chromium logged a trusted pointerenter and mouseenter and no move).
- Description: every control with a tooltip and truncated Text and Heading are affected — verified (they share the changed hooks).
- Description: an arrival only arms the hover, the first pointermove or mousemove shows it, Firefox's following mousemove counts, a finger's move never opens, and a leave clears the arrival — verified (hook code; unit cases).
- Description: the Tooltip, Text and Heading records govern, and Selector already treats a still mouse this way — verified (records; the list highlight hook compares pointer points).
- Description: content scrolled under a still mouse no longer opens a tooltip until the mouse moves — verified for a wheel scroll in Chromium.
- Description: truncated text starts its hover on the first mouse or pen move, a press ends it until the pointer leaves, the mounted tooltip answers that hover, and callers' handlers still run — verified (hook code; Text, Heading and LineClamp cases).
- Description: no public API change, the renamed field is on Core's internal line-clamp entry, no visual change or string, and the delay docs say the delay starts on the first move — verified (generated surfaces of build, Core and the seven themes show no row; doc diff).
- Description: about 75 existing hover call sites in Core and one in Lab gained a move line, only where needed — consistent (73 isolated one-line moves in Core and 1 in Lab, plus moves in edited Text and Heading cases).
- Description: 21 new unit cases, 11 failing on main and passing here, and 10 guards that pass on both — verified.
- Description: the hover-then-focus Text case now moves the mouse and still checks that no description is added — verified.
- Description: removing the press flag fails the Text press-before-move case — verified (exactly that case fails, 1 of 154).
- Description: before and after results in three engines, and a mouse that moves onto the trigger opens it before and after — verified in Chromium; Firefox and WebKit not run here.
- Description: main merged cleanly, the Tooltip record defines entering, the extra browser cases exist, and the unit cases reset interaction modality — verified (record diff, spec files, reset hook; the latest merge of main is clean and touches none of this change's files).
- Description: the input stream keeps the point before and at the latest move per held window, and Tooltip triggers and truncated text share that one check — verified (stream and hook code).
- Description: one hold per window, taken or moved by the trigger's ref callback, released a microtask after a detach, following isEnabled and isOpen, held by truncatable text on its element's window, one native listener, and a dispatch that reads no layout — verified (code; one-listener, iframe, hold-rule and re-attach cases).
- Description: truncated text measures once per hover — verified (one measure over 20 moves); the Table width-read count was not reproduced.
- Description: the scroll cases live in an interaction spec that CI's WebKit leg runs — spec contents verified; the browser legs were still running on this head.
- Description: the list highlight hold keeps its own check, for the reasons given — verified (it compares screen points across holds and serves pens).
- Description: only tooltips a hover can open hold the window, and the Slider listener check passes — the hold rule verified (disabled, controlled and uncontrolled case); the Slider browser check not run here.
- Description: the known WebKit limit before a window's first recorded move — consistent with the code; it also covers a sole tooltip disabled and enabled again (non-blocking note).
- Description: the runtime record lists the still-mouse check, and the writing rubric results for both record changes — verified (record diff).
- Description: first-load deltas of about +0.4 KB gzip on the four reference pages — verified in substance (+442, +455, +465 and +415 B against the base); the table's figures come from an earlier main.
- Description: the Firefox hover-spec list names the new spec — verified (it moves the pointer in the Tooltip folder, as the list requires).
- Description: test, lint and browser results from earlier heads — superseded; with this same patch the 32 changed test files pass (3,199 tests).
- Description: results for the related pull request — not rechecked; they describe no code in this change.
packages/core/src/Tooltip/useTooltip.tsx— clear.packages/core/src/utils/inputStream.ts— clear; the disclosed WebKit first-move limit stays open (non-blocking).packages/core/src/Text/TruncationTooltip.tsx— clear.packages/core/src/Text/Text.tsx,Heading/Heading.tsx, LabLineClamp/LineClamp.tsx— clear.docs/specs/components/Tooltip/Tooltip.spec.md,docs/architecture/react-component-runtime.md— clear (approved for this head).Tooltip/Tooltip.doc.mjs,Tooltip/useTooltip.doc.mjs, the changeset — clear..github/scripts/lib/a11y-spec-files.mjs— clear (adds the still-pointer spec to the Firefox hover specs).useTooltip.test.tsx,Text.test.tsx,Heading.test.tsx,TruncationTooltip.test.tsx,inputStream.test.ts, LabLineClamp.test.tsx,TooltipStillPointer.a11y.browser.spec.ts,TooltipStillPointerScroll.interaction.browser.spec.ts— clear.- One-line hover moves in the Tooltip, CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests — clear.
|
/approve-spec 8bf2173 |
There was a problem hiding this comment.
Approved pending CI: typecheck and lint pass on this head, and the unit test shards, builds and browser legs are still running on it, so merging waits for them.
The still-pointer change for Tooltip triggers and truncated Text, Heading and LineClamp follows the Tooltip spec as amended here, which an engineering owner approved for this exact head, and the new unit cases pin both halves of the amended rule. This head merges main cleanly; the one file both sides touch only shifts a test hunk. One non-blocking gap remains: in WebKit, the repeated move after a scroll still counts while a window has no earlier mouse point, which the description lists as a known limit but the changeset's shorter wording leaves out for a tooltip that is disabled and enabled again.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Changeset: a trigger that appears or moves under a still mouse or pen opens no tooltip — verified (still-arrival unit case;
mainschedules the show onmouseenter). - Changeset: this includes the full-text tooltip of truncated Text and Heading — verified (Text and Heading arrival-without-move cases).
- Changeset: the show delay starts on the first move over the trigger — verified (closed 199 ms after the move, open at 200 ms).
- Changeset: a pointer that moves onto the trigger opens as before in Chromium, Firefox and WebKit — verified in code, the browser specs and the Firefox event-order case; the engines were not run in this review.
- Changeset: after a scroll the same holds once the mouse has moved since the trigger appeared — verified in code, except a record restart when a page's only hover tooltip is disabled and enabled again (non-blocking; the description's known limit covers it).
- Changeset: a test that opens a tooltip with a bare
mouseEnternow has to send a move — verified (a bare arrival opens nothing). - Description:
mainschedules the show onmouseenterand mounts the truncation tooltip onpointerenter, which engines send after a layout change with no move — verified (base code; the browser spec checks a trustedmouseenterand no move). - Description: every control with a tooltip and truncated Text and Heading are affected — verified (they share the changed hooks).
- Description: an arrival only arms the hover, the first
pointermoveormousemoveshows it, Firefox's followingmousemovecounts, a finger's move never opens, and a leave clears the arrival — verified (hook code; unit cases). - Description: the Tooltip, Text and Heading records govern, and Selector already treats a still mouse this way — verified (records; the list highlight hook compares pointer points).
- Description: content scrolled under a still mouse no longer opens a tooltip until the mouse moves — verified in code and the scroll spec.
- Description: truncated text starts its hover on the first mouse or pen move, a press ends it until the pointer leaves, the mounted tooltip answers that hover, and callers' handlers still run — verified (hook code; Text, Heading and LineClamp cases).
- Description: no public API change, the renamed field is on Core's internal line-clamp entry, no visual change or string, and the delay docs say the delay starts on the first move — verified from source.
- Description: about 75 existing hover call sites gained one move line each, only where needed — consistent (one-line moves in 24 Core test files and one Lab file, plus moves in edited Text and Heading cases).
- Description: 21 new unit cases, 11 failing on
mainand 10 guards — 21 verified by count; the red-first split is consistent with the base code. - Description: the hover-then-focus Text case now moves the mouse and still checks that no description is added — verified.
- Description: removing the press flag fails the Text press-before-move case — verified (without it the case's move reaches the hover).
- Description: before and after results in three engines, and a mouse that moves onto the trigger opens it before and after — consistent with the browser specs; not run in this review.
- Description: the Tooltip record now defines entering, two more browser cases exist, and the still-pointer unit cases reset interaction modality — verified (record diff, spec files, reset hook).
- Description: the input stream keeps each held window's point before and at its latest move, and Tooltip triggers and truncated text share that one check — verified.
- Description: one hold per window, taken or moved by the trigger's ref callback, released a microtask after a detach, following
isEnabledandisOpen, held by truncatable text on its element's window, one native listener, and a dispatch that reads no layout — verified (code; one-listener, iframe, hold-rule and re-attach cases). - Description: truncated text measures once per hover — verified (one measure over 20 moves); the Table width-read count was not reproduced.
- Description: the scroll cases live in an interaction spec that CI's WebKit leg runs — spec contents verified; the leg has not run on this head.
- Description: the list highlight hold keeps its own check, for the reasons given — verified.
- Description: only tooltips a hover can open hold the window, and the Slider listener check passes — the hold rule verified; the Slider check not run here.
- Description: the known WebKit limit before a window's first recorded move — consistent with the code.
- Description: the runtime record lists the still-mouse check, and the writing rubric results for both record changes — verified (record diff).
- Description: first-load deltas of about +0.4 KB gzip on the four reference pages — reported as required; not re-measured here.
- Description: the Firefox hover-spec list names the new spec — verified.
- Description: test, lint and browser results from earlier heads — superseded; typecheck and lint pass on this head.
- Description: results for the related pull request — not rechecked; they describe no code in this change.
packages/core/src/Tooltip/useTooltip.tsx— clear.packages/core/src/utils/inputStream.ts— clear; the WebKit fresh-record limit stays open (non-blocking).packages/core/src/Text/TruncationTooltip.tsx— clear.packages/core/src/Text/Text.tsx,packages/core/src/Heading/Heading.tsx,packages/lab/src/LineClamp/LineClamp.tsx— clear.docs/specs/components/Tooltip/Tooltip.spec.md,docs/architecture/react-component-runtime.md— clear (approved for this head).Tooltip/Tooltip.doc.mjs,Tooltip/useTooltip.doc.mjs, the changeset — clear..github/scripts/lib/a11y-spec-files.mjs— clear (adds the still-pointer spec to the Firefox hover specs).useTooltip.test.tsx,Text.test.tsx,Heading.test.tsx,TruncationTooltip.test.tsx,inputStream.test.ts, LabLineClamp.test.tsx,TooltipStillPointer.a11y.browser.spec.ts,TooltipStillPointerScroll.interaction.browser.spec.ts— clear.- One-line hover moves in the Tooltip, CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests — clear.
|
/approve-spec 9ede652 |
There was a problem hiding this comment.
Approved pending CI: typecheck, lint and the CLI smoke test pass on this head, and the unit test shards, builds and browser legs have not run yet, so merging waits for them.
The still-pointer change for Tooltip triggers and truncated Text, Heading and LineClamp follows the Tooltip spec as amended here, which an engineering owner approved for this exact head, and the new unit cases and browser specs pin both halves of the amended rule. This head merges main cleanly; the one file both sides touch only shifts a test hunk. One non-blocking gap remains: in WebKit, the repeated move after a scroll still counts while a window has no earlier mouse point, which the description lists as a known limit but the changeset's shorter wording leaves out for a tooltip that is disabled and enabled again.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Changeset: a trigger that appears or moves under a still mouse or pen opens no tooltip — verified (still-arrival unit case; the base schedules the show on
mouseenter). - Changeset: this includes the full-text tooltip of truncated Text and Heading — verified (Text and Heading arrival-without-move cases).
- Changeset: the show delay starts on the first move over the trigger — verified (the unit case opens
delayafter the first move, not before). - Changeset: a pointer that moves onto the trigger opens as before in Chromium, Firefox and WebKit — verified in code and the specs (Firefox event-order case, one-step and several-step browser cases); the engines were not run in this review.
- Changeset: after a scroll the same holds once the mouse has moved since the trigger appeared — verified in code, except a record restart when a page's only hover tooltip is disabled and enabled again (non-blocking; the description's known limit covers it).
- Changeset: a test that opens a tooltip with a bare
mouseEnternow has to send a move — verified (a bare arrival opens nothing). - Description: the base schedules the show on
mouseenterand mounts the truncation tooltip onpointerenter, which engines send after a layout change with no move — verified (base code; the browser spec logs a trustedmouseenterand no move). - Description: every control with a tooltip and truncated Text and Heading are affected — verified (they share the changed hooks).
- Description: an arrival only arms the hover, the first
pointermoveormousemoveshows it, Firefox's followingmousemovecounts, a finger's move never opens, and a leave clears the arrival — verified (hook code; unit cases). - Description: the Tooltip, Text and Heading records govern, and a list control already treats a still mouse this way — verified (records; the list highlight hook compares pointer points).
- Description: content scrolled under a still mouse no longer opens a tooltip until the mouse moves — verified in code and the scroll spec.
- Description: truncated text starts its hover on the first mouse or pen move, a mouse press ends it until the pointer leaves, the mounted tooltip answers that hover, and callers' handlers still run — verified (hook code; Text, Heading and LineClamp cases).
- Description: no public API change, the renamed field is on Core's internal line-clamp entry, no visual change or string, and the delay docs say the delay starts on the first move — verified from source.
- Description: about 75 existing hover call sites gained one move line each, only where needed — consistent (74 one-line moves in 27 Core test files and Lab's CommentPin, plus the edited Heading case).
- Description: 21 new unit cases, 11 failing on
mainand 10 guards — 21 verified by count; the split matches an earlier rerun of these unchanged cases againstmain. - Description: the hover-then-focus Text case now moves the mouse and still checks that no description is added — verified.
- Description: removing the press flag fails the Text press-before-move case — verified (without it the move after the press reaches the hover).
- Description: before and after results in three engines, and a mouse that moves onto the trigger opens it before and after — consistent with the browser specs; not run in this review.
- Description: the Tooltip record now defines entering, two more browser cases exist, and the still-pointer unit cases reset interaction modality — verified (record diff, spec files, reset hook).
- Description: the input stream keeps each held window's point before and at its latest move, and Tooltip triggers and truncated text share that one check — verified.
- Description: one hold per window, taken or moved by the trigger's ref callback, released a microtask after a detach, following
isEnabledandisOpen, held by truncatable text on its element's window, one native listener, and a dispatch that reads no layout — verified (code; one-listener, iframe, hold-rule and re-attach cases). - Description: truncated text measures once per hover — verified (one measure over 20 moves); the Table width-read count was not reproduced.
- Description: the scroll cases live in an interaction spec that CI's WebKit leg runs — spec contents verified; the leg has not run on this head.
- Description: the list highlight hold keeps its own check, for the reasons given — verified.
- Description: only tooltips a hover can open hold the window, and the Slider listener check passes — the hold rule verified; the Slider check not run here.
- Description: the known WebKit limit before a window's first recorded move — consistent with the code.
- Description: the runtime record lists the still-mouse check, and the writing rubric results for both record changes — verified (record diff).
- Description: first-load deltas of about +0.4 KB gzip on the four reference pages — reported as required; not re-measured here.
- Description: the Firefox hover-spec list names the new spec — verified.
- Description: test, lint and browser results from earlier heads — not rerun in this review; CI must pass on this head.
- Description: results for the related pull request — not rechecked; they describe no code in this change.
packages/core/src/Tooltip/useTooltip.tsx— clear.packages/core/src/utils/inputStream.ts— clear; the WebKit fresh-record limit stays open (non-blocking).packages/core/src/Text/TruncationTooltip.tsx— clear.packages/core/src/Text/Text.tsx,packages/core/src/Heading/Heading.tsx,packages/lab/src/LineClamp/LineClamp.tsx— clear.docs/specs/components/Tooltip/Tooltip.spec.md,docs/architecture/react-component-runtime.md— clear (approved for this head).Tooltip/Tooltip.doc.mjs,Tooltip/useTooltip.doc.mjs, the changeset — clear..github/scripts/lib/a11y-spec-files.mjs— clear (adds the still-pointer spec to the Firefox hover specs).useTooltip.test.tsx,Tooltip.test.tsx,Text.test.tsx,Heading.test.tsx,TruncationTooltip.test.tsx,inputStream.test.ts, LabLineClamp.test.tsx,TooltipStillPointer.a11y.browser.spec.ts,TooltipStillPointerScroll.interaction.browser.spec.ts— clear.- One-line hover moves in the CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests — clear.
|
/approve-spec bc9785b |
There was a problem hiding this comment.
Approved pending CI: typecheck, lint and the CLI smoke test pass on this head, and the unit test shards, builds and browser legs run once review passes, so merging waits for them.
The still-pointer change for Tooltip triggers and truncated Text, Heading and LineClamp follows the Tooltip spec as amended here, which an engineering owner approved for this exact head, and the new unit cases and browser specs pin both halves of the amended rule. This head only merges main, which touches none of this pull request's files. One non-blocking gap remains: in WebKit, the repeated move after a scroll still counts while a window has no earlier mouse point, which the description lists as a known limit but the changeset's shorter wording leaves out for a tooltip that is disabled and enabled again.
Claims and files checked
Review mode: carry-forward; reason: none
- Changeset: a trigger that appears or moves under a still mouse or pen opens no tooltip — verified (still-arrival unit case; the base schedules the show on
mouseenter). - Changeset: this includes the full-text tooltip of truncated Text and Heading — verified (Text and Heading arrival-without-move cases).
- Changeset: the show delay starts on the first move over the trigger — verified (the unit case opens
delayafter the first move, not before). - Changeset: a pointer that moves onto the trigger opens as before in Chromium, Firefox and WebKit — verified in code and the specs (Firefox event-order case, one-step and several-step browser cases); the engines were not run in this review.
- Changeset: after a scroll the same holds once the mouse has moved since the trigger appeared — verified in code, except a record restart when a page's only hover tooltip is disabled and enabled again (non-blocking; the description's known limit covers it).
- Changeset: a test that opens a tooltip with a bare
mouseEnternow has to send a move — verified (a bare arrival opens nothing). - Description: the base schedules the show on
mouseenterand mounts the truncation tooltip onpointerenter, which engines send after a layout change with no move — verified (base code; the browser spec logs a trustedmouseenterand no move). - Description: every control with a tooltip and truncated Text and Heading are affected — verified (they share the changed hooks).
- Description: an arrival only arms the hover, the first
pointermoveormousemoveshows it, Firefox's followingmousemovecounts, a finger's move never opens, and a leave clears the arrival — verified (hook code; unit cases). - Description: the Tooltip, Text and Heading records govern, and a list control already treats a still mouse this way — verified (records; the list highlight hook compares pointer points).
- Description: content scrolled under a still mouse no longer opens a tooltip until the mouse moves — verified in code and the scroll spec.
- Description: truncated text starts its hover on the first mouse or pen move, a mouse press ends it until the pointer leaves, the mounted tooltip answers that hover, and callers' handlers still run — verified (hook code; Text, Heading and LineClamp cases).
- Description: no public API change, the renamed field is on Core's internal line-clamp entry, no visual change or string, and the delay docs say the delay starts on the first move — verified from source.
- Description: about 75 existing hover call sites gained one move line each, only where needed — consistent (74 one-line moves in 27 Core test files and Lab's CommentPin, plus the edited Heading case).
- Description: 21 new unit cases, 11 failing on
mainand 10 guards — 21 verified by count; the split matches an earlier rerun of these unchanged cases againstmain. - Description: the hover-then-focus Text case now moves the mouse and still checks that no description is added — verified.
- Description: removing the press flag fails the Text press-before-move case — verified (without it the move after the press reaches the hover).
- Description: before and after results in three engines, and a mouse that moves onto the trigger opens it before and after — consistent with the browser specs; not run in this review.
- Description: the Tooltip record now defines entering, two more browser cases exist, and the still-pointer unit cases reset interaction modality — verified (record diff, spec files, reset hook).
- Description: the input stream keeps each held window's point before and at its latest move, and Tooltip triggers and truncated text share that one check — verified.
- Description: one hold per window, taken or moved by the trigger's ref callback, released a microtask after a detach, following
isEnabledandisOpen, held by truncatable text on its element's window, one native listener, and a dispatch that reads no layout — verified (code; one-listener, iframe, hold-rule and re-attach cases). - Description: truncated text measures once per hover — verified (one measure over 20 moves); the Table width-read count was not reproduced.
- Description: the scroll cases live in an interaction spec that CI's WebKit leg runs — spec contents verified; the leg has not run on this head.
- Description: the list highlight hold keeps its own check, for the reasons given — verified.
- Description: only tooltips a hover can open hold the window, and the Slider listener check passes — the hold rule verified; the Slider check not run here.
- Description: the known WebKit limit before a window's first recorded move — consistent with the code.
- Description: the runtime record lists the still-mouse check, and the writing rubric results for both record changes — verified (record diff).
- Description: first-load deltas of about +0.4 KB gzip on the four reference pages — reported as required; not re-measured here.
- Description: the Firefox hover-spec list names the new spec — verified.
- Description: test, lint and browser results from earlier heads — not rerun in this review; CI must pass on this head.
- Description: results for the related pull request — not rechecked; they describe no code in this change.
packages/core/src/Tooltip/useTooltip.tsx— clear.packages/core/src/utils/inputStream.ts— clear; the WebKit fresh-record limit stays open (non-blocking).packages/core/src/Text/TruncationTooltip.tsx— clear.packages/core/src/Text/Text.tsx,packages/core/src/Heading/Heading.tsx,packages/lab/src/LineClamp/LineClamp.tsx— clear.docs/specs/components/Tooltip/Tooltip.spec.md,docs/architecture/react-component-runtime.md— clear (approved for this head).Tooltip/Tooltip.doc.mjs,Tooltip/useTooltip.doc.mjs, the changeset — clear..github/scripts/lib/a11y-spec-files.mjs— clear (adds the still-pointer spec to the Firefox hover specs).useTooltip.test.tsx,Tooltip.test.tsx,Text.test.tsx,Heading.test.tsx,TruncationTooltip.test.tsx,inputStream.test.ts, LabLineClamp.test.tsx,TooltipStillPointer.a11y.browser.spec.ts,TooltipStillPointerScroll.interaction.browser.spec.ts— clear.- One-line hover moves in the CheckboxInput, CheckboxList, ComplexSelector, DateInput, DateRangeInput, DateTimeInput, InputClearButton, FileInput, InfoTip (two files), MultiSelector, NumberInput, PowerSearch, RadioList, SegmentedControl, Selector, SideNav, Slider, Switch, TextArea, TextInput, TimeInput, Tokenizer, Typeahead and Lab CommentPin tests — clear.
|
🤖 (Posted by Cindy's agent.) Merged, thank you @shashank03-dev! A tooltip no longer opens under a pointer that never moved, for example when its trigger appears or scrolls under a resting mouse. It opens on the first real movement, in Chromium, Safari and Firefox, and that applies to Text, Heading and LineClamp truncation tooltips as well. Thanks for sticking with it through several review rounds. It ships in the next release, with you credited. |
User impact
When a trigger appears or moves under a mouse that does not move, its tooltip opens after the delay. A click that opens a dialog whose close button lands under the pointer is the common case: the user only clicked, and a tooltip now covers the dialog's content. It affects every control with a
tooltip, and the full-text tooltip of truncated Text and Heading, so an app cannot change it in one place.Fixes #11605
Problem and solution fit
useTooltipschedules the show on the trigger'smouseenter, and truncated Text mounts its tooltip onpointerenter. After a layout change, the browser sends both to the element now under a still pointer, with no move.The fix: a mouse or pen arrival only arms the hover. The show delay starts on the first
pointermoveormousemoveover the trigger. A pointer that moves onto the trigger sends that move in the same frame, so a real hover opens as before. Firefox sends thepointermovebefore themouseenter, so themousemovethat follows it counts too.Expected behavior and authority
component:TooltipFR3 (current): "On a hover-capable pointer, entering the trigger opens afterdelayms". A trigger that moved under a still pointer was not entered by the user. Selector already treats a still mouse this way (fix(Selector): a row that scrolls under a still mouse does not take the keyboard's highlight #9671).component:TextAR2 andcomponent:HeadingAR3 (current): the truncation Tooltip mounts on the first hover, and a first hover must "open the Tooltip by its own rules", which are FR3's.One wider effect for an owner to confirm: content that scrolls under a still mouse also no longer opens a tooltip until the mouse moves, for the same reason.
Smallest restoration
useTooltip.tsx:mouseentersets an "arrived, not moved" flag (not for a finger). The firstpointermoveormousemoveon the trigger after it clears the flag and schedules the show.mouseleaveclears the flag. A finger'spointermovenever opens.TruncationTooltip.tsx(shared by Text, Heading and Lab's LineClamp): the first hover is the first mouse or penpointermove, notpointerenter. A mouse press still ends that hover until the pointer leaves, as on a mounted tooltip. The tooltip that then mounts answers that hover at once, through the existing present-interest path.Text.tsx,Heading.tsx, Lab'sLineClamp.tsx: wireonPointerMovein place ofonPointerEnterto that hook. A caller's ownonPointerEnterandonPointerMovestill run.delaydocs say the delay starts on the first move.main's measure-on-interest Text cases, and 1 in Lab's CommentPin) opened a tooltip with a barefireEvent.mouseEnteror a truncation tooltip with a barepointerEnter, sequences no browser sends for a real hover. Each now also sends the move, one added line per call, only in tests that needed it.Evidence
TooltipStillPointer.a11y.browser.spec.ts. A click removes an "Open" button over the Default story's trigger, so the trigger appears under the still mouse, or a layout move puts it there. The spec checks that the engine sent a trustedmouseenterand no move. Onmainthe tooltip opens in Chromium, WebKit and Firefox. The same holds for the single-line truncation Text story.mainand pass here (includingTruncationTooltip.test.tsx: a hover measures once, not on every move) (useTooltip: a still pointer, and a move with no arrival or from a finger; the hold only while a hover can open the tooltip; the hold on the trigger's own window, for a trigger that attaches after mount or moves into an iframe, and across a re-render that re-attaches it; Text: an arrival with no move; Heading and LineClamp: an arrival with no move, with a caller's handlers). 10 guard the paths that must not change: a mouse press on truncated Text before the first move (it also passes onmainsince fix(Text, Heading): the truncation tooltip adds no description, so the cut text is read once #12653, where the tooltip adds no description and a press already cancels the hover; here it pins the press flag), Firefox's event order, a press before any move, a hovering pen, a finger tap's synthesized mouse events, a leave before any move, one show per arrival, a caller's handlers on Text, a mouse press while the tooltip first loads, and a press then a leave then a new hover.pointerenter, like the other Text hover cases: under this change an arrival with no move opens nothing. It still checks what fix(Text, Heading): the truncation tooltip adds no description, so the cut text is read once #12653 meant.isHoverEndedRef.current = trueremoved fromTruncationTooltip.tsx, the Text case "a mouse press before the first move ends the hover" fails, and it passes with the line.Before and after, three engines
Storybook built from
mainand from this branch, the same Playwright script for both. Each clip stacks Chromium 149, Firefox 151 and WebKit 26.5: first the Tooltip Default story, then the single-line truncation Text story. A click removes an "Open" button over the target, so the target is then under a mouse that does not move; after 2.5 s the mouse moves 4 px. The panel on each page reads live from the page: time since the click, whether the mouse has moved, the trusted events the target got, and when the tooltip opened. Real-time capture, 30 fps (Firefox and WebKit screencasts deliver fewer real frames; between them the last frame holds).Before (
main): the tooltip opens 0.23 to 0.42 s after the click while the mouse is still, on the trigger and on truncated Text, in all three engines.11605-before.mp4
After: nothing opens while the mouse is still. It opens about 0.2 s after the first move, the story's 200 ms delay, in all three engines.
11605-after.mp4
Related
#11819 also addresses #11605, with a show on every
pointermove. I ran its head (a339725) locally before opening this:tsc -p packages/labfails:LineClamp.tsx(539,27): Property 'onPointerEnter' does not exist on type 'TruncationTooltipInterest'. Lab's LineClamp is updated here.mouseEnter: 16 failed.Scope
Components: Tooltip (useTooltip), Text and Heading (truncation tooltip), Lab LineClamp (wiring only)
Testing
Head 296e1a4, Node 24.22:
pnpm build,pnpm typecheck,pnpm lint:strict: pass.changeset-coverage.mjs pr: pass.pnpm review:pre: 0 findings, clean merge.postinstall.test.mjs"still nudges when no folder up to the repository root ran init" fails the same onmain(macOS). A CommandPalette announcement case timed out under load and passes 3 of 3 alone. Lab's CommentPin hover test hovered with a baremouseEnter; it now sends the move too, and passes (38 of 38).TooltipStillPointer.a11y.browser.spec.ts: Chromium 4 passed, WebKit 4 passed, Firefox (local config) 4 passed. Against a Storybook built withmain'suseTooltip.tsx, the 2 trigger still-pointer cases fail in each engine and the hover case passes. Before the Text part of this change, a truncated Text under a still mouse opened its tooltip in all three engines.mainbuild too (a wheel scroll, two tooltip-anchor timing cases).Review follow-up, head fd26ad0 (one source comment reworded, no code change):
lint:strictpasses; the Tooltip tests pass (124).First-load cost (
architecture:component-import-boundariesINV10, shared modules grow):pnpm size:pages --base <main dist>at this head, againstmaind834104's Core build (eager gzip of the four reference pages, the size report's esbuild options).mainThis is default behavior of every Tooltip and truncated text, not an optional feature, so INV10's 0.3 KB allowance does not apply (DEC-5); the delta is reported as INV10 asks for a shared module. The still-mouse check lives in the input stream module every page already loads.
Maintainer edit (4412dae)
In Chromium,
TooltipStillPointerpasses 7/7 here and fails 6/7 against main.Maintainer edit: WebKit's move after a scroll
A WebKit run found that after a wheel or keyboard scroll brings a trigger under a still mouse, WebKit sends a trusted
pointermoveandmousemoveat the point where the mouse already was. Counted as a first move, it opened the tooltip in Safari, the exact case this PR fixes. WebKit reports zero movement on every move, so movement can't tell it apart.pointermoveand at it.isMouseMove(event)says a trusted move at the point before the latest one repeats a still mouse's point. Tooltip triggers and truncated Text and Heading share this one check.holdMouseMoves(view)in the input stream keeps one countedpointermovesubscription per window, held by each Tooltip that a hover can open (a trigger attached, enabled, and not controlled byisOpen) on its trigger's own window: the trigger's ref callback takes or moves the hold when the trigger attaches or moves to another document, a detach releases it a microtask later (so a same-commit re-attach keeps the window's last point), and an effect follows a later change toisEnabledorisOpen, and by truncatable Text, Heading and Lab's LineClamp on their element's window while they can show a tooltip. It ends with the last release (a unit case pins one native listener for many holds). The stream's dispatch only stores the point and reads no layout.Core/TableOverflowBehavior) reads its width 6 times over a 20-move hover, the same asmain.TooltipStillPointerScroll.interaction.browser.spec.ts(desktop context), so CI's WebKit leg runs them.useHighlightedOptionScroll(Selector, MultiSelector, Typeahead, DateTimeInput, the chat trigger menu) releases a keyboard-held highlight on any pointer's first real move, a pen's included, and compares screen points it keeps across holds. The stream'sisMouseMoverecords mouse points only, since WebKit's repeated move after a scroll is a mouse event, and a window's record ends with its last hold. Moving the list hold onto it would change which pens and which first moves release a highlight in five components, which is outside this fix; the two checks answer different questions (a tooltip's first real hover, and a list's first real pointer move after a keyboard move).isOpenholds nothing. A Slider whose thumb shows its value in a tooltip opens it on a hover at rest, a disabled one included (its thumb stays hoverable, and a disabled Slider with adisabledMessageshows that message on a hover instead), so that page holds the one shared listener like any hover tooltip; the Slider's gesture host still listens only during a press, andspec:AST-094FR24's Slider listener check passes as onmain(its story shows the value as text). A unit case pins the hold across disabled, controlled and uncontrolled.docs/architecture/react-component-runtime.mdlists "the hover tooltips' still-mouse check (Tooltip triggers and truncated text)" among the stream's subscribers.Writing rubric results
react-component-runtime.md(the stream's subscribers). No new claim, no ID cited, plain words;check:knowledgealigned.