Skip to content

kit: MatrixGrid, cells over two axes that don't repeat their headings - #283

Merged
agorischek merged 9 commits into
mainfrom
kit-matrix-grid
Dec 3, 2026
Merged

agorischek merged 9 commits into
mainfrom
kit-matrix-grid

Conversation

@agorischek

@agorischek agorischek commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: d4b427987570266b7baa1a64bac121e48dd7b072

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Additive component; kit tests pass, with markup tests for marks, vacant cells, change regions, screen-reader names (including the present fallback), own content (0 shows; null, booleans, '' and lists of those mark) and the table's label.
↑ Copilot's points across five rounds are fixed and checked in Chromium: changes fade to plain cells at emphasis={0}, and presence and change cues survive forced-colors mode (screenshots at emphasis 1, 0.5 and 0).
↑ Markup is a plain table with th headings, which the repeated-headers craft check (#281) reads.
↓ In forced colors a removed cell or heading stays dashed at every emphasis, because an outline's style can't fade.
↓ No built-in uses it yet; the migration PR (#284) moves github-actions' matrix onto it and checks it in the browser.

Step 7 of the kit typography rollout. Stacked on #282 (base kit-type-roles-card-header); retarget to main once that merges.

MatrixGrid lays out cells over two axes: a matrix's runs by OS and compiler, flags by environment. The axes' names go once in the corner (os × compiler, in the label role), each axis's values once along its edge (code when code is set), and each cell shows only what its headings don't say. cell(row, column) returns {content?, change?, title?}, or null for an empty cell on the kit's hatch. A cell with no content shows a small mark, with title as its tooltip and its words for screen readers. Values and cells that arrive or leave are kit change regions; a removed one is dashed. caption sets several grids side by side, one per further dimension.

The first version of #268's matrix repeated both headings in every cell; this is the kit piece that makes the quiet version the easy one (light and dark):

Before: cells reading "windows-latest · TransparentCompiler"; after: MatrixGrid with marks, a vacant cell and an added row

The same in dark mode

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Matrix cells retain change colors at zero emphasis, lack accessible labels for mark-only content, and incorrectly suppress presence marks for empty ReactNode values.

3 open issues
What changed in this PR

Adds MatrixGrid to the renderer kit, continuing the typography rollout with two-axis tables that avoid repeating headings inside cells.

Changes:

  • Adds axis headings, presence marks, vacant cells, and change regions.
  • Exports the component and includes its styles.
  • Adds markup tests, usage documentation, and a changelog entry.
File Description
packages/​renderers/​kit/​test/​matrix-grid.test.mjs Tests headings, marks, accessible text, and content.
packages/​renderers/​kit/​styles/​matrix.css Styles grids, marks, vacancies, and changes.
packages/​renderers/​kit/​src/​react/​matrix-grid.tsx Implements the component and public types.
packages/​renderers/​kit/​src/​react.ts Exports the matrix API.
packages/​renderers/​kit/​react.css Includes matrix styles.
docs/​reference/​renderer-kit.md Documents the public API.
docs/​guides/​renderer-kit-type.md Explains matrix usage.
docs/​guides/​renderer-kit-components.md Adds the component guide link.
changelog.d/​matrix-grid.md Announces the new component.

Review effort: Balanced

@agorischek
agorischek force-pushed the kit-type-roles-card-header branch from 3cc5256 to 5879fc9 Compare December 2, 2026 23:02
@agorischek
agorischek force-pushed the kit-matrix-grid branch 3 times, most recently from ab2cb63 to 15b4261 Compare December 2, 2026 23:35
Base automatically changed from kit-type-roles-card-header to main December 3, 2026 00:13
@agorischek
agorischek requested a balanced review from Copilot December 3, 2026 00:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Matrices still show change styling at zero emphasis, and nested tables lack accessible names for screen-reader navigation.

3 open issues
3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Occupied cells can render blank when content is true, and forced-colors mode hides the visual distinction between occupied and vacant cells.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Treat boolean content as absent when rendering presence

packages/​renderers/​kit/​src/​react/​matrix-grid.tsx:38

React renders true as nothing too, but shows(true) returns true. Consequently, {content: true} suppresses both the presence mark and the present fallback, leaving an occupied cell visually and accessibly blank. Treat both booleans as absent content while preserving numeric zero.

Medium severity Keep presence markers visible in forced-colors mode

packages/​renderers/​kit/​styles/​matrix.css:62

Forced-colors mode suppresses CSS gradients and box shadows. Because the presence dot and vacant hatch are gradients, unchanged occupied and vacant cells then both appear blank, hiding which combinations exist. Add a forced-colors treatment using a text or bordered marker and system colors so presence remains distinguishable.

3 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Forced-colors styling makes added, modified, and renamed cells indistinguishable from unchanged cells, leaving high-contrast users without status-specific change cues.

1 open issue

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The forced-colors override still highlights changed cells at emphasis={0}, preventing a neutral grid appearance for high-contrast users.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Changed axis headings lose their visual status cues in forced-colors mode and need an emphasis-scaled outline that disappears at zero.

1 open issue
1 resolved since last review

Review effort: Balanced

agorischek and others added 4 commits December 2, 2026 19:41
The axes' names go once in the corner, each axis's values once along its edge,
and a cell shows only what its headings don't: by default a small mark with
its whole name as a tooltip and for screen readers. Empty cells sit on the
kit's hatch; values and cells that arrive or leave are change regions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ark fades with emphasis

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…o plain cells at zero emphasis

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
agorischek and others added 4 commits December 2, 2026 19:41
…colors

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… highlight color

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… emphasis

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…g with emphasis

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Empty or non-rendering content arrays suppress both the presence mark and accessible fallback, making occupied cells indistinguishable from vacant cells.

1 open issue
1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the MatrixGrid addition.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@agorischek
agorischek merged commit d708c6a into main Dec 3, 2026
53 checks passed
@agorischek
agorischek deleted the kit-matrix-grid branch December 3, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants