Skip to content
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

feat(toast): migrate to Spectrum 2 #2599

Draft
wants to merge 32 commits into
base: spectrum-two
Choose a base branch
from
Draft

Conversation

pfulton
Copy link
Collaborator

@pfulton pfulton commented Mar 20, 2024

Description

Migration of Toast component to Spectrum 2 tokens/styles. Includes:

  • Adjustments to how spacing is applied in the component (for example, spacing related to close button is now applied to close button or it's container)
  • Renaming of tokens mentioning "divider" since there's no divider in S2 toast
  • Mod changes:
    • --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
  • Removal of unneeded Spectrum/Express theme CSS files
  • Fixing linting errors in the Storybook template

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

  • Toast tokens match the design spec for S2
  • Check all variants in storybook:
    • Only text and close button
    • Text, action button, and close button
    • Icon, text, and close button
    • Icon, text, action button, and close button
  • Updated mods don't have typos
  • Check that LTR/RTL look right, specifically when an action button is wrapping

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. ✨

@pfulton pfulton added the skip_vrt Add to a PR to skip running VRT (but still pass the action) label Mar 20, 2024
Copy link
Contributor

github-actions bot commented Mar 20, 2024

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

Copy link
Contributor

github-actions bot commented Mar 20, 2024

File metrics

Summary

Total size: 4.48 MB*
Total change (Δ): ⬇ 27.52 KB (-0.60%)

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

Package Size Δ
actionbutton 41.24 KB ⬆ 0.28 KB
actiongroup 5.73 KB ⬇ 2.79 KB
button 83.15 KB ⬆ 0.09 KB
buttongroup 1.38 KB ⬇ 0.53 KB
card 22.88 KB ⬆ 0.35 KB
checkbox 25.10 KB ⬆ 0.17 KB
closebutton 11.79 KB ⬇ 4.35 KB
dial 11.56 KB ⬇ < 0.01 KB
fieldlabel 6.42 KB ⬇ 0.24 KB
logicbutton 9.00 KB ⬇ 0.38 KB
modal 5.23 KB ⬇ < 0.01 KB
page 0.72 KB ⬇ < 0.01 KB
picker 30.67 KB ⬇ 0.20 KB
slider 33.18 KB ⬇ 0.01 KB
splitview 11.42 KB ⬇ < 0.01 KB
table 47.17 KB ⬇ < 0.01 KB
toast 8.60 KB ⬇ 0.64 KB
tokens 200.84 KB ⬆ 1.63 KB

Details

actionbutton

File Head Base Δ
index-base.css 30.17 KB 29.90 KB ⬆ 0.28 KB (0.90%)
index-theme.css 11.65 KB 11.65 KB -
index-vars.css 41.24 KB 40.97 KB ⬆ 0.28 KB (0.66%)
index.css 41.24 KB 40.97 KB ⬆ 0.28 KB (0.66%)
metadata.json 17.55 KB 17.43 KB ⬆ 0.13 KB (0.71%)
themes/express.css 8.92 KB 8.92 KB -
themes/spectrum.css 9.11 KB 9.11 KB -

actiongroup

File Head Base Δ
index-base.css 5.73 KB 8.04 KB ⬇ 2.31 KB (-28.75%)
index-theme.css 0.59 KB 1.06 KB ⬇ 0.49 KB (-45.10%)
index-vars.css 5.73 KB 8.52 KB ⬇ 2.79 KB (-32.74%)
index.css 5.73 KB 8.52 KB ⬇ 2.79 KB (-32.74%)
metadata.json 2.61 KB 3.41 KB ⬇ 0.82 KB (-23.54%)
themes/express.css 0.59 KB 0.89 KB ⬇ 0.29 KB (-33.11%)
themes/spectrum.css 0.59 KB 0.79 KB ⬇ 0.19 KB (-24.62%)

button

File Head Base Δ
index-base.css 53.20 KB 53.11 KB ⬆ 0.09 KB (0.16%)
index-theme.css 30.53 KB 30.53 KB -
index-vars.css 83.15 KB 83.06 KB ⬆ 0.09 KB (0.10%)
index.css 83.15 KB 83.06 KB ⬆ 0.09 KB (0.10%)
metadata.json 33.77 KB 33.56 KB ⬆ 0.22 KB (0.65%)
themes/express.css 29.33 KB 29.33 KB -
themes/spectrum.css 29.40 KB 29.40 KB -

buttongroup

File Head Base Δ
index-base.css 1.38 KB 1.90 KB ⬇ 0.53 KB (-27.32%)
index-vars.css 1.38 KB 1.90 KB ⬇ 0.53 KB (-27.32%)
index.css 1.38 KB 1.90 KB ⬇ 0.53 KB (-27.32%)
metadata.json 0.53 KB 0.64 KB ⬇ 0.11 KB (-16.98%)

card

File Head Base Δ
index-base.css 22.88 KB 22.53 KB ⬆ 0.35 KB (1.53%)
index-vars.css 22.88 KB 22.53 KB ⬆ 0.35 KB (1.53%)
index.css 22.88 KB 22.53 KB ⬆ 0.35 KB (1.53%)
metadata.json 9.71 KB 9.50 KB ⬆ 0.21 KB (2.21%)

checkbox

File Head Base Δ
index-base.css 24.48 KB 24.32 KB ⬆ 0.17 KB (0.67%)
index-theme.css 1.20 KB 1.20 KB -
index-vars.css 25.10 KB 24.94 KB ⬆ 0.17 KB (0.65%)
index.css 25.10 KB 24.94 KB ⬆ 0.17 KB (0.65%)
metadata.json 13.50 KB 13.16 KB ⬆ 0.36 KB (2.66%)
themes/express.css 0.92 KB 0.92 KB -
themes/spectrum.css 0.91 KB 0.91 KB -

closebutton

File Head Base Δ
index-base.css 11.46 KB 15.50 KB ⬇ 4.03 KB (-26.01%)
index-theme.css 0.93 KB 1.22 KB ⬇ 0.33 KB (-26.00%)
index-vars.css 11.79 KB 16.14 KB ⬇ 4.35 KB (-26.95%)
index.css 11.79 KB 16.14 KB ⬇ 4.35 KB (-26.95%)
metadata.json 4.99 KB 8.09 KB ⬇ 3.10 KB (-38.32%)
themes/express.css 0.93 KB 0.93 KB -
themes/spectrum.css 0.92 KB 0.92 KB -

dial

File Head Base Δ
index-base.css 11.56 KB 11.56 KB ⬇ < 0.01 KB (-0.01%)
index-vars.css 11.56 KB 11.56 KB ⬇ < 0.01 KB (-0.01%)
index.css 11.56 KB 11.56 KB ⬇ < 0.01 KB (-0.01%)
metadata.json 4.85 KB 4.85 KB ⬇ < 0.01 KB (-0.02%)

fieldlabel

File Head Base Δ
index-base.css 6.42 KB 6.65 KB ⬇ 0.24 KB (-3.48%)
index-vars.css 6.42 KB 6.65 KB ⬇ 0.24 KB (-3.48%)
index.css 6.42 KB 6.65 KB ⬇ 0.24 KB (-3.48%)
metadata.json 3.59 KB 3.41 KB ⬆ 0.18 KB (5.27%)

logicbutton

File Head Base Δ
index-base.css 9.00 KB 9.37 KB ⬇ 0.38 KB (-3.91%)
index-vars.css 9.00 KB 9.37 KB ⬇ 0.38 KB (-3.91%)
index.css 9.00 KB 9.37 KB ⬇ 0.38 KB (-3.91%)
metadata.json 4.10 KB 4.23 KB ⬇ 0.13 KB (-3.09%)

modal

File Head Base Δ
index-base.css 5.23 KB 5.23 KB ⬇ < 0.01 KB (-0.02%)
index-vars.css 5.23 KB 5.23 KB ⬇ < 0.01 KB (-0.02%)
index.css 5.23 KB 5.23 KB ⬇ < 0.01 KB (-0.02%)
metadata.json 1.82 KB 1.82 KB ⬇ < 0.01 KB (-0.05%)

page

File Head Base Δ
index-base.css 0.72 KB 0.72 KB ⬇ < 0.01 KB (-0.14%)
index-vars.css 0.72 KB 0.72 KB ⬇ < 0.01 KB (-0.14%)
index.css 0.72 KB 0.72 KB ⬇ < 0.01 KB (-0.14%)
metadata.json 0.15 KB 0.15 KB ⬇ < 0.01 KB (-0.68%)

picker

File Head Base Δ
index-base.css 28.78 KB 28.98 KB ⬇ 0.20 KB (-0.68%)
index-theme.css 2.46 KB 2.46 KB -
index-vars.css 30.67 KB 30.87 KB ⬇ 0.20 KB (-0.64%)
index.css 30.67 KB 30.87 KB ⬇ 0.20 KB (-0.64%)
metadata.json 14.55 KB 14.65 KB ⬇ 0.10 KB (-0.67%)
themes/express.css 1.47 KB 1.47 KB -
themes/spectrum.css 1.57 KB 1.57 KB -

slider

File Head Base Δ
index-base.css 30.87 KB 30.87 KB ⬇ < 0.01 KB (-0.01%)
index-theme.css 2.89 KB 2.89 KB ⬇ < 0.01 KB (-0.10%)
index-vars.css 33.18 KB 33.18 KB ⬇ 0.01 KB (-0.01%)
index.css 33.18 KB 33.18 KB ⬇ 0.01 KB (-0.01%)
metadata.json 13.70 KB 13.70 KB ⬇ < 0.01 KB (-0.01%)
themes/express.css 1.75 KB 1.75 KB -
themes/spectrum.css 1.72 KB 1.72 KB ⬇ < 0.01 KB (-0.17%)

splitview

File Head Base Δ
index-base.css 11.42 KB 11.42 KB ⬇ < 0.01 KB (-0.01%)
index-vars.css 11.42 KB 11.42 KB ⬇ < 0.01 KB (-0.01%)
index.css 11.42 KB 11.42 KB ⬇ < 0.01 KB (-0.01%)
metadata.json 4.58 KB 4.59 KB ⬇ < 0.01 KB (-0.02%)

table

File Head Base Δ
index-base.css 47.17 KB 47.17 KB ⬇ < 0.01 KB (-0.00%)
index-vars.css 47.17 KB 47.17 KB ⬇ < 0.01 KB (-0.00%)
index.css 47.17 KB 47.17 KB ⬇ < 0.01 KB (-0.00%)
metadata.json 21.85 KB 21.85 KB ⬇ < 0.01 KB (-0.00%)

toast

File Head Base Δ
index-base.css 8.60 KB 8.98 KB ⬇ 0.39 KB (-4.25%)
index-vars.css 8.60 KB 9.22 KB ⬇ 0.64 KB (-6.76%)
index.css 8.60 KB 9.22 KB ⬇ 0.64 KB (-6.76%)
metadata.json 4.30 KB 4.45 KB ⬇ 0.15 KB (-3.34%)
index-theme.css - 0.84 KB 🚨 deleted, moved, or renamed
themes/express.css - 0.72 KB 🚨 deleted, moved, or renamed
themes/spectrum.css - 0.72 KB 🚨 deleted, moved, or renamed

tokens

File Head Base Δ
css/dark-vars.css 36.07 KB 24.57 KB ⬆ 11.50 KB (46.80%)
css/express/custom-dark-vars.css 0.59 KB 0.59 KB -
css/express/custom-darkest-vars.css 0.59 KB 0.59 KB -
css/express/custom-large-vars.css 0.50 KB 0.50 KB -
css/express/custom-light-vars.css 0.63 KB 0.63 KB -
css/express/custom-medium-vars.css 0.48 KB 0.48 KB -
css/express/custom-vars.css 0.04 KB 0.04 KB -
css/global-vars.css 49.64 KB 38.23 KB ⬆ 11.41 KB (29.85%)
css/large-vars.css 27.44 KB 24.40 KB ⬆ 3.04 KB (12.45%)
css/light-vars.css 36.07 KB 24.55 KB ⬆ 11.52 KB (46.91%)
css/medium-vars.css 27.36 KB 24.33 KB ⬆ 3.03 KB (12.46%)
css/spectrum/custom-dark-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-darkest-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-large-vars.css 4.68 KB 4.68 KB -
css/spectrum/custom-light-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-medium-vars.css 4.92 KB 4.92 KB -
css/spectrum/custom-vars.css 2.18 KB 2.04 KB ⬆ 0.15 KB (7.00%)
index.css 200.84 KB 199.21 KB ⬆ 1.63 KB (0.82%)
css/darkest-vars.css - 24.53 KB 🚨 deleted, moved, or renamed
css/express/global-vars.css - 2.39 KB 🚨 deleted, moved, or renamed
css/express/large-vars.css - 2.52 KB 🚨 deleted, moved, or renamed
css/express/medium-vars.css - 2.51 KB 🚨 deleted, moved, or renamed
css/spectrum/global-vars.css - 2.74 KB 🚨 deleted, moved, or renamed
css/spectrum/large-vars.css - 2.32 KB 🚨 deleted, moved, or renamed
css/spectrum/medium-vars.css - 2.32 KB 🚨 deleted, moved, or renamed
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Collaborator

@jawinn jawinn left a 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.

components/toast/index.css Outdated Show resolved Hide resolved
pfulton and others added 16 commits April 1, 2024 16:59
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.
jenndiaz and others added 2 commits April 1, 2024 16:59
…2559)

* feat(cornerrounding): documentation, custom tokens

- feat(cornerrounding): add custom token
- chore(cornerrounding): adds dist
- docs(cornerrounding): add file strucutre for foundations
- feat(cornerrounding): override token value
  - Sets custom var to override token spectrum-corner-radius-full
- chore(cornerrounding): add override to dist
  - Adds custom var to override token value to dist
- chore(cornerrounding): adjust file structure
  - Also renames file
- feat(cornerrounding): add Foundations story for corner-rounding
- feat(cornerrounding): add action buttons and checkboxes
  - Adds action buttons and checkboxes stories to demonstrate corner rounding
- docs(cornerrounding): update corner-rounding docs
  - better utilize storybook features
  - clean up checkbox and action button stories
  - hide stories in corner-rounding directory
  - improve table styling and css token use
  - improve corner rounding documentation
  - add tables for component size tokens
- fix(cornerrounding): remove mdx for tables
- fix(cornerrounding): use sentence case
- feat(cornerrounding): use custom token on close button
- docs: add alias note
- docs: remove reference to non-alias tokens
- feat(actionbutton): partial migration for corner rounding only
- feat(checkbox): partial migration for corner rounding only
- chore(closebutton): update custom var post-refactor
- fix: token rebase issue
- chore(actionbutton,checkbox): update package version
- chore: use corner-radius alias token
- chore: update tokens version
- chore: revert unneeded component version change
- docs: design requested updates, show token with example
- docs: move tables to stories, inline spacing for tables

* fix: includes error

---------

Co-authored-by: Melissa Thompson <mthompson@heysparkbox.com>
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Making sure all the spacing details for all the variants were just right must have taken a lot, and they almost all looked perfect as far as I could tell! ✨

I have a short list of questions/callouts that don't necessarily pertain to particular file changes made here:

  • Josh mentioned that leaving the button text blank causes and error and doesn't remove the button, and I noticed the same. However, this isn't a change from the previous version.
  • Josh also mentioned toast to edge spacing (from the outside of toast), I'm very curious about how this is generally handled or how we might handle this kind of thing.
  • The icon to text spacing - this didn't seem to quite match the design, but are we waiting for the icons before it gets adjusted?
  • I noticed when inspecting things in Storybook that for .spectrum-Toast, and also the &--negative, &--info, and &--positive variants all have a line below the background-color declaration that sets the color property to the same color as the background color, for instance:
  background-color: var(--highcontrast-toast-background-color-default, var(--mod-toast-background-color-default, var(--spectrum-toast-background-color-default)));
  color: var(--highcontrast-toast-background-color-default, var(--mod-toast-background-color-default, var(--spectrum-toast-background-color-default)));

This was here before but I was wondering if there was a particular reason to set the color and background-color to the same token before overriding with the text/icon colors we want? Maybe it has something to do with :focus-visible that wasn't clear to me?

}

.spectrum-Toast-buttons {
padding-inline-start: var(--mod-toast-spacing-action-button-to-close-button, var(--spectrum-toast-spacing-action-button-to-close-button));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I think the spacing between the text and the close button is off for this vertical variant. If the button is below the text, the space between the text and the close button should be the same as it would be if there was no button, that is, spacing-300. Unless I missed something, this is getting spacing-200 (12px padding) because the selector knows there's a button present.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great callout! TLDR; design has approved spacing-200 in this case.

Some context: Patrick and I chatted with design about this and agreed with them that the spacing will always be spacing-200 when an action button is used in Toast. This is because we can't tell using CSS and flexbox when the action button wraps to the next line, so there's not a good way (in CSS) to have spacing-300 in this case and spacing-200 if the button isn't wrapped.

castastrophe and others added 2 commits April 2, 2024 11:01
BREAKING CHANGE: migrates Toast to use Spectrum2 tokens and values
@mdt2
Copy link
Collaborator

mdt2 commented Apr 2, 2024

Thanks for the reviews!

In response to @jawinn's feedback:

  • Figma comparison: I'll ask about these differences when I send this to design review, thanks for the callouts
  • Docs: Will update these 👍
  • Storybook: I'll work on getting the controls to align more with other components. For the render hooks, since this is an existing issue I'd prefer to punt this to a separate card/PR

In response to @rise-erpelding's feedback:

  • Re: toast to edge spacing (from the outside of toast): We don't have much of a convention around this. It's come up as something that users would be interested in (for example, including space in a component to include the space needed for a focus state), and I think we have a card in the backlog to explore it more.
  • Icon to text spacing: I'm seeing in the design that this should be text-to-visual-300, and that's what I've defined on this token which is already used in the code. Are you referring to a different token maybe? Once I get the S2 icons for this, I'll definitely be going in to double check that all icon-related spacing is aligned with Figma, this is a good callout.
  • Background-color and color: I can't see a reason to set color here 🤔 This might be a leftover thing from a previous migration. I'll look into removing it.

@jawinn
Copy link
Collaborator

jawinn commented Apr 3, 2024

Those updates look good to address my suggestions for the docs and Storybook. One small thing; I noticed that the variant control was not set on the "Default" story, since Storybook defaults to undefined. Could you set the default for that control under args:?

@castastrophe castastrophe force-pushed the spectrum-two branch 3 times, most recently from 4d9e185 to a81c712 Compare April 11, 2024 18:33
@pfulton pfulton force-pushed the spectrum-two branch 2 times, most recently from e03868f to b3b3aa5 Compare April 15, 2024 19:32
@pfulton pfulton force-pushed the spectrum-two branch 2 times, most recently from f3dd9ff to 9931a8e Compare April 19, 2024 18:22
@castastrophe castastrophe force-pushed the spectrum-two branch 5 times, most recently from 6dbc850 to ae7aedd Compare April 26, 2024 20:37
@pfulton pfulton force-pushed the spectrum-two branch 2 times, most recently from e0e0fd2 to 698e904 Compare May 3, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

6 participants