Skip to content

fix(themes): a plain table's rows keep their text; only a striped table's rows take the stripe's - #12646

Closed
josephfarina wants to merge 4 commits into
core-table-row-parityfrom
josephfarina/table-striped-state
Closed

josephfarina wants to merge 4 commits into
core-table-row-parityfrom
josephfarina/table-striped-state

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #12368, which gives the striped state to every row Core may stripe (footer rows included). Review only the last three commits; retarget to main once #12368 merges.

User impact

In Butter, Y2K and Gothic, every second row of a plain (unstriped) table takes the page's text colours as if it were a striped row. On the page that is invisible, but inside a coloured card in dark mode the card stays pastel and those rows read white on it: about 1.15:1 in Butter, 1.28–1.34:1 in Y2K and 1.81–2.12:1 in Gothic. Half the rows are unreadable. With this change a plain table's rows keep the card's ink, and a striped table's rows keep their stripes and the stripe's text.

Problem and solution fit

  • Why does it occur? These themes repaint a striped row's text (its stripe is a fill of its own), but their rule matched :nth-child(even ...) of every table row, striped or not.
  • Why does it harm the task? Reading a table's rows is the whole task.
  • Why does that matter? Tables inside cards are a common dashboard layout.

The three themes key the rule on the row's striped state (table-row striped, from #12368) with the same even-row selector, so it reaches only a striped table's painted rows.

Expected behavior and authority

Smallest restoration

  • packages/themes/{butter,y2k,gothic}/src/*Theme.ts: the striped-row text rule moves from base to the striped state.

Evidence

  • Rendered (Chromium, light and dark) in all seven official themes: plain and striped tables on the page, plain and striped tables in a blue card, and a plain table in a pink card. Every row's text reads at 4.5:1 or better after the change (before: the failures above). Striped tables keep their stripes.
  • Look gate (deterministic checks, compared with main): no new findings on those pages in the seven official themes.
  • scripts/check-theme-striped-rows.test.mjs generates each official theme's CSS from source and holds every even-row rule to the striped state. The CLI's bundled Butter, Y2K and Gothic are regenerated (pnpm bundle:cli-themes), so astryx theme eject ships the fixed rule. The role contrast guard reads the striped-row rule from its new key.

Scope

Components: Table, TableRow (through the table-row striped state that #12368 carries: the parity prop, data-parity, data-striped)

Themes: Butter, Y2K, Gothic

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • CI=1 pnpm vitest run --project node scripts/check-theme-striped-rows.test.mjs scripts/check-text-contrast-by-role.test.mjs (10 passed)
  • CI=1 pnpm vitest run packages/themes/butter packages/themes/y2k packages/themes/gothic (37 passed)
  • The type gate (five CLI typechecks and sync:api-types); eslint on the touched files.

look gate v1.16 light+dark at 8bf6275/5ff556a07b6: no new problems caused (3 pre-existing judge findings, pixel-identical on base, filed); 112 base problems fixed

@vercel

vercel Bot commented Nov 18, 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 19, 2026 6:16am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 18, 2026
@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 6:22 AM UTC

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

@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.

The fix works: in Butter, Y2K and Gothic a plain table in a coloured card now keeps the card's ink on every row, and striped tables keep their stripes. Approval waits on an owner decision about the proposed component:Table FR4 sentence, which makes the table target's striped state and its data-striped attribute public; an engineering owner (the author qualifies) records it by commenting /approve-spec <full head SHA> on the head that carries the fixes below.

Blocking

  • The probe theme was not regenerated after Table.doc.mjs declared the striped state, so Lint's "Check that the probe theme is current" fails; run pnpm visual:probe-theme and commit packages/themes/probe/src/probeTheme.ts.
  • The CLI's bundled Butter, Y2K and Gothic themes under packages/cli/assets/templates/themes/ still carry the old even-row selector, so astryx theme eject would ship the bug and scripts/check-cli-theme-bundle.test.mjs fails in test-node; run pnpm bundle:cli-themes and commit the result.
  • scripts/check-theme-striped-rows.test.mjs reads each theme's built dist/theme.css, which a checkout without built themes (CI's Node test job builds only Core) does not have, so it fails at line 43; generate each theme's CSS from source in the test with generateThemeCSS(theme).component, as probeTheme.test.ts does.
  • data-striped (Table.tsx:323) is new public surface that only the proposed FR4 sentence names, so it stays a blocker until an engineering owner approves that sentence.

Smaller points: the changeset's "about 1.2:1" fits Butter and Y2K, but Gothic's rows read about 1.5–2.2:1, and the new import at Table.tsx:20 can join the existing themeProps import.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim (release note): a plain table's rows keep the surrounding text in the three themes and only striped tables' even rows take the stripe's text: verified for the theme packages (built CSS; before and after captures), not yet for the CLI's ejected copies.
  • Claim (release note): the affected rows read at about 1.2:1: partly true; Butter 1.05–1.20:1 and Y2K 1.11–1.34:1, but Gothic 1.52–2.19:1.
  • Claim (release note): a striped Table now reflects a striped theme state that those themes read: verified (Table.tsx:321-324, the three theme selectors).
  • Claim (description): FR4 gains one sentence and its verification row names the two new checks: verified (Table.spec.md:223, :462).
  • Claim (description): Core stripes only with isStriped and exposed nothing a theme could read: verified on the base (TableRow.tsx:202-216; no data-striped in Core).
  • Claim (description): a plain table's output is unchanged and no prop is added: verified (null states are omitted; rendered tables probed).
  • Claim (description): 1.15:1 in Butter, 1.28–1.34:1 in Y2K, 1.81–2.12:1 in Gothic: verified for blue and pink cards; other card colours range wider.
  • Claim (description): every row reads 4.5:1 or better after the change: verified for plain rows in cards (lowest 4.96:1) and by the contrast guard for striped rows.
  • Claim (description): the new Table test fails on main: verified (fails on the base, passes at this head).
  • Claim (description): the striped-rows check holds every built official theme's rule: true only when the themes are built; fails without them (blocking above).
  • Claim (description): the look gate shows no new findings: not checked.
  • Claim (description): the listed test runs, the type gate and eslint pass: Table, theme and guard tests pass with built themes, Core typecheck and CI typecheck pass, eslint and prettier pass on the changed files.
  • File .changeset/table-striped-state.md: ratio wording (non-blocking).
  • File docs/specs/components/Table/Table.spec.md: the FR4 sentence awaits an engineering owner's approval.
  • File packages/core/src/Table/Table.doc.mjs: declares the state; probe theme not regenerated (blocking).
  • File packages/core/src/Table/Table.test.tsx: clear.
  • File packages/core/src/Table/Table.tsx: data-striped awaits that approval (blocking); duplicate import (non-blocking).
  • File packages/themes/butter/src/butterTheme.ts: CLI bundle copy not regenerated (blocking).
  • File packages/themes/gothic/src/gothicTheme.ts: CLI bundle copy not regenerated (blocking).
  • File packages/themes/y2k/src/y2kTheme.ts: CLI bundle copy not regenerated (blocking).
  • File scripts/check-text-contrast-by-role.test.mjs: clear (its selector matches the themes; passes).
  • File scripts/check-theme-striped-rows.test.mjs: needs built themes (blocking).

Automated review (maintainer link)

Comment thread packages/core/src/Table/Table.doc.mjs Resolved
Comment thread packages/core/src/Table/Table.tsx Resolved
Comment thread packages/core/src/Table/Table.tsx Resolved
@josephfarina josephfarina changed the title fix(Table, themes): a plain table's rows keep their text; only a striped table's rows take the stripe's fix(themes): a plain table's rows keep their text; only a striped table's rows take the stripe's Nov 18, 2026
@josephfarina
josephfarina force-pushed the josephfarina/table-striped-state branch from f1f8242 to eec4b71 Compare November 18, 2026 16:58
@josephfarina
josephfarina changed the base branch from main to core-table-row-parity November 18, 2026 16:58
@josephfarina
josephfarina removed the request for review from cixzhang November 18, 2026 16:58
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec eec4b71

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · eec4b71

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
TableBody 🔴 6.6 kB (+3.1 kB) · 3.3 kB CSS (0) — — · — · —
lab/Comments 377.0 kB (+162 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 370.3 kB (+162 B) · 2.4 kB CSS (0) — — · — · —
14 more components
Component Size LoC Visual · A11y · RTL
Table 121.9 kB (+154 B) · 19.8 kB CSS (0) — — · — · —
Markdown 205.4 kB (+138 B) · 22.1 kB CSS (0) — — · — · —
TableRow 7.2 kB (+85 B) · 4.0 kB CSS (0) — — · — · —
Lightbox 147.8 kB (0) · 12.0 kB CSS (0) — — · — · —
Overlay 23.6 kB (0) · 3.9 kB CSS (0) — — · — · —
TableCell 104.6 kB (0) · 19.3 kB CSS (0) — — · — · —
TableFooter 3.5 kB (0) · 3.3 kB CSS (0) — — · — · —
TableHeader 3.5 kB (0) · 3.3 kB CSS (0) — — · — · —
TableHeaderCell 104.4 kB (0) · 19.1 kB CSS (0) — — · — · —
TableSelectionToolbar 76.5 kB (0) · 14.1 kB CSS (0) — — · — · —
Toast 105.4 kB (0) · 11.1 kB CSS (0) — — · — · —
lab/DialogHeroHeader 90.3 kB (0) · 372 B CSS (0) — — · — · —
lab/ListInput 95.3 kB (0) · 922 B CSS (0) — — · — · —
charts/Chart 242.0 kB (−2 B) · 516 B CSS (0) — — · — · —

Package size:

  • @astryxdesign/cli 5.36 MB packed (+59 B); no new dependencies
  • @astryxdesign/core 7.66 MB packed (+3.0 kB); no new dependencies
  • @astryxdesign/theme-butter 56.3 kB packed (+65 B); no new dependencies
2 more packages
  • @astryxdesign/theme-gothic 40.1 kB packed (+38 B); no new dependencies
  • @astryxdesign/theme-y2k 45.4 kB packed (+65 B); no new dependencies

API changes: core +2 · ~1 · −0

3 API changes (advisory)
Package Where Signature Usage
+ core Public attributes · attr data-parity attr data-parity (theme reflection on 1 target) [data-parity] { … }
+ core Public attributes · attr data-striped attr data-striped (theme reflection on 1 target) [data-striped] { … }
~ core Theme targets · target table-row (Table) target table-row (Table) states [selected] → target table-row (Table) props [parity] states [selected, striped] defineTheme({components: {'table-row': {…}}})

Wide change (shared styles: packages/themes/butter/src/butterTheme.ts, packages/themes/gothic/src/gothicTheme.ts, packages/themes/y2k/src/y2kTheme.ts): add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

Current run: CI concluded failure; parts of this report may be missing.


Generated by PR Enrichment workflow | View full report

@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 theme fix works: in Butter, Y2K and Gothic, a plain table inside a coloured card now keeps the card's text colour on every row, and striped tables keep their stripes. Three fixes are needed first:

  • Run pnpm bundle:cli-themes and commit the result, because the CLI's bundled Butter, Y2K and Gothic themes still use the old rule, so astryx theme eject ships the bug and check-cli-theme-bundle fails for all three.
  • Generate the CSS from source in scripts/check-theme-striped-rows.test.mjs (for example generateThemeCSS(theme).component over FIRST_PARTY_THEMES), because CI never builds the themes and the test fails with "expected 0 to be greater than 0".
  • Correct the changeset's "about 1.2:1", because Gothic's rows measure 1.81:1 to 2.12:1; "1.15:1 to 2.12:1" is accurate.

The striped state comes from #12368, so this pull request lands after it or with it.

Claims and files checked

Review mode: full; reason: history

  • Claim: a plain table's even rows took the page's text colours in the three themes: verified in the built CSS before the change.
  • Claim: those rows read about 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic) in a coloured card in dark mode: verified with a Chromium probe.
  • Claim: after the change, plain rows keep the card's ink and striped tables keep their stripes and stripe text: verified (5.33:1 or better; stripes unchanged).
  • Claim: the rule now keys on the row's striped state with the same even-row selector: verified (one selector per theme in the built CSS).
  • Claim: the role contrast guard holds 4.5:1 and reads the rule from its new key: verified (the guard passes; its striped-row entry reads the striped key).
  • Claim: the new test holds every built theme's even-row rule to the striped state: true for themes that are built, but it fails in CI, where none are.
  • Claim: no new public API: verified (the API surface generator lists no rows).
  • Claim: the three themes' own tests pass (37): verified.
  • Claim: rendered in all seven official themes, and the look gate shows no new findings: partly verified (the three changed themes were probed; the other four do not change); the look gate was not available here.
  • Changeset: the scope sentence is verified; "about 1.2:1" is false for Gothic.
  • .changeset/themes-striped-rows-plain-tables.md: ratio finding.
  • packages/themes/butter/src/butterTheme.ts: CLI copy not regenerated; the doc comment could be shorter (non-blocking).
  • packages/themes/y2k/src/y2kTheme.ts: CLI copy not regenerated; the doc comment could be shorter (non-blocking).
  • packages/themes/gothic/src/gothicTheme.ts: CLI copy not regenerated.
  • scripts/check-text-contrast-by-role.test.mjs: clear.
  • scripts/check-theme-striped-rows.test.mjs: needs built themes.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5501d8c

@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 striped-row fix works and the earlier findings are fixed, but one release-note gap remains.

  • The CLI's bundled Butter, Y2K and Gothic themes (packages/cli/assets/templates/themes/*) now change, but no Changeset names @astryxdesign/cli, so node scripts/release/changeset-coverage.mjs pr fails and people who run astryx theme eject get no CLI release note; add a @astryxdesign/cli patch Changeset, as the earlier bundled-theme fixes did.

In a coloured card in dark mode, a plain table's even rows now read 5.33:1 or better (from 1.15:1 to 2.12:1), striped tables keep their stripes, and the new guard fails on the base and passes here. A new commit voids the /approve-spec on this head, so an engineering owner (the author qualifies) comments /approve-spec <full head SHA> again on the fixing head.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0).
  • Claim: plain-table even rows in dark coloured cards read 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic). Verified: Chromium probe on the base.
  • Claim: after the change plain rows keep the card's ink and striped tables keep their stripes and stripe text. Verified: probe, 5.33:1 or better; striped rows unchanged.
  • Claim: the old rule matched every table's even rows. Verified: the base's built selector.
  • Claim: the three themes key the rule on the row's striped state with the same even-row selector. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66 and the built CSS.
  • Claim: the striped state comes from the stacked pull request's row record. Verified: TableRow.tsx renders it on striped body rows at the base.
  • Claim: the role contrast guard keeps body text at AA and reads the rule from its new key. Verified: check-text-contrast-by-role.test.mjs:188-192, passes.
  • Claim: the new test generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: fails for three themes on the base, passes on the head.
  • Claim: the CLI's bundled themes are regenerated, so eject ships the fixed rule. Verified: byte-identical copies; check-cli-theme-bundle passes.
  • Claim: rendered in all seven official themes. Verified for Butter, Y2K and Gothic; the other four have no even-row rule, so their output is unchanged.
  • Claim: the look gate shows no new findings. Not reproduced here.
  • Claim: no new public API. Verified: the surface generator lists no row.
  • Claim: 10 and 37 tests pass; eslint is clean on the touched files. Verified. The CLI typechecks were not run here.
  • Changeset: plain rows keep their text, only striped even rows take the stripe's, at 1.15:1 to 2.12:1 before, through the row's striped state. Verified; but it names no @astryxdesign/cli entry (finding above).
  • File .changeset/themes-striped-rows-plain-tables.md: finding (missing CLI entry).
  • Files packages/cli/assets/templates/themes/{butter,gothic,y2k}/*Theme.ts: clear.
  • Files packages/themes/{butter,gothic,y2k}/src/*Theme.ts: clear (non-blocking comment length in Butter and Y2K).
  • Files scripts/check-text-contrast-by-role.test.mjs, scripts/check-theme-striped-rows.test.mjs: clear.

Automated review (maintainer link)

@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.

Approval waits on one engineering-owner decision; the earlier release-note finding is fixed.

  • The Butter, Y2K and Gothic striped-row rule reads the table row's striped state, which the stacked table-row change (#12368) defines and main does not have yet, and the earlier /approve-spec named the previous head, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner).

The changeset now names @astryxdesign/cli and the coverage gate passes. In coloured cards a plain table's even rows now read 5.33:1 or better (from 1.15:1 to 2.12:1), and striped tables keep their stripes. One optional suggestion remains: the doc comment above STRIPED_ROW in the Butter and Y2K themes is one 37-word sentence and reads better split.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0).
  • Claim: in dark coloured cards, a plain table's even rows read about 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic). Verified: Chromium probe on the base.
  • Claim: after the change a plain table's rows keep the card's ink, and a striped table keeps its stripes and stripe text. Verified: probe, 5.33:1 or better; striped rows unchanged.
  • Claim: the old rule matched the even rows of every table. Verified: the base's theme sources and built selector.
  • Claim: the three themes key the rule on the row's striped state with the same even-row selector. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66.
  • Claim: a striped table's body rows carry the striped state, from the stacked change. Verified: the probe finds it only on striped tables' body rows.
  • Claim: body text keeps AA contrast, and the role contrast guard reads the rule from its new key. Verified: check-text-contrast-by-role.test.mjs:188-192, passes.
  • Claim: the new test generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: passes here; it failed for three themes on the base.
  • Claim: the CLI's bundled themes are regenerated, so eject ships the fixed rule. Verified: byte-identical copies; the bundle test passes.
  • Claim: rendered in all seven official themes. Verified for Butter, Y2K and Gothic; the other four have no even-row rule, so their output is unchanged.
  • Claim: the look gate shows no new findings. Not reproduced here.
  • Claim: no new public API. Verified: the only surface touched is one generated selector per theme.
  • Claim: 10 and 37 tests pass. Verified. The type gate and eslint were not rerun here.
  • Changeset: plain rows keep their text, only striped even rows take the stripe's, 1.15:1 to 2.12:1 before, through the row's striped state, in the packages and the CLI copies. Verified; it names the CLI and the three themes, and the coverage gate passes.
  • File .changeset/themes-striped-rows-plain-tables.md: clear.
  • Files packages/cli/assets/templates/themes/{butter,gothic,y2k}/*Theme.ts: clear.
  • Files packages/themes/{butter,gothic,y2k}/src/*Theme.ts: clear (non-blocking comment length in Butter and Y2K).
  • Files scripts/check-text-contrast-by-role.test.mjs, scripts/check-theme-striped-rows.test.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 07ec16b

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3a7c0b1

@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.

Approval waits on one engineering-owner decision: the Butter, Y2K and Gothic striped-row rule reads the table row's striped state, which only the table-row requirement proposed in #12368 defines, and that requirement is not on main yet. The last spec approval named an earlier commit and this pull request has been rebased since, so it does not cover this head: an engineering owner records the decision by commenting /approve-spec with this head's full SHA, and the author may do so as an engineering owner. Landing #12368 on main first settles it too; nothing else blocks, and the fix and its tests check out on this head.

One optional suggestion: the doc comment above STRIPED_ROW in the Butter and Y2K themes is one 37-word sentence and reads better split, as the earlier inline comment shows.

Claims and files checked

Review mode: full; reason: rebase

  • Claim: stacked on the table-row change, which marks a striped table's body rows. Verified: the base's table row sets the striped state only on a striped table's body rows (TableRow.tsx:233-247), and the probe finds it only there.
  • Claim: inside a coloured card in dark mode, a plain table's even rows read about 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic) before the fix. Verified by the probe on the base.
  • Claim: on the page the old rule is invisible. Verified: plain rows on the page measure the same on both sides.
  • Claim: after the change a plain table's rows keep the card's ink, and a striped table keeps its stripes and the stripe's text. Verified: 5.33:1 or better on plain rows; striped rows unchanged.
  • Claim: the old rule matched the even rows of every table. Verified: the base's theme sources key it on the resting rule, and the base's built CSS has no striped condition.
  • Claim: the three themes key the rule on the row's striped state with the same even-row selector. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66 and the built CSS.
  • Claim: body text keeps AA contrast, and the role contrast guard reads the striped-row rule from its new key. Verified: check-text-contrast-by-role.test.mjs:187-195; the guard passes.
  • Claim: the new test generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: it passes on this head and fails on the base for Butter, Y2K and Gothic.
  • Claim: the CLI's bundled themes are regenerated, so eject ships the fixed rule. Verified: byte-identical copies; the bundle test passes.
  • Claim: rendered in all seven official themes. Verified for Butter, Y2K and Gothic; the other four have no even-row rule, which the guard's second test confirms.
  • Claim: the look gate shows no new findings. Not reproduced here.
  • Claim: one defect restored, no tagalong, and no new public API, default or interaction. Verified: one selector per theme; the API comparison lists no change.
  • Claim: public text carries no internal context. Verified.
  • Claim: 10 and 37 tests pass, and the type gate and eslint pass. Verified for the tests and for eslint on the theme sources; the type gate was not rerun, though each theme's build emits its type declarations.
  • Description direction to review only the last commit: the whole change from its base, three commits, was reviewed.
  • Changeset: plain rows keep their text and only striped even rows take the stripe's, 1.15:1 to 2.12:1 before, through the row's striped state, in the packages and the CLI copies. Verified; it names the CLI and the three themes.
  • File .changeset/themes-striped-rows-plain-tables.md: clear.
  • Files packages/cli/assets/templates/themes/{butter,gothic,y2k}/*Theme.ts: clear.
  • Files packages/themes/{butter,gothic,y2k}/src/*Theme.ts: clear apart from the spec approval above (non-blocking comment length in Butter and Y2K).
  • File scripts/check-text-contrast-by-role.test.mjs: clear.
  • File scripts/check-theme-striped-rows.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/table-striped-state branch from 6bb3810 to bde7931 Compare November 19, 2026 05:03

@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.

Approval waits on one engineering-owner decision: the Butter, Y2K and Gothic striped-row rule reads the table row's striped state, which only the table-row requirement proposed in #12368 defines, and that requirement is not on main yet. The last spec approval named an earlier commit and this pull request has been rebased since, so it does not cover this head: an engineering owner records the decision by commenting /approve-spec with this head's full SHA, and the author may do so as an engineering owner. Landing #12368 on main first settles it too. Nothing else blocks: the fix is the same change an engineering owner approved on an earlier commit.

One optional suggestion: the doc comment above STRIPED_ROW in the Butter and Y2K themes is one 37-word sentence and reads better split, as the earlier inline comment shows.

Claims and files checked

Review mode: carry-forward; reason: none

  • Claim: stacked on the table-row change, which gives the striped state to every row the core table may stripe, footer rows included. Verified: the base's table row sets it on every non-header row of a striped table (TableRow.tsx:242), the same rows its stripe styles reach (TableRow.tsx:198-219).
  • Claim: inside a coloured card in dark mode, a plain table's even rows read about 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic) before the fix. Verified by the probe on the base.
  • Claim: on the page the old rule is invisible. Verified: plain rows on the page measure the same on both sides.
  • Claim: after the change a plain table's rows keep the card's ink, and a striped table keeps its stripes and the stripe's text. Verified: 5.33:1 or better on plain rows; striped rows unchanged.
  • Claim: the old rule matched the even rows of every table. Verified: the base's theme sources key it on the resting rule, and the base's built CSS has no striped condition.
  • Claim: the three themes key the rule on the row's striped state with the same even-row selector. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66 and the built CSS.
  • Claim: body text keeps AA contrast, and the role contrast guard reads the striped-row rule from its new key. Verified: check-text-contrast-by-role.test.mjs:187-195; the guard passes.
  • Claim: the new test generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: it passes with this patch and fails on the base for Butter, Y2K and Gothic.
  • Claim: the CLI's bundled themes are regenerated, so eject ships the fixed rule. Verified: byte-identical copies; the bundle test passes.
  • Claim: rendered in all seven official themes. Verified for Butter, Y2K and Gothic; the other four have no even-row rule, which the guard's second test confirms.
  • Claim: the look gate shows no new findings. Not reproduced here.
  • Claim: one defect restored, no tagalong, and no new public API, default or interaction. Verified: one selector per theme; the API comparison lists no change.
  • Claim: public text carries no internal context. Verified.
  • Claim: 10 and 37 tests pass, and the type gate and eslint pass. Verified for the tests and for eslint on the theme sources; the type gate was not rerun, though each theme's build emits its type declarations.
  • Description direction to review only the last three commits: the whole change from its base, three commits, was reviewed.
  • Changeset: plain rows keep their text and only striped even rows take the stripe's, 1.15:1 to 2.12:1 before, through the row's striped state, in the packages and the CLI copies. Verified; it names the CLI and the three themes.
  • File .changeset/themes-striped-rows-plain-tables.md: clear.
  • Files packages/cli/assets/templates/themes/{butter,gothic,y2k}/*Theme.ts: clear.
  • Files packages/themes/{butter,gothic,y2k}/src/*Theme.ts: clear apart from the spec approval above (non-blocking comment length in Butter and Y2K).
  • File scripts/check-text-contrast-by-role.test.mjs: clear.
  • File scripts/check-theme-striped-rows.test.mjs: clear.

Automated review (maintainer link)

@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.

Approval waits on one engineering-owner decision: the Butter, Y2K and Gothic striped-row rule reads the table row's striped state, which only the table-row requirement proposed in #12368 defines, and that requirement is not on main yet. The last spec approval named an earlier commit and this pull request has been rebased since, so it does not cover this head: an engineering owner records the decision by commenting /approve-spec with this head's full SHA (the author may do so as an engineering owner), or landing #12368 on main first settles it. Nothing else blocks: the fix is the same change an engineering owner approved on an earlier commit.

One optional suggestion: the doc comment above STRIPED_ROW in the Butter and Y2K themes is one 37-word sentence and reads better split, as the earlier inline comment shows.

Claims and files checked

Review mode: carry-forward; reason: none

  • Claim: stacked on the table-row change, which gives the striped state to every row the core table may stripe, footer rows included. Verified: the base's table row sets it on every non-header row of a striped table (TableRow.tsx:242), the same rows its stripe styles reach (TableRow.tsx:198-219).
  • Claim: inside a coloured card in dark mode, a plain table's even rows read about 1.15:1 (Butter), 1.28 to 1.34:1 (Y2K) and 1.81 to 2.12:1 (Gothic) before the fix. Verified by the probe on the base.
  • Claim: on the page the old rule is invisible. Verified: plain rows on the page measure the same on both sides.
  • Claim: after the change a plain table's rows keep the card's ink, and a striped table keeps its stripes and the stripe's text. Verified: 5.33:1 or better on plain rows; striped rows unchanged.
  • Claim: the old rule matched the even rows of every table. Verified: the base's theme sources key it on the resting rule, and the base's built CSS has no striped condition.
  • Claim: the three themes key the rule on the row's striped state with the same even-row selector. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66 and the built CSS.
  • Claim: body text keeps AA contrast, and the role contrast guard reads the striped-row rule from its new key. Verified: check-text-contrast-by-role.test.mjs:187-195; the guard passes.
  • Claim: the new test generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: it passes with this patch and fails on the base for Butter, Y2K and Gothic.
  • Claim: the CLI's bundled themes are regenerated, so eject ships the fixed rule. Verified: byte-identical copies; the bundle test passes.
  • Claim: rendered in all seven official themes. Verified for Butter, Y2K and Gothic; the other four have no even-row rule, which the guard's second test confirms.
  • Claim: the look gate shows no new findings. Not reproduced here.
  • Claim: one defect restored, no tagalong, and no new public API, default or interaction. Verified: one selector per theme; the API comparison lists no change.
  • Claim: public text carries no internal context. Verified.
  • Claim: 10 and 37 tests pass, and the type gate and eslint pass. Verified for the tests and for eslint on the theme sources; the type gate was not rerun, though each theme's build emits its type declarations.
  • Description direction to review only the last three commits: the whole change from its base, three commits, was reviewed.
  • Changeset: plain rows keep their text and only striped even rows take the stripe's, 1.15:1 to 2.12:1 before, through the row's striped state, in the packages and the CLI copies. Verified; it names the CLI and the three themes.
  • File .changeset/themes-striped-rows-plain-tables.md: clear.
  • Files packages/cli/assets/templates/themes/{butter,gothic,y2k}/*Theme.ts: clear.
  • Files packages/themes/{butter,gothic,y2k}/src/*Theme.ts: clear apart from the spec approval above (non-blocking comment length in Butter and Y2K).
  • File scripts/check-text-contrast-by-role.test.mjs: clear.
  • File scripts/check-theme-striped-rows.test.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 34afad2

…le's rows take the stripe's

Butter, Y2K and Gothic key their striped-row text rule on the row's striped state, so it no longer matches every even row of a plain table. Inside a coloured card in dark mode those rows read white on the pastel card (about 1.2:1).
…t from source

The CLI's bundled Butter, Y2K and Gothic carry the striped-row rule keyed on the row's striped state. The guard generates each official theme's CSS from source, so it runs without built themes. The changeset names the measured range.
@josephfarina
josephfarina force-pushed the josephfarina/table-striped-state branch from 34afad2 to 5ff556a Compare November 19, 2026 06:06
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5ff556a

@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: CI has not run on this head yet.

In Butter, Y2K and Gothic, a plain table inside a coloured card now keeps the card's ink on every row (its even rows go from 1.15–2.12:1 to 5.33:1 or better), and striped tables keep their stripes and the stripe's text. The striped state the rule reads (from #12368) has an engineering owner's approval for this exact head, and the earlier comment-length note is fixed. A further rebase onto #12368's branch needs that approval again for the new head, unless #12368 lands first.

Claims and files checked

Review mode: full; reason: rebase

  • Claim (changeset): plain tables keep the surrounding text colour in Butter, Y2K and Gothic, and only striped tables' even rows take the stripe's text. Verified: built theme CSS and a rendered probe.
  • Claim (changeset): in a coloured card in dark mode, plain even rows read at 1.15:1 to 2.12:1. Verified: Butter 1.15, Y2K 1.28 to 1.34, Gothic 1.81 to 2.12 (Gothic also fails in light mode).
  • Claim (changeset): the rule reads the row's striped state in the packages and the CLI's bundled copies, and the note names the CLI and the three themes. Verified: butterTheme.ts:89, y2kTheme.ts:85, gothicTheme.ts:66; copies byte-identical; changeset check passes.
  • Claim (description): at the base the rule matched every even row, striped or not. Verified: base selector; the new guard fails on the base for the three themes.
  • Claim (description): the three themes key the rule on the row's striped state with the same even-row selector. Verified: one built selector changes per theme.
  • Claim (description): the per-theme contrast figures. Verified by the rendered probe.
  • Claim (description): plain rows keep the card's ink, and striped tables keep their stripes and stripe text. Verified: 5.33:1 or better; striped rows unchanged.
  • Claim (description): the striped state covers a striped table's non-header rows, from the stacked table-row change. Verified: TableRow.tsx:242.
  • Claim (description): the new guard generates each official theme's CSS from source and holds every even-row rule to the striped state. Verified: 8 tests pass here; 3 fail on the base.
  • Claim (description): the CLI's bundled themes are regenerated. Verified: byte-identical; the bundle test passes.
  • Claim (description): the role contrast guard reads the rule from its new key. Verified: check-text-contrast-by-role.test.mjs:187-195; passes.
  • Claim (description): rendered checks across the official themes. Verified for Butter, Y2K and Gothic in light and dark; the other four themes have no even-row rule and no source change.
  • Claim (description): the look gate found nothing new. Not reproduced here (an author-run check); not relied on.
  • Claim (description): no new public API. Verified: the API surface generator lists no rows.
  • Claim (description): 10 and 37 tests pass. Verified.
  • Files: .changeset/themes-striped-rows-plain-tables.md, packages/themes/butter/src/butterTheme.ts, packages/themes/y2k/src/y2kTheme.ts, packages/themes/gothic/src/gothicTheme.ts, the three copies under packages/cli/assets/templates/themes/, scripts/check-text-contrast-by-role.test.mjs and scripts/check-theme-striped-rows.test.mjs: each clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12452 fix(AppShell): with the standard width points, a server-rendered top nav hides its start and center content on a phone before its script runs
  Author: @josephfarina
- #12368 feat(Table): table rows expose their stripe to themes (parity, striped)
  Author: @josephfarina
- #12646 fix(themes): a plain table's rows keep their text; only a striped table's rows take the stripe's
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12894.

@github-actions
github-actions Bot deleted the josephfarina/table-striped-state branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — 5ff556a0 Deployed Nov 19, 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant