Skip to content

docs(Table): define row-status contract - #5830

Merged
cixzhang merged 2 commits into
mainfrom
docs/table-row-status-contract
Sep 1, 2026
Merged

docs(Table): define row-status contract#5830
cixzhang merged 2 commits into
mainfrom
docs/table-row-status-contract

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

User impact

People scanning dense tables get consistent non-color glyphs for semantic success, warning, and error. Existing stable consumers keep every 0.5.2 custom marker unchanged: color remains paint-only, an omitted icon renders the dot, and an explicit icon renders the caller-selected glyph.

Infrastructure

Module-contract infrastructure landed on main in #5833. This PR now targets current main directly.

Semantic before → after

Before: current canaries overload TableRowStatus.color: success, warning, and error select both tone and a default icon, while other colors select paint only.

After: the exported, declaration-mergeable TableRowStatus interface remains byte-for-byte the stable {color, icon?, label} custom-marker contract. A separate exported TableSemanticRowStatus interface adds {status, label}. Only UseTableRowStatusConfig.getStatus forms their exclusive union by intersecting the custom branch with {status?: never}.

Ownership split

  • component:Table retains aggregate Table anatomy and the shared TablePlugin protocol: transform phases, base-before-user ordering, known/custom named ordering, sequential composition, slots, failure isolation, context nesting, and plugin-array identity.
  • module:Table/useTableRowStatus owns its API and exact interfaces, callback boundary, generated column, internal icon | dot variant, semantic/custom resolution, invalid-input fallback, accessibility, performance/evidence, migration, and theming boundary.

Compatibility and release strategy

  • Contract-only change; no runtime, consumer-doc change, or Changeset.
  • Stable TableRowStatus annotations, subtypes, extensions, and declaration merging remain valid. Stable 0.5.2 callers require no edit or codemod.
  • The implementation follow-up must revert the canary-only overload from #5671 before stable; only canary adopters relying on implicit glyphs migrate manually from color to status.
  • Owner direction continues to hold #5754 as written. Direct row-status theming needs separate AST-002 review after the target, painter, and guarantees are justified.

Runtime fallback

For untyped input containing a supported status plus forbidden color and/or icon, semantic status wins. Custom fields are ignored. Development emits one warning deduplicated for the loaded row-status module instance; production renders the same semantic result without warning.

  • component:Table and module:Table/useTableRowStatus are both authority: current, approved by cixzhang on 2026-09-01. Runtime implementation remains explicitly pending.

Test plan

  • Prettier checks for both changed specifications
  • pnpm check:knowledge -- --base origin/main
  • focused knowledge/change-scope/path/spec-owner suites (169+ tests)
  • strict TypeScript probe for unchanged interface extension/merging, callback-only union, valid branches, and invalid mixtures
  • pnpm check:repo
  • Markdown table-integrity and public-hygiene scans

No Changeset: specifications only; no published package behavior changes.

@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 1, 2026 9:13pm 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
@cixzhang
cixzhang force-pushed the docs/table-row-status-contract branch from 66c7f58 to 4bed73d Compare September 1, 2026 17:27
@cixzhang
cixzhang force-pushed the docs/table-row-status-contract branch from 4bed73d to a496c2a Compare September 1, 2026 18:46
@cixzhang
cixzhang changed the base branch from main to table-plugin-spec-infrastructure September 1, 2026 18:46
@cixzhang
cixzhang force-pushed the table-plugin-spec-infrastructure branch from c645d93 to 9bceb6f Compare September 1, 2026 19:10
@cixzhang
cixzhang force-pushed the docs/table-row-status-contract branch from a496c2a to 1192259 Compare September 1, 2026 19:18
github-actions Bot added a commit that referenced this pull request Sep 1, 2026
@cixzhang
cixzhang force-pushed the table-plugin-spec-infrastructure branch from 9bceb6f to 08754f1 Compare September 1, 2026 19:34
@cixzhang
cixzhang force-pushed the docs/table-row-status-contract branch from 1192259 to d7a3186 Compare September 1, 2026 20:03
@cixzhang
cixzhang force-pushed the docs/table-row-status-contract branch from d7a3186 to d8511ed Compare September 1, 2026 20:10
@cixzhang
cixzhang changed the base branch from table-plugin-spec-infrastructure to main September 1, 2026 20:10
@cixzhang
cixzhang marked this pull request as ready for review September 1, 2026 20:22
@cixzhang

cixzhang commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec d8511ed

@github-actions github-actions Bot added the spec-auto-merge Auto-merge was enabled by the spec owner gate label Sep 1, 2026
@cixzhang

cixzhang commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 1515367

@cixzhang
cixzhang merged commit 83873b3 into main Sep 1, 2026
25 checks passed
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. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant