Skip to content

Group and DataTable pass the renderer checks as the guide composes them - #318

Merged
agorischek merged 11 commits into
mainfrom
datatable-label-centring
Dec 4, 2026
Merged

agorischek merged 11 commits into
mainfrom
datatable-label-centring

Conversation

@agorischek

@agorischek agorischek commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The setup guide puts a table renderer together as ContentView > Group > DataTable. Four setup trials used that layout and failed projections check. A custom renderer scaffolded with projections init --renderer custom following the guide failed three checks:

  • Labels centred on their capitals. A code-font first column was trimmed to the UI font's capitals while drawn in the monospace font. Progress-mode change and rename pills didn't trim their text at all, and neither did the rename arrow. All of them sat about half a pixel low.
  • Rounded edges drawn over what fills their corners. The kit's own .pk-group:has(> .pk-table-frame)::after { content: none } rule removed the group's edge, which the check forbids renderer rules from doing.
  • No motion inside step holds. useTableProps gave every row the frame's progress, so each value switched at progress 0.5, during the host's hold between steps.

All three fixes are in the kit:

  • DataTable marks a code column's text itself as an identifier rather than an inner span, so the trim measures the drawn font. Progress-mode pills now hold their value in a pk-label, and ValueChange's inline arrow is a pk-label too. Cells that reserve room for the other version centre the version they show.
  • A table in a Group now makes the group's ::after edge transparent (a recolor, which the check allows) instead of removing it.
  • useTableProps looks up each row's step in the props' schedule and passes its progress through that step as rowProgress. A row that no step names shows Before until the end and After there. So the guide's one-line <DataTable {...useTableProps(props)} …/> stays still between steps.

A new kit browser spec, kit/browser/data-table.spec.ts, renders the guide's composition (code columns, a rename, a changed value, an added row and an unchanged row) in diff and progress modes. It runs the checks' labels and frames probes and expects neither to flag anything.

Before: the scaffolded renderer fails label-centring, frame-edges and hold motion.

Before: the Group and DataTable renderer failing the checks

After: every renderer check passes.

After: the same renderer passing every check

Two more kit components that failed their own checks in setup trials:

  • Tag put pk-label on its inline-flex box, and text-box trims nothing in a flex container, so a <Tag code> sat off centre. Its text is now a flex item of its own (pk-tag > pk-label), trimmed in the font it is drawn in. The kit browser spec measures a code Tag and a word Tag beside the table.
  • ValueList said a modified item with was only as "was … now", with no status word, so status-text failed on a documented use. It now says "Modified" before it, as its added and removed items say theirs.

Evidence

  • npx playwright test --project=chromium-desktop kit/browser/data-table (from the harness) passes. Without the fix it fails on the first-column cells and the pills. With only the old ::after rule restored, it fails on that rule.

  • A custom renderer scaffolded with projections init --renderer custom, rewritten to the guide's ContentView > Group > DataTable example and built against the packed SDK: npx playwright test (the renderer checks) failed those three checks before the fix and passes after.

  • node --test packages/renderers/kit/test/*.test.mjs (198 tests, including a new one that renders through useTableProps with a three-step schedule and checks that every hold draws one frame, forward and backward; it fails without the fix) (197 tests) and npm run tools -- check --fast pass.

  • Not run here: the WebKit projects, which CI runs.

  • Documentation that this change affects is updated, and generated reference
    pages are regenerated (npm run docs:generate).

  • Fixes include a regression test.

  • A changelog fragment at changelog.d/<this PR's number>.md describes what
    users will notice, or the PR has the no changelog label (see
    changelog.d/README.md).

  • No credentials, private source or machine-specific paths are included.

agorischek and others added 2 commits December 4, 2026 05:55
DataTable trims its cells', pills' and rename arrow's text to the capitals in the font it draws them in, a table in a Group recolors the group's edge away instead of removing it, and useTableProps gives each row its own step's progress. A kit browser spec holds the composition to the label-centring and frame-edges probes.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+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

Unscheduled rows fail to reach the correct After state, while stage construction introduces quadratic rendering costs and the new tests do not exercise staged progression.

3 open issues
What changed in this PR

Updates the renderer kit so the guide’s ContentView > Group > DataTable composition satisfies label, frame-edge, and step-hold checks.

Changes:

  • Aligns code-font text, change pills, and arrows on their capitals.
  • Preserves the group’s edge while making it transparent.
  • Adds per-row scheduled progress, browser coverage, and documentation.
File Description
packages/​renderers/​kit/​test/​table.test.mjs Updates pill markup expectations.
packages/​renderers/​kit/​test/​diff.test.mjs Updates arrow markup expectations.
packages/​renderers/​kit/​styles/​table.css Centres reserved values and recolors group edges.
packages/​renderers/​kit/​src/​react/​diff-components.tsx Applies label trimming to inline arrows.
packages/​renderers/​kit/​src/​react/​data-table.tsx Derives per-row progress from the schedule.
packages/​renderers/​kit/​src/​react/​data-table-row.tsx Corrects code-font and pill label markup.
packages/​renderers/​kit/​browser/​data-table.spec.ts Adds label and frame probe checks.
packages/​renderers/​kit/​browser/​data-table-page.ts Adds the composed table fixture.
docs/​guides/​renderer-kit-components.md Documents automatic per-row progress.
changelog.d/​318.md Records the renderer-kit fixes.

Review effort: Balanced

agorischek and others added 2 commits December 4, 2026 06:32
…ws After at the end

Co-authored-by: copilot-swe-agent[bot] <198982749+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

DataTable’s entity-only lookup ignores relationship step assignments, leaving additions invisible and removals visible until progress reaches 1 instead of updating at their assigned step.

1 open issue
3 resolved since last review

Review effort: Balanced

agorischek and others added 4 commits December 4, 2026 07:39
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
pk-label on an inline-flex Tag trimmed nothing; its text is now a flex item of its own. The kit browser spec measures Tags beside the DataTable. Regenerates renderer-kit.md.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+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.

🔵 Needs a closer look

Browser-specific text trimming and rounded-edge rendering still require real-host scrub/frame inspection and WebKit validation, which execution restrictions prevented.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Co-authored-by: copilot-swe-agent[bot] <198982749+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.

🔵 Needs a closer look

The animation timing and cap-height/border changes require real-host intermediate-frame inspection and cross-engine visual checks unavailable in this environment, with WebKit validation deferred to CI.

No open issues 🎉

Review effort: Balanced

@agorischek
agorischek merged commit ac75fd8 into main Dec 4, 2026
53 checks passed
@agorischek
agorischek deleted the datatable-label-centring branch December 4, 2026 10:16
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