Repository navigation
Kit: add Chip and Chips, and rebuild ChangePills on them - #223
Open
agorischek wants to merge 3 commits into
Open
agorischek wants to merge 3 commits into
agorischek wants to merge 3 commits into
Conversation
A chip is one small item as a pill: a category dot, a monospace label, trailing content and a tone. A changed chip is painted in its hue (or only signed, inside an item already marked), struck through when removed, all fading with emphasis, and can hang a status tab whose width it always reserves. Chips is a wrapping list that can keep the tabs' room. ChangePills is now a Chips list of signed chips and gains a modified state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ChangePills aligned a sign to the label's baseline and runtime-policy chips centred it, mid-way down a label that wraps. Each piece is a label one line tall, so they now line up at the top: by the first line, like a list marker, with no extra height from mixed baselines. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The chip’s status tab ignores inherited emphasis when none is explicitly supplied, and its accessible text omits supplied status details.
2 open issues
What changed in this PR
Adds reusable Chip and Chips components to the renderer kit, building on tones from #222, and rebuilds ChangePills on these shared primitives.
Changes:
- Adds chips with change styling, tones, selection, and width-reserved status tabs.
- Adds modified (
~) support toChangePillsand migrates agentic-workflows selectors. - Updates tests, component guides, and API documentation.
| File | Description |
|---|---|
packages/renderers/kit/test/diff.test.mjs |
Updates ChangePills assertions and covers modified items. |
packages/renderers/kit/test/chip.test.mjs |
Adds Chip and Chips markup tests. |
packages/renderers/kit/styles/regions.css |
Uses chip-specific radius for tab corners. |
packages/renderers/kit/styles/diff.css |
Moves list-pill styling to chip styles. |
packages/renderers/kit/styles/chips.css |
Adds chip layout, change, and selection styles. |
packages/renderers/kit/src/react/diff-components.tsx |
Rebuilds ChangePills using chips. |
packages/renderers/kit/src/react/chip.tsx |
Implements Chip and Chips. |
packages/renderers/kit/src/react.ts |
Exports the new components. |
packages/renderers/kit/react.css |
Includes chip styles. |
packages/renderers/agentic-workflows/src/styles.css |
Migrates styling selectors to chip classes. |
packages/renderers/agentic-workflows/browser/agentic-workflows.spec.ts |
Updates browser assertions for chip markup. |
eslint-suppressions.json |
Removes an obsolete non-null assertion suppression. |
docs/reference/renderer-kit.md |
Documents chip APIs and modified pills. |
docs/guides/renderer-kit.md |
Updates ChangePills guidance. |
docs/guides/renderer-kit-components.md |
Adds chip usage and integration guidance. |
Review effort: Balanced
A chip's accessible words come from its status (Renamed and modified) when it has one, since the tab is hidden from assistive technology. A chip with no emphasis of its own now fades its status tab with the item around it, as its paint does, instead of drawing it at full strength. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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:
f7c3bcebf374cfd99603797b25026234da175fd0↑ agentic-workflows (the only ChangePills user) browser spec and renderer checks pass on chromium-desktop, webkit-desktop and chromium-mobile.
↓ Small visual change in agentic-workflows: a removed chip's label is muted as well as struck, and a wrapped chip's sign sits by its first line (before/after below).
Superego feedback item 15. Stacked on #222 (tones), which it uses.
Chip: one small item as a pill.dot, alabel(monospace identifier by default, orfont="text"), trailing content as children, and atone.change(added,removed,modified,renamed) paints the chip in its hue, and strikes and mutes a removed label. Everything fades withemphasis, or with the--emphasisof the item around it when that's left out, so endpoints read plain.signadds+/−/~. A sign, dot or count sits by the label's first line when it wraps, like a list marker.paint={false}keeps a chip neutral inside an item already marked, so colours don't nest.statushangs aStatusTabunder the chip. The chip reserves the tab's width in a zero-height row at every frame, so it's never narrower than its tab and never changes width. The tab squares the chip's own radius (--pk-chip-radius), not the card radius.idandonSelectmake it a button, either apk-partor, withunit, a ring unit of its own.Chips: a wrapping list.tabskeeps a tab's room under every line.ChangePillsis now aChipslist of signed chips and gainsmodified(~). Its list-specific CSS moved fromdiff.cssto the newchips.css. The agentic-workflows styles and spec now use thepk-chipclasses.Documented in the components guide (new Chips section), the renderer-kit guide and the agent authoring guide. Migrating runtime-policy's hand-made chips follows separately. Database tags are canvas-placed slots that crossfade renamed names, so they keep their own pill for now (details in the follow-up).
Emphasis 1, then 0 (endpoint: plain, widths unchanged):
agentic-workflows diff, before (main) and after, light and dark. The removed chips' labels are now muted, and wrapped chips' signs sit by their first line (each such chip is a pixel shorter, with no mixed-baseline growth):