Skip to content

Kit: add tones, quiet and flag, for domain meaning that isn't a change - #222

Open
agorischek wants to merge 3 commits into
mainfrom
agorischek/kit-tone
Open

agorischek wants to merge 3 commits into
mainfrom
agorischek/kit-tone

Conversation

@agorischek

@agorischek agorischek commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: b5a02155d44fbb33607ecca114923e68d9093f48

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Opt-in: no built-in sets a tone, so existing renderers are unchanged.
↑ Kit tests cover the attribute, Text, per-version table cells, and that tone CSS uses only neutral tokens.
↑ Static preview of Text and a diff DataTable checked in light and dark (below).
↓ No harness scenario uses a tone yet.

Superego feedback items 19 and 24: one kit tone design.

  • Tone is default | quiet | flag. quiet mutes a lesser item's text (a tool that only reads, a cost known in part). flag is a neutral accent for a domain flag that isn't a change: semibold, in the color the text already has (so a removed row's muted text stays muted).
  • Neither uses a change hue, a dashed edge or opacity, so a tone never reads as a change, and change marking (value changes, struck removed text) keeps its own colors inside a toned item. A unit test holds the tone CSS to neutral tokens.
  • Text takes tone="quiet" | "flag" (beside the existing muted and subtle). DataTable takes tone={item => …} from the version a row shows. toneAttributes(tone) sets data-projections-tone on any other HTML element or SVG text. Chips get it when they land (item 15).
  • A table cell carries each version's tone, including the reserved other version, so a column's width holds when a row's tone changes between revisions.
  • Documented in the components guide (new Tones section) and the agent authoring guide.

Text tones and a diff table with quiet (read) and flagged (privileged) rows, light and dark

A tone says how much an item asks for attention apart from its change: quiet
mutes a lesser item's text, flag sets a domain flag's text semibold in the full
foreground. Neither uses a change hue, a dash or opacity. Text and DataTable
rows take a tone; toneAttributes sets data-projections-tone on anything else.
A table cell carries each version's tone, so its reserved width holds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A flagged removed row's text stayed in the full foreground, over the removed
item's muted color. A flag is now weight only, so change marking wins.

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 opt-in renderer tone support.

No open issues 🎉

What changed in this PR

Adds opt-in tones to the renderer kit so renderers can express domain meaning separately from revision changes: quiet mutes text, while flag adds semibold emphasis.

Changes:

  • Introduces Tone, tones, and toneAttributes, with neutral CSS styling.
  • Adds tone support to Text and DataTable, preserving each version’s tone in table width reservations.
  • Adds focused tests and documents the tone API and usage.
File Description
packages/​renderers/​kit/​test/​tone.test.mjs Tests attributes, components, per-version tones, and neutral CSS.
packages/​renderers/​kit/​styles/​text.css Styles quiet and flagged text, including quiet SVG text.
packages/​renderers/​kit/​src/​tone.ts Defines tone types, values, and the attribute helper.
packages/​renderers/​kit/​src/​react/​layout-components.tsx Extends Text with quiet and flag tones.
packages/​renderers/​kit/​src/​react/​data-table.tsx Adds a per-item tone callback.
packages/​renderers/​kit/​src/​react/​data-table-row.tsx Applies tones to displayed and width-reserving cell versions.
packages/​renderers/​kit/​src/​index.ts Exports the tone API.
docs/​reference/​renderer-kit.md Updates API references for tones and component props.
docs/​guides/​renderer-kit-components.md Explains tone semantics and component usage.

Review effort: Balanced

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

This branch has not been deployed

No deployments
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