Skip to content

feat(core): a table header cell shows its full heading in a tooltip on keyboard focus when the heading is cut short - #12175

Merged
josephfarina merged 4 commits into
mainfrom
josephfarina/table-header-cut-tooltip
Nov 17, 2026
Merged

josephfarina merged 4 commits into
mainfrom
josephfarina/table-header-cut-tooltip

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What

A table's header cell cuts a heading that is wider than its column, with an ellipsis (TableHeaderCell FR2), and nothing showed the rest of it: "Pending pa…". Translated headings make this common. When keyboard focus reaches something inside a cell whose heading is cut (a sortable header's sort control), the cell now shows the full heading in a tooltip, and only then. A mouse hover shows nothing, as on main. This is a new requirement, added to FR2.

Owner decision

The engineering owner's decision is recorded on this pull request: #12175 (comment). This pull request ships its keyboard-focus part; desktop hover stays as it is on main. The TableHeaderCell record's compatibility rows name the decision.

How

  • The cell calls the shared internal hook that Button already uses, useCutTextOnKeyboardFocus in the truncation tooltip module (not exported from the package). When focus inside the cell is :focus-visible and the shared interaction-modality reader says the last input was a keyboard, the hook measures the heading; if it is cut, the cell shows it in full at once, held until focus leaves the cell, Escape, or a press. A mouse or pen hover, a field a pointer focused (an inline column filter) and a touch tap show nothing. A header cell that is not interactive takes no focus, and no tab stop is added; keyboard and screen-reader users read the full heading from the cell's accessible content.
  • Measured only then: a table of header cells reads no layout and holds no observers at rest.
  • The tooltip is the same non-exported component in the Tooltip module, loaded after the first render as tooltip code is. It attaches without a description, so the heading is not read twice. The import-boundary check holds.
  • The hook measures and reads only the heading itself: it skips hidden copies, visually hidden labels and fields (form inputs and value widgets such as a Selector's combobox), so the select-all cell's screen-reader label ("Select all rows") and an inline filter's value are neither taken for a cut heading nor shown in the tooltip. It counts only focus inside the cell, so focus in a header's filter popover (rendered in a portal) shows nothing. Both fixes are in the shared hook, so Button gets them too.
  • The Text record's line for the hook now names this cell too, and the TableHeaderCell record's PR1 names the cell's only state: the heading measured on keyboard focus.

Evidence

  • In a real browser (mouse and keyboard): on main, hovering a cut plain heading and focusing a cut sortable heading's sort control show nothing. On this branch, hovering still shows nothing; focus on the cut sortable heading shows it in full at once; neither the cell nor the sort control gets aria-describedby; nothing opens at rest.
  • TableHeaderCell.truncationTooltip.test.tsx fails on main (3 of its 11) and passes with the change: a cut heading shows on keyboard focus of a sortable header, with the sort control's accessible name the heading and its accessible description empty; blur closes it; a hover shows nothing; a fitting heading shows none; the select-all cell of a Table with row selection shows none; a field a pointer focuses inside a cut header shows none; focus that a portal inside the header delivers shows none; a field whose value is wider than its box does not count as a cut heading; with an inline enum filter, a fitting heading shows nothing when the filter's value is cut, and a cut heading's tooltip shows only the heading; nothing is measured at rest.
  • Text, Heading, Tooltip, Popover, Button, ToggleButton, Table and Link suites pass, including Text's existing description tests; the swizzle tests pass.
  • node scripts/check-component-import-boundaries.mjs: boundaries hold. node scripts/check-knowledge.mjs: records and templates aligned.
  • First-load JavaScript on the reference pages for this change alone, against main with the Button change merged (pnpm size:pages, minified / gzip bytes):
Page Change
docs (Text, Heading, Link, Card, Divider, List) +0 / +0
form (Button, IconButton, TextInput, CheckboxInput, Text, Heading, Card) +152 / +70
menu (DropdownMenu, ContextMenu, Button, Text) +152 / +29
table (Table, Text, Button) +467 / +192
  • Build replay over real build requests: no start, alternatives list or block list changes.

Scope

Components: TableHeaderCell (uses the keyboard-focus hook Button already uses)

  • A new requirement in TableHeaderCell FR2; no new public prop.
  • Public text contains no internal context.

Writing rubric results

R1 narration: none; the FR2 and PR1 changes state what the cell does, in the present tense.
R2 research: none in the record.
R3 evidence: FR2's basis names the Text truncation tooltip; its verification row names the test and a browser check.
R4 rejected alternatives: none recorded.
R5 change references: none.
R6 open questions: none added.
R7 project status: none.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 17, 2026 9:34am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 9:51 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 721ede4

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
TableBody 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableFooter 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableHeader 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
103 more components
Component Size LoC Visual · A11y · RTL
TableRow 7.1 kB (0) · 4.0 kB CSS (0) — ✓ · ✓ · ✗
Table 121.2 kB (+170 B) · 19.7 kB CSS (0) — ✓ · ✓ · —
lab/Comments 372.0 kB (+167 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 365.1 kB (+159 B) · 2.4 kB CSS (0) — — · — · —
Markdown 204.5 kB (+149 B) · 22.0 kB CSS (0) — — · — · —
TableHeaderCell 103.9 kB (+148 B) · 19.0 kB CSS (0) — ✓ · ✓ · ✓
lab/TransferListSelector 122.2 kB (+81 B) · 1.4 kB CSS (0) — — · — · —
Lightbox 147.4 kB (+78 B) · 12.0 kB CSS (0) — — · — · —
richtext/RichTextView 283.5 kB (+78 B) · 2.3 kB CSS (0) — — · — · —
ChatLayoutScrollButton 66.6 kB (+74 B) · 11.0 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 114.7 kB (+74 B) · 773 B CSS (0) — — · — · —
DialogHeader 68.9 kB (+72 B) · 12.4 kB CSS (0) — — · — · —
charts/ChartLegend 47.6 kB (+71 B) · 224 B CSS (0) — — · — · —
Timestamp 30.5 kB (+71 B) · 11.1 kB CSS (0) — — · — · —
DrawerHeader 69.1 kB (+70 B) · 13.8 kB CSS (0) — — · — · —
SideNav 122.2 kB (+70 B) · 12.2 kB CSS (0) — — · — · —
AlertDialog 129.7 kB (+69 B) · 15.5 kB CSS (0) — — · — · —
Popover 99.7 kB (+69 B) · 15.2 kB CSS (0) — — · — · —
SideNavCollapseButton 66.8 kB (+69 B) · 10.8 kB CSS (0) — — · — · —
Carousel 75.8 kB (+68 B) · 11.7 kB CSS (0) — — · — · —
MobileNavToggle 66.3 kB (+68 B) · 10.8 kB CSS (0) — — · — · —
Thumbnail 70.5 kB (+68 B) · 12.4 kB CSS (0) — — · — · —
Toast 105.1 kB (+68 B) · 11.1 kB CSS (0) — — · — · —
Button 66.0 kB (+67 B) · 10.8 kB CSS (0) — — · — · —
ChatSendButton 66.4 kB (+67 B) · 10.8 kB CSS (0) — — · — · —
ToggleButton 93.2 kB (+67 B) · 10.9 kB CSS (0) — — · — · —
TopNav 79.0 kB (+67 B) · 11.8 kB CSS (0) — — · — · —
TopNavMegaMenu 77.1 kB (+67 B) · 12.7 kB CSS (0) — — · — · —
MobileNav 77.3 kB (+66 B) · 11.4 kB CSS (0) — — · — · —
BreadcrumbItem 97.8 kB (+65 B) · 13.3 kB CSS (0) — — · — · —
Stepper 67.7 kB (+64 B) · 10.9 kB CSS (0) — — · — · —
lab/TourStep 94.3 kB (+64 B) · 691 B CSS (0) — — · — · —
lab/ChatReactionBar 115.9 kB (+63 B) · 1.1 kB CSS (0) — — · — · —
Calendar 77.1 kB (+62 B) · 11.4 kB CSS (0) — — · — · —
IconButton 66.1 kB (+62 B) · 10.8 kB CSS (0) — — · — · —
TableSelectionToolbar 76.3 kB (+62 B) · 14.1 kB CSS (0) — ✓ · ✓ · ✓
lab/DiffViewer 94.1 kB (+62 B) · 2.1 kB CSS (0) — — · — · —
CodeBlock 81.5 kB (+60 B) · 12.2 kB CSS (0) — — · — · —
Typeahead 88.9 kB (+60 B) · 13.5 kB CSS (0) — — · — · —
lab/DialogHeroHeader 90.0 kB (+59 B) · 372 B CSS (0) — — · — · —
PowerSearch 308.1 kB (+58 B) · 25.6 kB CSS (0) — — · — · —
lab/ListInput 94.9 kB (+57 B) · 922 B CSS (0) — — · — · —
lab/TransferList 113.2 kB (+57 B) · 1.2 kB CSS (0) — — · — · —
lab/CommentComposer 175.0 kB (+56 B) · 1.9 kB CSS (0) — — · — · —
TopNavHeading 83.1 kB (+55 B) · 12.0 kB CSS (0) — — · — · —
charts/ChartTooltip 216.5 kB (+54 B) · 451 B CSS (0) — — · — · —
BaseTypeahead 79.3 kB (+53 B) · 11.7 kB CSS (0) — — · — · —
ContextMenu 102.9 kB (+53 B) · 18.8 kB CSS (0) — — · — · —
Selector 114.1 kB (+53 B) · 18.7 kB CSS (0) — — · — · —
SideNavItem 77.9 kB (+53 B) · 11.9 kB CSS (0) — — · — · —
ChatLayout 89.2 kB (+52 B) · 11.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 300.9 kB (+52 B) · 454 B CSS (0) — — · — · —
Pagination 125.1 kB (+51 B) · 19.1 kB CSS (0) — — · — · —
charts/Chart 239.7 kB (+50 B) · 516 B CSS (0) — — · — · —
ChatDictationButton 66.6 kB (+50 B) · 10.9 kB CSS (0) — — · — · —
TextInput 73.6 kB (+50 B) · 12.0 kB CSS (0) — — · — · —
Tokenizer 105.3 kB (+49 B) · 20.4 kB CSS (0) — — · — · —
richtext/RichTextEditor 306.9 kB (+49 B) · 2.6 kB CSS (0) — — · — · —
SideNavHeading 83.5 kB (+47 B) · 12.1 kB CSS (0) — — · — · —
lab/EmojiPicker 93.4 kB (+47 B) · 751 B CSS (0) — — · — · —
TabMenu 79.8 kB (+45 B) · 11.9 kB CSS (0) — — · — · —
ChatComposerInput 83.2 kB (+44 B) · 12.1 kB CSS (0) — — · — · —
ChatComposerTokenElement 83.2 kB (+43 B) · 12.1 kB CSS (0) — — · — · —
ComplexSelector 78.5 kB (+43 B) · 12.7 kB CSS (0) — — · — · —
DateRangeInput 100.2 kB (+43 B) · 13.3 kB CSS (0) — — · — · —
ChatComposer 85.5 kB (+42 B) · 12.9 kB CSS (0) — — · — · —
DateInput 201.0 kB (+42 B) · 18.0 kB CSS (0) — — · — · —
MultiSelector 102.7 kB (+42 B) · 17.8 kB CSS (0) — — · — · —
FileInput 75.0 kB (+40 B) · 11.7 kB CSS (0) — — · — · —
lab/Schedule 115.5 kB (+40 B) · 3.9 kB CSS (0) — — · — · —
TableCell 104.1 kB (+39 B) · 19.2 kB CSS (0) — ✓ · ✓ · ✓
MoreMenu 108.6 kB (+37 B) · 18.9 kB CSS (0) — — · — · —
TopNavMenu 82.5 kB (+37 B) · 12.0 kB CSS (0) — — · — · —
Banner 68.0 kB (+36 B) · 11.3 kB CSS (0) — — · — · —
DropdownMenu 108.3 kB (+35 B) · 18.9 kB CSS (0) — — · — · —
TimeInput 175.8 kB (+34 B) · 17.0 kB CSS (0) — — · — · —
NumberInput 78.5 kB (+31 B) · 12.2 kB CSS (0) — — · — · —
DateTimeInput 224.5 kB (+30 B) · 19.8 kB CSS (0) — — · — · —
AppShell 98.6 kB (+29 B) · 14.4 kB CSS (0) — — · — · —
CheckboxInput 69.2 kB (+1 B) · 10.2 kB CSS (0) — — · — · —
DropdownMenuSubMenu 78.7 kB (+1 B) · 10.5 kB CSS (0) — — · — · —
Field 59.6 kB (+1 B) · 7.3 kB CSS (0) — — · — · —
lab/SelectableCardGroup 69.0 kB (+1 B) · 162 B CSS (0) — — · — · —
CheckboxList 73.3 kB (0) · 7.8 kB CSS (0) — — · — · —
CommandPalette 78.1 kB (0) · 12.8 kB CSS (0) — — · — · —
Heading 13.5 kB (0) · 5.5 kB CSS (0) — — · — · —
InputGroup 61.2 kB (0) · 7.9 kB CSS (0) — — · — · —
Link 56.6 kB (0) · 7.1 kB CSS (0) — — · — · —
RadioList 61.0 kB (0) · 7.4 kB CSS (0) — — · — · —
RadioListItem 76.3 kB (0) · 10.7 kB CSS (0) — — · — · —
Slider 114.7 kB (0) · 8.9 kB CSS (0) — — · — · —
Switch 109.2 kB (0) · 10.0 kB CSS (0) — — · — · —
Timer 15.0 kB (0) · 6.1 kB CSS (0) — — · — · —
lab/LineClamp 15.4 kB (0) · 168 B CSS (0) — — · — · —
lab/TabBarMoreList 102.1 kB (0) · 1.8 kB CSS (0) — — · — · —
ChatMessageList 29.3 kB (−1 B) · 7.1 kB CSS (0) — — · — · —
CommandPaletteInput 33.1 kB (−1 B) · 7.6 kB CSS (0) — — · — · —
Spinner 25.9 kB (−1 B) · 6.3 kB CSS (0) — — · — · —
Text · Storybook 12.9 kB (−1 B) · 5.5 kB CSS (0) 859 (−2) ✓ · ✓ · —
CheckboxListItem 80.1 kB (−2 B) · 12.1 kB CSS (0) — — · — · —
ListItem 79.3 kB (−2 B) · 12.1 kB CSS (0) — — · — · —
TextArea 67.1 kB (−2 B) · 9.4 kB CSS (0) — — · — · —
ChatToolCalls 33.6 kB (−5 B) · 8.5 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.63 MB packed (+630 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@josephfarina
josephfarina force-pushed the josephfarina/table-header-cut-tooltip branch from ce90947 to ecaa284 Compare November 17, 2026 00:41
@josephfarina josephfarina changed the title fix(core): a table header cell shows its full heading in a tooltip when the heading is cut short feat(core): a table header cell shows its full heading in a tooltip when the heading is cut short Nov 17, 2026
@josephfarina
josephfarina force-pushed the josephfarina/table-header-cut-tooltip branch from ecaa284 to 74dfe74 Compare November 17, 2026 01:11

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the cut-heading and cut-label tooltips work in a real browser with no duplicate description, but four issues block and the new requirements need an owner's approval.

Blocking:

  • Desktop behavior change needs an owner decision: with default props, a mouse hover on a Button or table header cell whose text is cut now opens a tooltip (Button.tsx:1219, TableHeaderCell.tsx:224); gate it to touch input, or cite the owner decision that covers it.
  • Button's CutLabelTooltip (Button.tsx:793-813) is a copy of the new UndescribedTooltip (Tooltip.tsx:382-402); move the undescribed attach into the eager Tooltip/useTooltip.tsx and call it once from Button and from the truncation tooltip, so a fix to one path reaches both.
  • The cut-label tooltip attaches anchorRef.current once (Button.tsx:806-811), so after a link Button is disabled and renders a new <button>, its tooltip never opens again; re-run the attach when Button renders a new element, and name the system the Effect syncs.
  • Every header cell inside a Table now holds state and loads the Tooltip module (TableHeaderCell.tsx:169), while the record's PR1 still says the cell holds no state; amend PR1 in the proposal or keep the state out of the cell.

Approval also waits on an owner decision: the proposed TableHeaderCell FR2 sentence and Button FR18 add hover and focus behavior that the current records do not state, and an engineering owner records that decision by commenting /approve-spec <full head SHA> on the pull request, which the author may do as an engineering owner. Smaller follow-ups: the two comments at TableHeaderCell.tsx:161-168 repeat each other, the Chinese width doc lacks the tooltip sentence, and the Button.doc.mjs reformat would review more easily on its own.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Button changeset: a cut label shows in full on hover and keyboard focus. Verified in Chromium and by the new tests.
  • Button changeset: a cut ToggleButton label now shows an ellipsis. Verified in Chromium: the base clips it mid-letter.
  • Button changeset: labels that fit look the same and show no tooltip, and the name is heard once. Verified: no tooltip on a fitting label and no aria-describedby on the Button.
  • Header changeset: a cut heading shows on hover and on keyboard focus of a sortable header's sort control. Verified in Chromium and by the new tests.
  • Header changeset: headings that fit show no tooltip, and the heading is heard once. Verified by the fitting-heading test and in Chromium.
  • Measured on interaction only; header cells read no layout and hold no observers at rest. Verified, but every header cell now holds state and loads the Tooltip module after first render (blocking finding 4).
  • The truncation tooltip gains an opt-in undescribed mode, and Text's default is unchanged. Verified: the default stays described and the Text suites pass.
  • The undescribed tooltip lives in the lazily loaded Tooltip module, is not exported from the Tooltip entry, and adds no module. Verified.
  • Focus anywhere inside the cell opens it, and no tab stop is added. Verified.
  • Button and the header cell share the cut check and visible-text reader. Verified, but Button keeps its own copy of the tooltip attach (blocking finding 2).
  • The new header test fails on main (2 of 4) and passes with the change. Verified.
  • The listed suites pass. Verified: 78 files, 1,857 tests.
  • The import-boundary check holds, with Text +0.1 KB and Table +0.9 KB up front. Verified; Button and IconButton also grow 0.7 KB.
  • The knowledge-record check is aligned. Verified.
  • A new requirement in TableHeaderCell FR2 and no new public prop. Verified: no public API changes; the head also carries Button FR18.
  • Public text contains no internal context. Verified.

Files:

  • .changeset/button-label-tooltip.md: clear.
  • .changeset/table-header-cut-tooltip.md: clear.
  • docs/specs/components/Button/Button.spec.md: proposed FR18 waits on owner approval.
  • docs/specs/components/Table/TableHeaderCell.spec.md: proposed FR2 sentence waits on owner approval; PR1 left unamended (finding 4).
  • packages/core/src/Button/Button.doc.mjs: two real edits inside a formatter rewrap; the Chinese width text is not updated.
  • packages/core/src/Button/Button.truncationTooltip.test.tsx: clear.
  • packages/core/src/Button/Button.tsx: findings 1, 2 and 3.
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clear.
  • packages/core/src/Table/TableHeaderCell.tsx: findings 1 and 4; a repeated comment.
  • packages/core/src/Text/TruncationTooltip.tsx: clear apart from a stale header line and an Effect note that moved off its Effect.
  • packages/core/src/ToggleButton/ToggleButton.tsx: clear; restores Button's ellipsis.
  • packages/core/src/Tooltip/Tooltip.tsx: UndescribedTooltip is the owner Button's copy duplicates (finding 2).

Automated review (maintainer link)

Comment thread packages/core/src/Button/Button.tsx Resolved
Comment thread packages/core/src/Button/Button.tsx Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The cut-heading and cut-label tooltips work in a real browser and add no duplicate description, but two issues block, and the new requirements need an engineering owner's approval.

Blocking:

  • Miss: In a Table with row selection, hovering the select-all checkbox's header cell opens a "Select all rows" tooltip although the cell shows no heading, because isTextCut and visibleText in Text/TruncationTooltip.tsx treat the checkbox's visually hidden label as cut text; skip visually hidden content (or compare only the cell's own overflow) and add a test with useTableSelection.
  • Desktop behavior change needs an owner decision: with default props, a mouse hover on a Button or table header cell whose text is cut now opens a tooltip (Button.tsx:1196, TableHeaderCell.tsx:222); gate it to touch input, or cite the owner decision that covers it.

Approval also waits on an engineering owner recording the decision on the proposed TableHeaderCell FR2 tooltip clause, its PR1 amendment and Button FR18 by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Once the first fix lands, the table changeset's "Headings that fit show no tooltip" will hold.

Claims and files checked

Review mode: full; reason: rebase

  • Claim, Button changeset: a cut Button label shows in full on hover and keyboard focus. Verified (seen in a browser on hover; Button.truncationTooltip.test.tsx).
  • Claim, Button changeset: a cut ToggleButton label now shows an ellipsis. Verified by code (ToggleButton.tsx:83-87, :341, :356).
  • Claim, Button changeset: labels that fit look the same and show no tooltip. Verified (identical frames; test).
  • Claim, Button changeset: screen readers hear the name once. Verified (no aria-describedby; test).
  • Claim, table changeset: a cut heading shows on hover and on keyboard focus of a sort control. Verified (seen in a browser on hover and Tab; test).
  • Claim, table changeset: headings that fit show no tooltip. False: the select-all header shows "Select all rows" (seen in a browser).
  • Claim, table changeset: screen readers hear the heading once. Verified (the sort control has no description).
  • Claim, description: nothing is measured at rest. Verified (the "measures nothing at rest" tests).
  • Claim, description: Text keeps its described tooltip by default. Verified (TruncationTooltip.tsx:269; Text suite passes).
  • Claim, description: the undescribed tooltip lives in the hook module, the Tooltip module re-exports it and the Tooltip entry does not, and the import boundaries hold. Verified (Tooltip.tsx:37, Tooltip/index.ts; boundary check).
  • Claim, description: a touch tap opens nothing. Verified by code (TruncationTooltip.tsx:196-216).
  • Claim, description: PR1 names the cell's only state. Verified (record PR1).
  • Claim, description: focus anywhere inside the cell opens it, and plain headers gain no tab stop. Verified by code (focusTrigger="always"; no tabIndex added).
  • Claim, description: the cut check and text reader moved into the shared module. Verified (Button.tsx imports them).
  • Claim, description: the new header test fails on main, 2 of 4, and passes with the change. Verified (the new test fails on the base and passes on the head).
  • Claim, description: the listed suites pass. Verified for Text, Heading, Tooltip, Button, ToggleButton and Table; Popover was not run.
  • Claim, description: up-front gzip grows by Text +0.1 KB and Table +0.9 KB. Verified (boundary check printout).
  • Claim, description: records and templates are aligned. Verified (knowledge check).
  • Claim, description: no new public prop. Verified (API comparison: no changes).
  • File .changeset/button-label-tooltip.md: clear.
  • File .changeset/table-header-cut-tooltip.md: one false claim (select-all).
  • File docs/specs/components/Button/Button.spec.md: proposed FR18 awaits approval; the at-a-glance compatibility row is stale (non-blocking).
  • File docs/specs/components/Table/TableHeaderCell.spec.md: the proposed FR2 clause and PR1 await approval; the at-a-glance rows and decision log are stale (non-blocking).
  • File packages/core/src/Button/Button.doc.mjs: clear.
  • File packages/core/src/Button/Button.truncationTooltip.test.tsx: clear.
  • File packages/core/src/Button/Button.tsx: the desktop hover needs an owner decision.
  • File packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: no row-selection case (see the first finding).
  • File packages/core/src/Table/TableHeaderCell.tsx: select-all false tooltip; the desktop hover needs an owner decision.
  • File packages/core/src/Text/TruncationTooltip.tsx: hidden text counted as cut; the file header omits TableHeaderCell (non-blocking).
  • File packages/core/src/ToggleButton/ToggleButton.tsx: clear.
  • File packages/core/src/Tooltip/Tooltip.tsx: clear.
  • File packages/core/src/Tooltip/useTooltip.tsx: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (josephfarina, engineering owner, 2026-11-16): a table header cell or Button whose text is cut shows its full text in a tooltip on desktop. A mouse or pen hover opens it after the usual tooltip delay, and keyboard focus opens it at once; both happen only when the visible text is actually cut, never when it fits. This is not gated to touch input. On touch, a tap acts as before and opens nothing. A caller's own tooltip takes precedence, and the tooltip adds no duplicate description because the accessible name is already the full text.

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 1c7c825

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
…n keyboard focus when the heading is cut short
@josephfarina
josephfarina force-pushed the josephfarina/table-header-cut-tooltip branch from 1c7c825 to 3043c25 Compare November 17, 2026 06:51
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3043c25

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. Keyboard focus on a cut sortable header now shows the full heading with no duplicate description, and hover behaves as on main, but two states break the owner-approved FR2.

  • Miss: with the default popover filter, focus inside the filter popover keeps the heading tooltip open outside the cell, because the hook's onFocus accepts focus that React delivers from the popover's portal; return unless the anchor contains the focus target, and add a test.
  • Miss: a heading that fits shows a tooltip once an inline filter's value is wider than its field, because isTextCut counts the field's own overflow; leave form fields out of the measurement (or measure only the heading's text), and add a test.

Both fixes belong in the shared hook in Text/TruncationTooltip.tsx, so Button and the header cell keep one path. The description's size table measures this change together with the Button change against an older base; on its own, this change adds 135 B gzip to the table page and nothing to the other three reference pages.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Changeset, keyboard focus on a cut sortable header shows the full heading: verified (browser check; new tests).
  • Changeset, a mouse hover shows nothing, as before: verified (browser frame identical to main; hover test).
  • Changeset, headings that fit show no tooltip: false when an inline filter's value overflows its field (browser check).
  • Changeset, screen readers hear the heading once: verified (no aria-describedby; accessible-description test).
  • Description, cut header cells end in an ellipsis (FR2): context only; a cut sortable header clips without one on main and here alike, unchanged by this pull request.
  • Description, the tooltip shows on keyboard focus inside a cut cell, and only then: shows (verified); "only then" is false for the inline filter state.
  • Description, the cell uses the shared internal keyboard-focus hook, which the package does not export: verified (TableHeaderCell.tsx:39, :161-164).
  • Description, the tooltip holds until focus leaves the cell, Escape or a press: Escape and a press verified; focus moving into the filter popover keeps it open (false).
  • Description, a pointer hover, a pointer-focused field and a touch tap show nothing: verified (tests; the modality gate).
  • Description, cells that are not interactive gain no tab stop: verified (no tabIndex added).
  • Description, nothing is measured and no observer is held at rest: verified ("measures nothing at rest" test; measurement runs only on focus).
  • Description, the tooltip loads after first render, adds no description, and import boundaries hold: verified (code; boundary check passes).
  • Description, hidden copies and visually hidden labels are skipped, so the select-all label is not taken for a heading: verified (test passes).
  • Description, the Text record names this cell and PR1 names the cell's only state: verified (record diff).
  • Description, browser evidence for hover, focus, no description and nothing at rest: verified (browser check).
  • Description, the new test fails 2 of 7 on main and passes here: verified.
  • Description, the Text, Heading, Tooltip, Popover, Button, ToggleButton, Table, Link and swizzle suites pass: partly verified (Table, Markdown, Text, Tooltip and Button suites pass; the rest is left to CI).
  • Description, the import-boundary and knowledge checks pass: verified.
  • Description, reference-page size table: measures this change plus the Button change against an older base; this change alone adds 135 B gzip to the table page and 0 elsewhere.
  • Description, a build replay shows no changes: not checked.

Files:

  • .changeset/table-header-cut-tooltip.md: one false claim (fitting headings).
  • docs/specs/components/Table/TableHeaderCell.spec.md: owner-approved at this head; non-blocking note on the decision log's shipped-status sentence.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: passes; its header says hover shows the heading (non-blocking); no test covers the two blocking states.
  • packages/core/src/Table/TableHeaderCell.tsx: two blocking findings; one comment-style note.

Automated review (maintainer link)

Comment on lines +156 to +158
// A heading cut short by its column shows in full in a tooltip when keyboard
// focus reaches something inside the cell (a sortable header's sort
// control). Only a cell inside a Table truncates.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): the first sentence runs 26 words and restates FR2; the hook's name says the rest. Suggested:

// Only a cell inside a Table truncates its heading.

Comment on lines +8 to +10
* @position Testing; validates that a cut heading shows in full on hover and,
* where the header is interactive, on keyboard focus, that it adds no
* description, and that a heading that fits shows no tooltip

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this header says a cut heading shows in full on hover, but the file tests that a hover shows nothing. Suggested: validates that a cut heading shows in full on keyboard focus inside an interactive header, that it adds no description, and that a hover or a heading that fits shows no tooltip.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 68b14ea

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. Both earlier blockers are fixed: focus in the filter popover now closes the heading tooltip, and an inline text filter's long value no longer counts as a cut heading. One gap remains, with the inline filter for enum columns.

  • Miss: with an inline enum filter, a heading that fits shows a tooltip once the filter's Selector value is ellipsized, because the cut test skips only native form fields (Text/TruncationTooltip.tsx:225-231), so the changeset's "Headings that fit show no tooltip" is not yet true.
  • Miss: with an inline enum filter, the tooltip shows the cell's text run together, such as "Department of the employeeOps", instead of the heading itself, because the hook reads every text node in the cell (TableHeaderCell.tsx:161-164).

Measuring and reading only the heading fixes both: for example, treat [role="combobox"] like a form field in isLeftOut and skip isLeftOut elements in visibleText, or pass a measureRef for the heading text, and add a test with an inline enum filter under a fitting and a cut heading.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • Changeset, keyboard focus on a cut sortable header's sort control shows the full heading: verified (browser check; new tests).
  • Changeset, a mouse hover shows nothing, as before: verified (hover frame identical to main; hover test).
  • Changeset, headings that fit show no tooltip: false with an inline enum filter (browser check).
  • Changeset, screen readers hear the heading once: verified (no aria-describedby; accessible-description test).
  • Description, cut headings end in an ellipsis: context only; a cut sortable header clips without one on main and here alike.
  • Description, the tooltip shows on keyboard focus inside a cut cell, and only then: shows (verified); "only then" is false with an inline enum filter.
  • Description, the cell uses the shared internal keyboard-focus hook, which the package does not export: verified (TableHeaderCell.tsx:161-164; export test).
  • Description, the tooltip holds until focus leaves the cell, Escape or a press, and focus in a filter popover shows nothing: verified (browser check; portal test).
  • Description, a hover, a pointer-focused field and a touch tap show nothing: verified (tests; the modality gate).
  • Description, cells that are not interactive gain no tab stop: verified (no tabIndex added).
  • Description, nothing is measured and no observer is held at rest: verified ("measures nothing at rest" test).
  • Description, the tooltip loads after first render and adds no description, and import boundaries hold: verified (code; boundary check passes).
  • Description, hidden copies, visually hidden labels and form fields are skipped, so the select-all label and an inline filter's long value are not taken for a heading: verified for the select-all label and a text field; false for an inline enum filter's value.
  • Description, both fixes sit in the shared hook, so Button gets them too: verified (one shared function; Button tooltip tests pass).
  • Description, the Text record names this cell and PR1 names the cell's only state: verified (record diff).
  • Description, browser evidence for hover, focus, no description and nothing at rest: verified (browser check).
  • Description, the new test file fails 2 of 9 on main and passes here: verified.
  • Description, the listed component suites and swizzle tests pass: partly verified (Table, TableHeaderCell, Button and hook-export suites pass; full CI did not run on this head because CI admission was full).
  • Description, the import-boundary and knowledge checks pass: verified.
  • Description, reference-page size table: verified within 1 byte gzip (form +48, menu +13, table +173, docs +0).
  • Description, a build replay shows no changes: not checked.
  • Description, a new FR2 requirement with no new public prop: verified (API generator lists no rows).
  • Description, the owner decision is recorded on the pull request and named in the record: verified (comment present; record decider line).

Files:

  • .changeset/table-header-cut-tooltip.md: one false claim (fitting headings with an inline enum filter).
  • docs/specs/components/Table/TableHeaderCell.spec.md: owner-approved at this head; non-blocking note on the decision log's status sentence.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: passes, and its two new tests fail without the fix; its header still says hover shows the heading (non-blocking); no test covers an inline enum filter.
  • packages/core/src/Table/TableHeaderCell.tsx: blocking (whole-cell tooltip text); comment-style note.
  • packages/core/src/Text/TruncationTooltip.tsx: portal and form-field fixes verified; blocking (non-native filter controls still count); comment-style note.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 894aee0

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. Both inline enum filter gaps from the last review are fixed: a heading that fits shows no tooltip over a long Selector value, and a cut heading's tooltip now reads only the heading. Two small things remain.

  • FIELD_SELECTOR is built with a module-scope .join(', ') (Text/TruncationTooltip.tsx:222-233) that bundlers keep even where nothing uses it, so every page that renders Text or Heading grows by about 100 B gzip, and the description's size table (docs +0, form +48, menu +14, table +174 B gzip) no longer matches this head (+102, +88, +22, +181); write the selector as one string literal, run pnpm size:pages again, and update the table.
  • The description says the new test file fails 2 of its 11 tests on main, but it fails 3, including "shows only the heading, not the filter value, when the heading is cut".
Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • Changeset, keyboard focus on a cut sortable header's sort control shows the full heading: verified (browser check; new tests).
  • Changeset, a mouse hover shows nothing, as before: verified (hover frames identical to main; hover test).
  • Changeset, headings that fit show no tooltip: verified, including a fitting heading over a cut text or enum filter value (browser check; tests).
  • Changeset, screen readers hear the heading once: verified (no aria-describedby; accessible-description test).
  • Description, a header cell cuts a heading wider than its column with an ellipsis: verified for a plain header cell; a sortable header clips without one, on main and here alike.
  • Description, keyboard focus inside a cut cell shows the full heading, and only then, while a hover shows nothing: verified.
  • Description, this is a new FR2 requirement: verified (record diff).
  • Description, the owner decision is recorded on the pull request, only its keyboard part ships, and the record names it: verified (comment present; record decider line).
  • Description, the cell calls the shared internal keyboard-focus hook Button uses, which the package does not export: verified (TableHeaderCell.tsx:161-164; no export).
  • Description, the tooltip shows at once on keyboard focus and holds until focus leaves the cell, Escape or a press: verified (code; blur test; browser check).
  • Description, a hover, a pointer-focused field and a touch tap show nothing: verified (tests; modality gate).
  • Description, cells that are not interactive gain no tab stop: verified (no tabIndex added).
  • Description, nothing is measured and no observer is held at rest: verified ("measures nothing at rest" test; each cell joins the shared modality tracker at mount, which is no observer).
  • Description, the tooltip loads after first render and adds no description, and import boundaries hold: verified (code; boundary check passes).
  • Description, the hook skips hidden copies, visually hidden labels and fields, so the select-all label and an inline filter's value are neither counted nor shown: verified (tests; browser check with an inline enum filter).
  • Description, only focus inside the cell counts, so focus in a filter popover shows nothing: verified (portal test; code).
  • Description, both fixes sit in the shared hook, so Button gets them too: verified (one shared function; Button suites pass).
  • Description, the Text record names this cell and PR1 names the cell's only state: verified (record diff).
  • Description, real-browser results for hover, focus, no description and nothing at rest: verified (own browser check).
  • Description, the new test file fails 2 of its 11 on main: false, it fails 3 of 11.
  • Description, the listed component suites and the swizzle tests pass: verified.
  • Description, the import-boundary and knowledge checks pass: verified.
  • Description, reference-page size table: false for this head (docs +102, form +88, menu +22, table +181 B gzip measured).
  • Description, a build replay shows no changes: consistent, not re-run; the pull request changes no file the build command reads.
  • Description, a new FR2 requirement with no new public prop: verified (API generator lists no rows).
  • Description, public text holds no internal context: verified.
  • Description, writing rubric results: verified, apart from the decision log's status sentence (non-blocking).

Files:

  • .changeset/table-header-cut-tooltip.md: clear.
  • docs/specs/components/Table/TableHeaderCell.spec.md: owner-approved at this head; non-blocking note on the decision log's status sentence.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: passes 11 of 11, fails 3 of 11 on main; its header still says hover shows the heading (non-blocking).
  • packages/core/src/Table/TableHeaderCell.tsx: clear; comment-style note (non-blocking).
  • packages/core/src/Text/TruncationTooltip.tsx: enum filter fix verified; blocking (module-scope selector join); comment-style note (non-blocking).

Automated review (maintainer link)

Comment on lines +236 to +238
* Whether an element is left out of the measured text: hidden, a hidden copy
* (ToggleButton's bold-width reservation), visually hidden, or a field, whose
* value clips inside its own box and is not the cut text.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): this is one 35-word sentence. Suggested:

/**
 * Whether the cut test skips an element: hidden, a hidden copy
 * (ToggleButton's bold-width reservation), or visually hidden. It also skips
 * a field. A field's value clips inside its own box.
 */

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 721ede4

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. The field selector is now one string, so the docs reference page carries nothing extra, and the description's size table and red-first count match this head. CI found no room under its ceiling and was cancelled on this head, so its test jobs have not run yet; re-run it before merging. Four non-blocking notes stay open: the isLeftOut JSDoc and the TableHeaderCell.tsx:156-158 comment are long, the test file's header still mentions hover, and the record's decision log carries a status sentence.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • Changeset: keyboard focus on a cut sortable header's sort control shows the full heading: verified (Chromium check; new tests).
  • Changeset: a mouse hover shows nothing, as before: verified (hover frames identical to main; hover test).
  • Changeset: headings that fit show no tooltip: verified, including a fitting heading over a field or an enum filter (Chromium check; tests).
  • Changeset: screen readers hear the heading once: verified (no aria-describedby; computed description empty in the test).
  • Description: a header cell cuts a heading wider than its column with an ellipsis, and nothing showed the rest: verified for a plain header cell; a sortable header clips without an ellipsis, on main and here alike.
  • Description: keyboard focus inside a cut cell shows the full heading, and only then, while a hover shows nothing as on main: verified.
  • Description: this is a new FR2 requirement: verified (record diff).
  • Description: the owner decision is recorded on the pull request, only its keyboard part ships, and the record names it: verified (comment present; record decider line).
  • Description: the cell calls the shared internal keyboard-focus hook Button uses, which the package does not export: verified (TableHeaderCell.tsx:161-164; exports test).
  • Description: the tooltip shows at once and holds until focus leaves the cell, Escape or a press: verified (Text/TruncationTooltip.tsx:354-361; blur test; Escape frame).
  • Description: a hover, a pointer-focused field and a touch tap show nothing: verified for hover and a pointer-focused field (tests); touch by code (modality gate).
  • Description: header cells that are not interactive gain no tab stop: verified (no tabIndex added; Tab skips the plain header in Chromium).
  • Description: nothing is measured and no observer is held at rest: verified ("measures nothing at rest" test; each cell joins the shared modality tracker, which is no observer).
  • Description: the tooltip loads after first render, adds no description, and import boundaries hold: verified (code; boundary check passes).
  • Description: the hook skips hidden copies, visually hidden labels and fields, so the select-all label and an inline filter's value are neither counted nor shown: verified (tests).
  • Description: only focus inside the cell counts, so focus in a filter popover shows nothing: verified (portal test; Text/TruncationTooltip.tsx:343).
  • Description: both fixes sit in the shared hook, so Button gets them too: verified (one shared function; Button suites pass).
  • Description: the Text record names this cell and PR1 names the cell's only state: verified (record diff).
  • Description: real-browser results for hover, focus, no description and nothing at rest: verified (own Chromium check).
  • Description: the new test file fails 3 of its 11 on main and passes with the change: verified (11 of 11 here; 3 of 11 on the base with the same test file and behavior).
  • Description: the listed component suites and the swizzle tests pass: verified.
  • Description: the import-boundary and knowledge checks pass: verified.
  • Description: reference-page sizes (docs +0, form +152/+70, menu +152/+29, table +467/+192 B): verified (minified deltas identical; gzip +74, +27 and +193 B, within 4 B).
  • Description: a build replay shows no changes: consistent, not re-run; the pull request changes no file the build command reads.
  • Description: a new FR2 requirement with no new public prop: verified (API generator lists no rows).
  • Description: public text holds no internal context: verified.
  • Description: writing rubric results: verified, apart from the decision log's status sentence (non-blocking).

Files:

  • .changeset/table-header-cut-tooltip.md: clear.
  • docs/specs/components/Table/TableHeaderCell.spec.md: owner-approved at this head; non-blocking note on the decision log's status sentence.
  • docs/specs/components/Text/Text.spec.md: clear.
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: passes 11 of 11; its header still says hover shows the heading (non-blocking).
  • packages/core/src/Table/TableHeaderCell.tsx: clear; comment-style note (non-blocking).
  • packages/core/src/Text/TruncationTooltip.tsx: clear; the one-string selector fixes the size finding; comment-style note (non-blocking).

Automated review (maintainer link)

@josephfarina josephfarina reopened this Nov 17, 2026
@josephfarina josephfarina reopened this Nov 17, 2026
@josephfarina
josephfarina merged commit ab67aa1 into main Nov 17, 2026
161 of 220 checks passed
@github-actions
github-actions Bot deleted the josephfarina/table-header-cut-tooltip branch November 18, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 721ede46 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant