Skip to content

feat(toast): S2 migration #3643

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

Merged
merged 11 commits into from
Apr 29, 2025
Merged

feat(toast): S2 migration #3643

merged 11 commits into from
Apr 29, 2025

Conversation

cdransf
Copy link
Member

@cdransf cdransf commented Mar 26, 2025

Description

CSS-619

S2 toast migration

This migrates the toast component to S2. Custom properties have been remapped per the design spec. Mods have been added and placeholder icons have been updated from the new workflow icons.

Tokens

Before After
--spectrum-corner-radius-100 --spectrum-corner-radius-800

Mods

The following mods have been added.

--mod-toast-font-family
--mod-toast-font-style
--mod-toast-icon-block-size
--mod-toast-spacing-action-button-to-close
--mod-toast-spacing-bottom-edge-to-close-button
--mod-toast-spacing-close-button-to-edge
--mod-toast-spacing-text-to-close-button
--mod-toast-spacing-top-edge-to-close-button

Passthroughs

The following passthrough has been added.

--mod-closebutton-icon-color-default

Validation steps

  1. Open the URL for the PR.
  2. Navigate to the toast component and verify no regressions have occurred.
  • Tokens should match the provided designs.
  • Visual presentation should match associated Figma doc.

Screenshots

Screenshot 2025-03-27 at 10 42 24 AM Screenshot 2025-03-27 at 10 42 21 AM

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 size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. wip This is a work in progress, don't judge. do not merge A flag for a branch indicating it should not be merged. labels Mar 26, 2025
Copy link

changeset-bot bot commented Mar 26, 2025

🦋 Changeset detected

Latest commit: 1641138

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

This PR includes changesets to release 1 package
Name Type
@spectrum-css/toast 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 Mar 26, 2025

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

Copy link
Contributor

github-actions bot commented Mar 26, 2025

File metrics

Summary

Total size: 1.38 MB*

Package Size Minified Gzipped
toast 6.55 KB 6.25 KB 1.42 KB

toast

Filename Head Minified Gzipped Compared to base
index.css 6.55 KB 6.25 KB 1.42 KB 🟢 ⬇ 1.31 KB
metadata.json 3.78 KB - - 🟢 ⬇ 0.31 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-toast-migration branch 2 times, most recently from 3a3e923 to 1027d4e Compare March 27, 2025 14:40
@cdransf cdransf self-assigned this Mar 27, 2025
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 3 times, most recently from 3942a21 to 61add5d Compare March 27, 2025 17:47
@cdransf cdransf added skip_vrt Add to a PR to skip running VRT (but still pass the action) ready-for-review and removed wip This is a work in progress, don't judge. do not merge A flag for a branch indicating it should not be merged. labels Mar 27, 2025
@cdransf cdransf marked this pull request as ready for review March 27, 2025 17:48
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 3 times, most recently from 7f16d35 to 4a670f9 Compare March 27, 2025 18:49
@cdransf cdransf changed the title chore(toast): begin carrying over old migration + correct icons feat(toast): S2 migration Mar 28, 2025
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 3 times, most recently from d6f0671 to 6c327b2 Compare April 2, 2025 15:45
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

Another old PR, resurrected! I had some comments that I couldn't find a good place to put inline:

  • I noticed this at line 81 of the CSS: color: var(--mod-toast-background-color-default, var(--spectrum-toast-background-color-default));. Should color be set to the --spectrum-toast-text-and-icon-color (which is white) instead? It's set later in the file for .spectrum-Toast-content and .spectrum-Toast-typeIcon, but I'm curious why it's set to the background color. If we set the font/icon color in .spectrum-Toast, will it cascade correctly? And then we can delete all of those repetitive color declarations for negative, -typeIcon, and content. Quickly, testing that, I think it works.

  • In the stories file, could we revisit the documentation? Specifically, I think the Action story is worded oddly. I misunderstood it a few times in a few places while reading, partially because the accepted button variant is so specific. Maybe we use something like:
    "A toast can offer up to one user action using a secondary static white button, with the outline treatment. That button's label should be kept concise, and it should only be used when there’s a direct action available that is related to the toast text."

@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 2 times, most recently from accc37b to 5514df5 Compare April 4, 2025 22:44
@cdransf cdransf requested a review from castastrophe April 17, 2025 16:28
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

I think I have more changes to request, but I didn't want to hold up the comments I did have. I'll be back to see if I can work out the calcs/max functions!

@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 3 times, most recently from 80ce997 to f31071a Compare April 18, 2025 17:16
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch from f31071a to b5a75cf Compare April 21, 2025 15:28
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

I think this is looking great! Thanks for getting back to me on the --noButton question I had.

Also- feel free to reword my WIP commits! I wouldn't want them to accidentally get merged or something with my very helpful "style wip" message 😆

@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch 2 times, most recently from 294aeb8 to 549bc5d Compare April 22, 2025 16:46
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch from 549bc5d to 288e469 Compare April 28, 2025 15:22
@cdransf cdransf force-pushed the cdransf/s2-toast-migration branch from 288e469 to 1641138 Compare April 29, 2025 00:20
@cdransf cdransf dismissed castastrophe’s stale review April 29, 2025 21:05

Closing out + merging with 2 existing reviewers.

@cdransf cdransf merged commit bfe2e2c into spectrum-two Apr 29, 2025
12 checks passed
@cdransf cdransf deleted the cdransf/s2-toast-migration branch April 29, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. 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.

4 participants