AUI: Refactored Swatch to Color #260
Merged
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.
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
SwatchtoColor. ThePaintclass is introduced as the parent ofColorand eventually the parent ofGradient. 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
⏭ 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
Colorwhich will be further generalized toPaint, but I want to revisit that when the need arises to make sure I don't over index on everything beingPaint.