-
Notifications
You must be signed in to change notification settings - Fork 201
feat(toast): migrate to Spectrum 2 #2599
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
base: spectrum-two
Are you sure you want to change the base?
Conversation
🚀 Deployed on https://pr-2599--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.48 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailsactionbutton
actiongroup
button
buttongroup
card
checkbox
closebutton
dial
fieldlabel
logicbutton
modal
page
picker
slider
splitview
table
toast
tokens
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
7c86724
to
0a218bc
Compare
ea68444
to
73072f8
Compare
dde6c19
to
8dfa2af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good!
I saw a few things on the Figma that seem to be a little different than the specs, that will likely be questions for the design team. And I had a few suggestions for the docs and Storybook.
Figma comparison
- I noticed that the corner rounding looks more rounded than on the Figma. The token you are using is correct according to what the Figma spec says (corner-radius-800), but the rounding actually displayed on the Figma is less (10px vs 16px). It looks like either the rounding displayed on the Figma needs to be updated, or the token they have noted needs to change.
- Close button color: this says "white" on the Figma, but the migrated s2 close button as shown uses a different color (slightly transparent white, which appears to be the static white option). Does the Figma need to be updated here or are they asking for the color to differ from the Close button spec?
- Another suggestion to pass along to design, but I think the "Height" heading in the Figma should be called "Minimum height".
Docs
It'd be a good idea to update the migration guide and the PR description to specify which mods were renamed.
I also saw "Spacing (toast to edge)" at the bottom of the layout section in the Figma, set at spacing-300. I don't believe we have or need any CSS for this currently, but I'm wondering if we could/should document it for users somehow?
Storybook
These could easily be work for a followup PR, as it relates to the existing Storybook setup.
- Should "variant" be a visible control in Storybook, to be similar to other components? I was looking for it under Default, but it is currently hidden.
- I get that pesky "rendered fewer hooks..." error if I change the "Inline button label" text to blank. I have some preliminary work to try to resolve this error that may help solve this---I'm also curious about whether Storybook 8 will fix these sort of errors.
Includes new color values for Spectrum 2
BREAKING CHANGE: migrates `Action Group` to Spectrum 2, Removes some mod properties
BREAKING CHANGE: migrates Button Group to Spectrum 2 Also: * docs(buttongroup): expand chromatic coverage * refactor(buttongroup): remove extra css classes
BREAKING CHANGE: uses Spectrum 2 tokens
- @spectrum-css/preview@7.4.2-next.0 - @spectrum-css/actiongroup@5.0.0-next.0 - @spectrum-css/buttongroup@7.0.0-next.0 - @spectrum-css/tokens@14.0.0-next.0 - @spectrum-css/bundle-builder@6.3.1-next.0 - @spectrum-css/component-builder-simple@5.0.1-next.0 - @spectrum-css/component-builder@6.0.1-next.0
BREAKING CHANGE: migrates Close Button to Spectrum 2 Additionally: * test: increase chromatic coverage * fix(closebutton): pass staticColor as arg for SB display * chore(closebutton): remove themes dir * docs(closebutton): adds s2 migration notes * chore(closebutton): specify s2 tokens release for dependency --------- Co-authored-by: Patrick Fulton <pfulton@adobe.com>
* chore: migrate gray-50 to gray-25 Migrates any instance of `--spectrum-gray-50` to use `--spectrum-gray-25` as per the S2 migration guide * chore: migrate gray-75 to gray-50 Migrates usages of `--spectrum-gray-75` to use `--spectrum-gray-50` as per the s2 migration guide. * chore: migrate gray-100 to gray-75 Migrates usages of `--spectrum-gray-100` to use `--spectrum-gray-75` as per the s2 migration guide * chore: migrate gray-200 to gray-100 Migrates usages of `--spectrum-gray-200` to use `--spectrum-gray-100` as per the s2 migration guide * chore: migrate gray-300 to gray-200 Migrates usages of `--spectrum-gray-300` to use `spectrum-gray-200` as per the s2 migration guide * chore(infieldbutton): gray-300 to gray-200
* fix(commons): remove renamed mods marked for deprecation Remove mods that were renamed and previously marked for deprecation, and regenerate mods lists. This will help in reviewing the accuracy of other components' mods lists as they are being migrated to s2. * docs: migration guide notes for mod property deprecations Add notes to components affected by mod property changes in the commons basebutton. * docs(closebutton): updated docs for migration guide and icon size - Removes the "Icon size" variant options, as noted in the closebutton PR. Per Figma changelog "removed icon size as a property". - Updates migration guide with a more organized history. * fix(commons): remove another mod referencing global token Deprecates an additional mod name that was referencing a global token, and updates migration notes for all affected components.
BREAKING CHANGE: uses Spectrum 2 tokens Also: * feat(fieldlabel): medium as default and 100 sizing tokens - Use the correct "100" sized tokens for medium. - Make medium styles the default, to conform with existing pattern. .spectrum-FieldLabel--sizeM class removed as it is no longer necessary. * feat(fieldlabel): use correct font size tokens The font-size tokens used for large and extra large needed to be shifted up to match the s2 spec. * refactor(fieldlabel): remove deprecated mods Remove renamed mods marked as deprecated for S2 release. * docs(fieldlabel): spectrum 2 noted in migration notes Updates some docs and adds migration notes. Clarifies some docs around "left" and "right", and fixes duplicate ID warnings from examples code. * docs(fieldlabel): form - docs update and regenerate mods Add migration guide section to "Form", that currently lives within the Field label component. Regenerates mods to include the removal of deprecated renamed mods. * fix(fieldlabel): rename mod property referencing global token A mod custom property was referencing a global token instead of the component itself. Renames this and adds a note to the migration guide. * feat(fieldlabel): use correct sizing tokens Use correct tokens for some large and extra large custom properties, to matching with design. * style(fieldlabel): applying linter formatting adjustments Run linter fix on the fieldlabel component, which rearranges a few declarations. * docs(fieldlabel): document asterisk icon size Add documentation about asterisk UI icon sizes specified on the design. These sizes are already handled in the Storybook template, but were not really explained to the user. * feat(fieldlabel): black and white static color variants Add classes for static colors, as defined on the designs. And adds examples of these variants to the documentation. * build(fieldlabel): specify s2 tokens release for dependency Use Spectrum 2 version of tokens package in dependencies list.
cdb180d
to
27d01df
Compare
fc916f1
to
9d7f088
Compare
7e783b6
to
e3585cd
Compare
56c6806
to
793571c
Compare
dee81f5
to
ce2f3e0
Compare
3499231
to
ad861d0
Compare
7e8269c
to
4ce8d19
Compare
Description
Migration of Toast component to Spectrum 2 tokens/styles. Includes:
--mod-toast-divider-color
has been removed. There is no divider included in this version of Toast.--mod-toast-spacing-text-and-action-button-to-divider
has been renamed to--spectrum-toast-spacing-action-button-to-close-button
--mod-toast-spacing-top-edge-to-divider
has been renamed to--mod-toast-spacing-top-edge-to-close-button
--mod-toast-spacing-bottom-edge-to-divider
has been renamed to--mod-toast-spacing-bottom-edge-to-close-button
--mod-toast-spacing-close-button
has been renamed to--mod-toast-spacing-close-button-to-edge
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
To-do list