Skip to content

Conversation

@bheston
Copy link
Member

@bheston bheston commented Apr 24, 2025

Pull Request

Description

The primary goal here is to refactor color-type design tokens to support gradients.

The secondary goal was to align design token terminology around "Color" and to subsume the opacity capability that was in "Swatch".

The "Swatch" term has been around for a while and the original meaning comes from the collection of colors (swatches) in a Palette. From a token perspective this was more confusing.

Reviewer Notes

The bulk of the change is a rename from Swatch to Color. The Paint class is introduced as the parent of Color and eventually the parent of Gradient. The design token working group is missing the abstraction that both a solid color and a gradient can often be used in the same ways. This resolves that.

Test Plan

Tested in the Designer plugin and all web apps in this project.

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.

⏭ Next Steps

As mentioned, the immediate next step is to add Gradient support.

Also I will rename some of the color recipes including the file name, but that felt difficult with the changes that were already in place.

There are probably some migrations to Color which will be further generalized to Paint, but I want to revisit that when the need arises to make sure I don't over index on everything being Paint.

@bheston bheston self-assigned this Apr 24, 2025
@bheston bheston merged commit 5d183ba into main May 9, 2025
3 checks passed
@bheston bheston deleted the users/bheston/aui-swatch-to-color branch May 9, 2025 18:36
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.

3 participants