Skip to content

fix(Table): separate semantic row status from custom markers - #5832

Merged
cixzhang merged 4 commits into
mainfrom
fix/table-row-status-compatibility
Sep 2, 2026
Merged

fix(Table): separate semantic row status from custom markers#5832
cixzhang merged 4 commits into
mainfrom
fix/table-row-status-compatibility

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

User impact

People scanning dense tables get a consistent non-color glyph for semantic success, warning, and error. Existing custom-marker callers keep the same source shape: no icon renders the 8px dot, and an explicit icon renders the caller-selected glyph.

Current contract

Implements the current module:Table/useTableRowStatus contract, landed by #5830.

Semantic before → after

Before: current canaries overload color: success, warning, and error select both tone and an implicit glyph, while other values select paint only.

After: getStatus accepts the contract's exclusive semantic {status, label} and custom {color, icon?, label} branches. Semantic status resolves glyph and tone through the active theme. Custom color always selects paint; representation changes only when the caller supplies icon.

The stable TableRowStatus custom-marker interface remains unchanged and declaration-mergeable. The new TableSemanticRowStatus interface is additive, and the exclusive union exists only at the UseTableRowStatusConfig.getStatus callback boundary.

Compatibility and scope

  • Stable consumers need no source migration.
  • Named custom icons preserve the released Icon color mapping.
  • Raw CSS custom icons now use the caller's exact paint instead of falling back to the primary icon color; this is the intentional visual correction required by the current contract.
  • Canary users relying on an implicit semantic glyph switch from color to status.
  • A supported untyped status wins over color/icon, with one development warning per loaded module and the same production rendering without a warning.
  • An unsupported untyped status falls through to a valid custom marker, following the contract's custom-branch precedence.
  • No public variant/presentation, reflected state, Table row-status target, or theme selector was added.
  • ChatToolCalls is intentionally unchanged; it needs a separate component contract.

Test evidence

  • Focused: 47 tests across runtime, public-subpath types/declaration merging, selection/expansion/custom/grouped composition, and performance/no-op identity.
  • Types/docs: core typecheck, core docs typecheck, and Storybook typecheck.
  • Repository: focused lint, Prettier, check:repo, full build, and public repository guard.
  • GitHub CI: pending for this rebased head.
  • No local accessibility audit was run; PR CI owns pr-a11y.

@vercel

vercel Bot commented Sep 1, 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 Sep 2, 2026 6:14pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 1, 2026
github-actions Bot added a commit that referenced this pull request Sep 1, 2026
github-actions Bot added a commit that referenced this pull request Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Table (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1960 -
Complexity N/A Very High (112) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.8KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

Status: No visual change across 14 compared shot(s).


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch 2 times, most recently from 7cafe66 to e5321a9 Compare September 1, 2026 21:39
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Sep 1, 2026
@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch from e5321a9 to 774396c Compare September 1, 2026 21:59
@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch from 774396c to a8c4381 Compare September 1, 2026 22:19
github-actions Bot added a commit that referenced this pull request Sep 1, 2026
@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch 2 times, most recently from 02442d5 to d399964 Compare September 1, 2026 22:26
@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch from d399964 to 855a696 Compare September 1, 2026 22:50
github-actions Bot added a commit that referenced this pull request Sep 1, 2026
@cixzhang
cixzhang marked this pull request as ready for review September 1, 2026 23:24

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Semantic verdict: request changes

Thanks — the semantic/custom split works. Existing builders using {color: 'warning', icon: 'clock'} get a different glyph color: 0.5.2 renders rgb(116, 91, 0), while this head renders rgb(110, 53, 0). Raw CSS icon colors also switch from primary to the raw value. That conflicts with the PR and changeset claim that stable custom markers keep their 0.5.2 behavior. Please reconcile the compatibility claim with the rendered behavior: preserve the released mapping where the current contract allows, and explicitly document and test every intentional visual change. The branch also needs a merge with main.

[Reviewed by Robohands]

@cixzhang
cixzhang force-pushed the fix/table-row-status-compatibility branch from 855a696 to 16016c9 Compare September 2, 2026 18:10
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Sep 2, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Semantic verdict: approve

Thanks — this restores the stable custom-marker contract while adding the approved semantic branch. I verified the exact head across theme mapping, custom dots/icons, invalid untyped precedence, plugin composition, render budgets, normal pixels, and forced colors; 47 focused tests passed, and all completed CI signals are green.

[Reviewed by Robohands]

github-actions Bot added a commit that referenced this pull request Sep 2, 2026
@cixzhang
cixzhang merged commit 4a48880 into main Sep 2, 2026
28 checks passed
@github-actions
github-actions Bot deleted the fix/table-row-status-compatibility branch September 3, 2026 06:22
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.

2 participants