Repository navigation
kit: type roles, quiet text pieces and card header slots - #282
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Code sizing remains inconsistent, role defaults override flag weights, and the role helper is unavailable from the framework-free entry point.
4 open issues
What changed in this PR
Continues the renderer-kit typography rollout with reusable text roles, quiet inline components, and structured card headers.
Changes:
- Adds eight text roles plus
Code,Slot, andTag. - Adds card header slots and applies roles to existing kit components.
- Updates markup tests, authoring guidance, and API documentation.
| File | Description |
|---|---|
| packages/renderers/text-diff/test/view.test.mjs | Updates heading markup expectations. |
| packages/renderers/runtime-policy/test/runtime-policy.test.mjs | Updates panel heading expectations. |
| packages/renderers/kit/test/layout.test.mjs | Tests text components and card slots. |
| packages/renderers/kit/test/group.test.mjs | Checks heading role classes. |
| packages/renderers/kit/test/facts.test.mjs | Checks fact label roles. |
| packages/renderers/kit/styles/type.css | Defines typography and inline component styles. |
| packages/renderers/kit/styles/layout.css | Styles card slots and fact spacing. |
| packages/renderers/kit/src/react/type.tsx | Implements roles and text components. |
| packages/renderers/kit/src/react/layout-components.tsx | Adds card slots and component roles. |
| packages/renderers/kit/src/react/facts.tsx | Applies the label role. |
| packages/renderers/kit/src/react.ts | Exports the new typography API. |
| packages/renderers/kit/base.css | Includes typography styles. |
| packages/cli/templates/SKILL.md | Recommends role-based typography. |
| docs/reference/renderer-kit.md | Documents new APIs. |
| docs/README.md | Links the typography guide. |
| docs/guides/renderer-kit-type.md | Introduces roles and quiet text pieces. |
| docs/guides/renderer-kit-components.md | Explains header slots and typography. |
| docs/agents/create-projection.md | Updates generated authoring guidance. |
| changelog.d/type-roles.md | Records user-facing additions. |
Review effort: Balanced
Text variant takes a type role (title, heading, kind, label, value, code, meta, figure) carrying size, weight, font and tone; pk-type-<role> sets one without React. EntityCard names are titles, Group bands headings and Facts labels labels. Code, Slot and Tag are quiet text pieces. EntityCard gains kind, subtitle, aside and titleFont, so a card leads with one title. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nts guide stays within its size Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
agorischek
force-pushed
the
kit-type-roles-card-header
branch
from
December 2, 2026 23:02
3cc5256 to
5879fc9
Compare
…in every form, and the roles are in the main entry Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n identifier inside it doesn't shrink again Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
75da837b6675762bebe87a605d4d0d4a3f26b8d5Text variant,Code,Slot,Tagand the card header slots; kit typecheck and lint pass.↑ Copilot's six review points are fixed: a flag tone stays semibold on a role, code is 1px smaller in every form without shrinking twice when nested, and
TypeRole/typeRoleClassare in the main entry. Computed sizes and weights were checked in Chromium.↑ Additive: plain
Textkeeps its size and weight, and a card without the new props draws as before (its name now always takes thetitlesize).↓
EntityCard's name no longer inherits a renderer's root size, so a renderer that set its root tosmgets a 14px name. The migration PR (#284) checks the built-in renderers in the browser.Steps 3 and 4 of the kit typography rollout, as one PR. Stacked on #278 (base
kit-facts-value-list); retarget tomainonce that merges.Type roles.
Text varianttakes a role that says what a piece of text is and carries its size, weight, font and tone from the theme:title,heading,kind,label,value,code,metaorfigure.pk-type-<role>(typeRoleClass) sets one without React. Kit components use them: anEntityCardname is atitle, aGroupband aheading, aFactslabel alabel. PlainText(novariant) keeps its old size and weight.Quiet text pieces.
Codeis code inside running text, in the text's own color with no fill or edge.Slotis a named blank in a template, muted code with no brackets or accent (#268's first version drew these as accent-colored code in guillemets).Tagis a categorical label with a recessed fill and no edge.Card header slots.
EntityCardtakeskind(a muted word above the name),subtitle(one muted line under it),aside(a muted fact at the end of the first line) andtitleFont="code". So a card leads with one title rather than a label followed by hand-built lines.New guide page: Renderer kit: type and values.
The same card built both ways, with this PR's kit (light and dark):