fix: severity overrides and colors - #5239
Conversation
🦋 Changeset detectedLatest commit: e7e873c The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Preview deployments for this pull request: storybook - |
There was a problem hiding this comment.
Pull request overview
Fixes CLI color generation so custom severity colors and overrides are preserved.
Changes:
- Preserves user-defined severity colors when adding defaults.
- Simplifies color-scheme generation and override merging.
- Adds a patch changeset.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/cli/src/tokens/utils.ts |
Preserves custom severity colors. |
packages/cli/src/tokens/create/generators/primitives/color-scheme.ts |
Unifies color-scale and override generation. |
.changeset/eight-carrots-find.md |
Documents the patch. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fc106c5 to
1246dfc
Compare
1246dfc to
86e321c
Compare
86e321c to
42ef7e6
Compare
42ef7e6 to
34c9e3a
Compare
34c9e3a to
51f7213
Compare
6a278a7 to
c06643a
Compare
c06643a to
f0bec71
Compare
This reverts commit e75040a.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| result.set(name, userValue ?? value); | ||
| } | ||
| return result; | ||
| return Object.fromEntries(result) as Theme['colors']; |
There was a problem hiding this comment.
Nice
There was a problem hiding this comment.
Lets cross that bridge when we get there :)
Found this bug when testing different config permutations during plugin work (and with example of how Kartverket had defined their config).
colorswere overwritten by defaults.addSeverityColorsso that severity colors are always last as this is wanted by designers in Token Studio and Figma Variables.Stack created with GitHub Stacks CLI • Give Feedback 💬