Repository navigation
Conversation
useTableSelection writes data-selected="selected" on a checked row beside aria-selected, with or without the built-in wash, so a theme can style a selected row (architecture:component-theming-surface INV6). Table FR21 and the table-row target's states record it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and marking it ready runs it.
A checked row now reflects selected on its table-row target with the wash on or off, which follows the theming-surface rule that selection state stays on the owning target, and the new component:Table FR21 sentence is approved for this head. Both new tests fail on main and pass here.
- Optional: the changed comment on
applyRowSelectionStyleis one 34-word sentence with two topics; the inline suggestion splits it to fit the repository's comment style. - Worth knowing: with the default wash on, its inline background still covers a theme's
selectedfill, so a theme that wants its own fill also needshasRowHighlight={false}.
[Automated review]
| * `aria-selected` and the `table-row` target's `selected` state track | ||
| * selection on their own: they stay correct whether or not the row is | ||
| * painted, so a theme can restyle a selected row with the wash off. |
There was a problem hiding this comment.
Non-blocking (comment style): this is one 34-word sentence with two topics, and the repository's comment rule asks for at most 25 words and one topic per sentence in a description. A shorter version that keeps only the reason:
* `aria-selected` and `data-selected` follow selection, not the wash.
* A theme can style a selected row with the wash off.There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and marking it ready for review runs it.
A checked row now reflects selected on its table-row target with the wash on or off, which follows the theming-surface rule that selection state stays on the owning target, and the new component:Table FR21 sentence is approved for this head. Both new tests fail without the fix and pass here, and the Table suite still passes after the merge from main.
- Optional: the changed comment on
applyRowSelectionStyleis one 34-word sentence with two topics; the open inline suggestion splits it to fit the repository's comment style. - Worth knowing: with the default wash on, its inline background still covers a theme's
selectedfill, so a theme that wants its own fill also needshasRowHighlight={false}.
[Automated review]
|
(Posted by Cindy's agent.) Closing as superseded by #11729 (b36275e), which is on
Nothing here remains to carry. |
User impact
A theme could not style a selected Table row.
useTableSelectionpaints its wash inline and sets onlyaria-selected, andthemeProps('table-row')published nothing about selection. So a theme could change neither the selected row's text nor its border, and withhasRowHighlight={false}it couldn't tell a selected row apart at all. Now a checked row'stable-rowtarget reflectsselected(data-selected="selected"), wash or no wash, and the built-in wash is unchanged.Fixes #5425.
Current specification
architecture:component-theming-surfaceINV6 (current): "Variant, size, selection, disabled, and interaction state are reflected as target capabilities through themeProps." Row selection is reflected on its owning target,table-row.selectedstate, andcomponent:CheckboxListItemFR15.component:TableFR21:hasRowHighlight=falseremoves only the selection wash.Change
useTableSelection:applyRowSelectionStylewritesdata-selected="selected"on a checked row besidearia-selected, and removes both on uncheck. This runs whateverhasRowHighlightis, so the wash logic is unchanged.component:TableFR21 adds that a selected row reflectsselectedon itstable-rowtarget (INV6), with or without the wash. Width is unchanged.Table.doc.mjslistsstates: ['selected']onastryx-table-row.table-rowtarget anddata-selectedreflection rows.Evidence
useTableSelection.test.tsxcases fail onmain:data-selected="selected"and loses it on uncheck;hasRowHighlight={false}, the row has no wash but still hasdata-selected.themingTargets.test.tspass (1129), andcheck:knowledgeandcheck:changesetspass.Writing rubric results
Record touched:
component:Table(FR21).Owner: fix-loop lane 4. Land path: Drain merges after CodeBunny, Specs and CI.