Skip to content

feat(alert dialog): S2 migration#3725

Merged
cdransf merged 8 commits into
spectrum-twofrom
cdransf/s2-alert-dialog-migration
May 22, 2025
Merged

feat(alert dialog): S2 migration#3725
cdransf merged 8 commits into
spectrum-twofrom
cdransf/s2-alert-dialog-migration

Conversation

@cdransf
Copy link
Copy Markdown
Member

@cdransf cdransf commented May 12, 2025

Description

CSS-1017 + CSS-1133

This migrates the alert dialog component to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.

The icon in the dialog header has been moved from the right side to the left.

The dialog divider has been removed.

Primary button style has been updated to filled.

Multiple variants are now supported:

  • Confirmation
  • Information
  • Destructive
  • Warning (with AlertDiamond icon)
  • Error (with AlertTriangle icon)

Dialog buttons may be displayed either horizontally or vertically.

Removed custom properties

--spectrum-alert-dialog-body-font-size
--spectrum-alert-dialog-description-to-buttons
--spectrum-alert-dialog-divider-to-description
--spectrum-alert-dialog-padding
--spectrum-alert-dialog-title-size
--spectrum-alert-dialog-title-to-divider
--spectrum-alert-dialog-title-to-icon

New custom properties

--spectrum-alert-dialog-background-color
--spectrum-alert-dialog-corner-radius
--spectrum-alert-dialog-description-to-button-group
--spectrum-alert-dialog-edge-to-content
--spectrum-alert-dialog-minimum-title-to-icon
--spectrum-alert-dialog-title-to-description

Removed mods

--mod-alert-dialog-body-font-size
--mod-alert-dialog-description-to-buttons
--mod-alert-dialog-divider-to-description
--mod-alert-dialog-padding
--mod-alert-dialog-title-to-divider
--mod-alert-dialog-title-to-icon

New mods

--mod-alert-dialog-background-color
--mod-alert-dialog-corner-radius
--mod-alert-dialog-description-size
--mod-alert-dialog-description-to-button-group
--mod-alert-dialog-edge-to-content
--mod-alert-dialog-minimum-title-to-icon
--mod-alert-dialog-title-to-description

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 self-assigned this May 12, 2025
@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 May 12, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2025

🦋 Changeset detected

Latest commit: 0c646ed

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/alertdialog 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2025

File metrics

Summary

Total size: 1.41 MB*
Total change (Δ): 🟢 ⬇ 0.28 KB (-0.02%)

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 Δ
alertdialog 5.50 KB 5.25 KB 1.25 KB 🔴 ⬆ 0.41 KB

File change details

alertdialog

Filename Head Minified Gzipped Compared to base
index.css 5.50 KB 5.25 KB 1.25 KB 🔴 ⬆ 0.41 KB
metadata.json 3.40 KB - - 🔴 ⬆ 0.31 KB

tokens

Filename Head Minified Gzipped Compared to base
css/dark-vars.css 46.16 KB - - -
css/global-vars.css 78.26 KB - - -
css/index.css 252.91 KB - - 🟢 ⬇ 0.14 KB
css/large-vars.css 41.97 KB - - 🟢 ⬇ 0.07 KB
css/light-vars.css 46.16 KB - - -
css/medium-vars.css 42.10 KB - - 🟢 ⬇ 0.07 KB
json/tokens.json 396.47 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-alert-dialog-migration branch 4 times, most recently from 393e919 to 7a4d68f Compare May 14, 2025 15:23
@cdransf cdransf marked this pull request as ready for review May 14, 2025 17:10
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch from f48db01 to 178a298 Compare May 14, 2025 19:52
@cdransf cdransf added size-8 XL ~18-54hrs; huge effort, high complexity, takes a whole sprint, maybe break down. ready-for-review skip_vrt Add to a PR to skip running VRT (but still pass the action) and removed 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 May 15, 2025
Comment thread components/alertdialog/stories/alertdialog.stories.js
Comment thread components/alertdialog/stories/alertdialog.stories.js
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch from 178a298 to 2f040e0 Compare May 15, 2025 15:58
@cdransf cdransf requested a review from aramos-adobe May 15, 2025 16:23
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch 2 times, most recently from 68ce9b0 to 879e039 Compare May 16, 2025 14:41
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch 4 times, most recently from 00ef68d to 829c762 Compare May 19, 2025 19:32
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch from 829c762 to bd46f2b Compare May 19, 2025 21:15
@cdransf cdransf added the size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. label May 20, 2025
Copy link
Copy Markdown
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.

Looks great! Thanks for working on this one! I'm happy to approve once we've revisited the icon spacing in the header!

Comment thread components/alertdialog/stories/alertdialog.stories.js
Comment thread components/alertdialog/index.css
Comment thread components/alertdialog/index.css
Copy link
Copy Markdown
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.

Brilliant work! (looks like it needs a rebase, but approved!)
looks-good

@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch 2 times, most recently from 70a3ac9 to 900c87b Compare May 22, 2025 14:35
@cdransf cdransf force-pushed the cdransf/s2-alert-dialog-migration branch from 900c87b to 0c646ed Compare May 22, 2025 17:41
@cdransf cdransf merged commit f977e60 into spectrum-two May 22, 2025
12 checks passed
@cdransf cdransf deleted the cdransf/s2-alert-dialog-migration branch May 22, 2025 19:28
@aramos-adobe aramos-adobe added the S2 Spectrum 2 label Jun 18, 2025
@castastrophe castastrophe mentioned this pull request Aug 6, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review S2 Spectrum 2 size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. 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.

3 participants