Skip to content

Fix the parity snapshot of the recipes of a palette - #321

Open
bheston wants to merge 2 commits into
releases/0.xfrom
fix/parity-snapshot-palette-recipes
Open

bheston wants to merge 2 commits into
releases/0.xfrom
fix/parity-snapshot-palette-recipes

Conversation

@bheston

@bheston bheston commented Oct 18, 2026

Copy link
Copy Markdown
Member

Pull Request

Description

The parity snapshot test of the reference tokens (packages/adaptive-ui/src/reference/parity.spec.ts) gave every color recipe the neutral palette as a parameter. A palette that is given replaces the one that a recipe is configured with, so the recipes of the accent, highlight, critical, warning, success, and info palettes were snapshotted with the neutral palette: the accent fills and strokes were gray values.

Only the shared recipes (color.shared.*) and the recipes of a set (color.blackOrWhite.*) need the palette that is given. The recipes of a palette are now evaluated as they are used, with the palette they are configured with, and the snapshot is regenerated.

This is a test and snapshot change only, so the changeset is a patch of @adaptive-web/adaptive-ui, and it may never be published.

Issues

None. It was found while checking the parity of the color recipes for the 1.0 token library migration, which compares against this snapshot.

Reviewer Notes

  • The regenerated snapshot changes only the recipes of the six palettes that are not neutral (66 recipes, in the scenarios of default, blue, orange, and green, light and dark, for each layer). For example color.accent.fill.readable for the default scenario is #a94802 and was #666666.
  • The neutral, shared, and set recipes, the layers, the palettes, and the density sections of the snapshot are identical to before, which I checked by comparing the two files section by section.
  • The whole adaptive-ui suite passes (828 tests).
  • This is the first change on releases/0.x, which is the branch of the last 0.x release (0.14.0, [AWC] Release #319).

Test Plan

npm run unit-tests in packages/adaptive-ui. The parity test fails if the evaluated recipes differ from the snapshot, and the snapshot can be regenerated with npm run unit-tests:update-snapshots.

Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation for this project.

🤖 Generated with Claude Code

bheston and others added 2 commits October 18, 2026 16:07
The snapshot gave every color recipe the neutral palette as a parameter, and a palette that is given replaces the one that a recipe is
configured with, so the accent, highlight, critical, warning, success, and info recipes were snapshotted with the neutral palette
(gray values for the accent fills and strokes). Only the shared recipes and those of a set need the palette that is given. The recipes of a palette are
evaluated as they are used now, with the palette they are configured with.

The snapshot is regenerated: the 66 recipes of the six palettes that are not neutral change in the scenarios, which now have the colors of their
palettes (`color.accent.fill.readable` is `#a94802`, not `#666666`). The neutral, shared, and set recipes, the layers, the palettes, and the density are the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The fix is to the test and the snapshot only, so it is a patch of adaptive-ui.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 442de42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@adaptive-web/adaptive-ui Patch
@adaptive-web/adaptive-web-components Patch

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

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.

1 participant