Skip to content

feat(swatch+swatchgroup): S2 migration #3677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: spectrum-two
Choose a base branch
from

Conversation

cdransf
Copy link
Member

@cdransf cdransf commented Apr 17, 2025

Description

CSS-1026 + CSS-1029

This migrates the swatch and swatchgroup components to S2. Custom properties have been remapped and added per the design specification.

An Add Swatch variant has been added with the required color tokens and the specified add UI icon.

Removed custom properties

--spectrum-swatch-border-color
--spectrum-swatch-dash-icon-color

New custom properties

--spectrum-swatch-border-color-rgb
--spectrum-swatch-border-opacity
--spectrum-corner-radius-full
--spectrum-corner-radius-none
--spectrum-swatch-disabled-icon-border-opacity
--spectrum-swatch-icon-color
--spectrum-swatch-rectangle-width-multiplier

New mods

--mod-add-button-background
--mod-add-button-background-down
--mod-add-button-background-hover
--mod-add-button-background-keyboard-focus
--mod-corner-radius-full
--mod-mixed-button-background
--mod-swatch-border-color-rgb
--mod-swatch-border-opacity

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@cdransf cdransf added wip This is a work in progress, don't judge. skip_vrt Add to a PR to skip running VRT (but still pass the action) labels Apr 17, 2025
@cdransf cdransf self-assigned this Apr 17, 2025
Copy link

changeset-bot bot commented Apr 17, 2025

🦋 Changeset detected

Latest commit: 343a87b

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

This PR includes changesets to release 2 packages
Name Type
@spectrum-css/swatchgroup Major
@spectrum-css/swatch Major

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

Copy link
Contributor

github-actions bot commented Apr 17, 2025

🚀 Deployed on https://pr-3677--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Apr 17, 2025

File metrics

Summary

Total size: 1.38 MB*
Total change (Δ): 🔴 ⬆ 0.97 KB (0.07%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Minified Gzipped Δ
swatch 12.65 KB 11.92 KB 2.10 KB 🔴 ⬆ 2.36 KB
swatchgroup 1.15 KB 1.11 KB 0.56 KB 🟢 ⬇ 0.07 KB

File change details

swatch

Filename Head Minified Gzipped Compared to base
index.css 12.65 KB 11.92 KB 2.10 KB 🔴 ⬆ 2.36 KB
metadata.json 6.83 KB - - 🔴 ⬆ 1.45 KB

swatchgroup

Filename Head Minified Gzipped Compared to base
index.css 1.15 KB 1.11 KB 0.56 KB 🟢 ⬇ 0.07 KB
metadata.json 0.51 KB - - 🔴 ⬆ 0.01 KB

tokens

Filename Head Minified Gzipped Compared to base
css/dark-vars.css 46.87 KB - - 🔴 ⬆ 0.24 KB
css/global-vars.css 76.23 KB - - -
css/index.css 250.05 KB - - 🔴 ⬆ 0.50 KB
css/large-vars.css 40.85 KB - - -
css/light-vars.css 46.86 KB - - 🔴 ⬆ 0.24 KB
css/medium-vars.css 40.98 KB - - -
json/tokens.json 388.37 KB - - -
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@cdransf cdransf force-pushed the cdransf/s2-swatch-group-migration branch from ffa2cad to 37bccbb Compare April 17, 2025 23:28
@adobe adobe deleted a comment from github-actions bot Apr 17, 2025
@cdransf cdransf force-pushed the cdransf/s2-swatch-group-migration branch 3 times, most recently from 91c31d2 to d0944eb Compare April 21, 2025 15:28
@cdransf cdransf marked this pull request as ready for review April 21, 2025 17:51
@cdransf cdransf added size-3 M ~18-30hrs; moderate effort or complexity, several work days needed. ready-for-review and removed wip This is a work in progress, don't judge. labels Apr 21, 2025
@cdransf cdransf force-pushed the cdransf/s2-swatch-group-migration branch from 9ca18cb to f3f8289 Compare April 22, 2025 13:37
@cdransf cdransf added the wip This is a work in progress, don't judge. label Apr 22, 2025
@cdransf cdransf force-pushed the cdransf/s2-swatch-group-migration branch from 59a0dc6 to 02c2cca Compare April 22, 2025 16:47
@cdransf cdransf force-pushed the cdransf/s2-swatch-group-migration branch from 02c2cca to 044c357 Compare April 22, 2025 17:23
@cdransf cdransf added size-8 XL ~18-54hrs; huge effort, high complexity, takes a whole sprint, maybe break down. and removed wip This is a work in progress, don't judge. size-3 M ~18-30hrs; moderate effort or complexity, several work days needed. labels Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review size-8 XL ~18-54hrs; huge effort, high complexity, takes a whole sprint, maybe break down. skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant