Skip to content

Conversation

iuliauta
Copy link
Contributor

@iuliauta iuliauta commented Sep 22, 2025

Description

This PR improves the Alert dialog component in spectrum-two theme.
The divider color should be transparent for S2 theme.

Motivation and context

Fix the regressions found after changing from the express theme to the spectrum-two theme.

Related issue(s)

SWC-1077 (original)
CCEX-230905

Screenshots (if appropriate)

Spectrum 1
Screenshot 2025-09-22 at 14 28 20

Spectrum 2
Screenshot 2025-09-22 at 14 28 50

Express
Screenshot 2025-09-22 at 14 29 10


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go alert dialog component
    2. Swich to Spectrum 2 theme.
    3. Observe that there is no divider. If you inspect the component, the divider is still there (the DOM is not altered, as the JIRA ticker requires) but its color is transparent.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Copy link

changeset-bot bot commented Sep 22, 2025

🦋 Changeset detected

Latest commit: f156687

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

This PR includes changesets to release 84 packages
Name Type
@spectrum-web-components/alert-dialog Patch
@spectrum-web-components/dialog Patch
@spectrum-web-components/contextual-help Patch
@spectrum-web-components/bundle Patch
documentation Patch
@spectrum-web-components/eslint-plugin Patch
@spectrum-web-components/accordion Patch
@spectrum-web-components/action-bar Patch
@spectrum-web-components/action-button Patch
@spectrum-web-components/action-group Patch
@spectrum-web-components/action-menu Patch
@spectrum-web-components/alert-banner Patch
@spectrum-web-components/asset Patch
@spectrum-web-components/avatar Patch
@spectrum-web-components/badge Patch
@spectrum-web-components/breadcrumbs Patch
@spectrum-web-components/button-group Patch
@spectrum-web-components/button Patch
@spectrum-web-components/card Patch
@spectrum-web-components/checkbox Patch
@spectrum-web-components/clear-button Patch
@spectrum-web-components/close-button Patch
@spectrum-web-components/coachmark Patch
@spectrum-web-components/color-area Patch
@spectrum-web-components/color-field Patch
@spectrum-web-components/color-handle Patch
@spectrum-web-components/color-loupe Patch
@spectrum-web-components/color-slider Patch
@spectrum-web-components/color-wheel Patch
@spectrum-web-components/combobox Patch
@spectrum-web-components/divider Patch
@spectrum-web-components/dropzone Patch
@spectrum-web-components/field-group Patch
@spectrum-web-components/field-label Patch
@spectrum-web-components/help-text Patch
@spectrum-web-components/icon Patch
@spectrum-web-components/icons-ui Patch
@spectrum-web-components/icons-workflow Patch
@spectrum-web-components/icons Patch
@spectrum-web-components/iconset Patch
@spectrum-web-components/illustrated-message Patch
@spectrum-web-components/infield-button Patch
@spectrum-web-components/link Patch
@spectrum-web-components/menu Patch
@spectrum-web-components/meter Patch
@spectrum-web-components/modal Patch
@spectrum-web-components/number-field Patch
@spectrum-web-components/overlay Patch
@spectrum-web-components/picker-button Patch
@spectrum-web-components/picker Patch
@spectrum-web-components/popover Patch
@spectrum-web-components/progress-bar Patch
@spectrum-web-components/progress-circle Patch
@spectrum-web-components/radio Patch
@spectrum-web-components/search Patch
@spectrum-web-components/sidenav Patch
@spectrum-web-components/slider Patch
@spectrum-web-components/split-view Patch
@spectrum-web-components/status-light Patch
@spectrum-web-components/swatch Patch
@spectrum-web-components/switch Patch
@spectrum-web-components/table Patch
@spectrum-web-components/tabs Patch
@spectrum-web-components/tags Patch
@spectrum-web-components/textfield Patch
@spectrum-web-components/thumbnail Patch
@spectrum-web-components/toast Patch
@spectrum-web-components/tooltip Patch
@spectrum-web-components/top-nav Patch
@spectrum-web-components/tray Patch
@spectrum-web-components/underlay Patch
@spectrum-web-components/custom-vars-viewer Patch
@spectrum-web-components/story-decorator Patch
@spectrum-web-components/vrt-compare Patch
@spectrum-web-components/base Patch
@spectrum-web-components/grid Patch
@spectrum-web-components/opacity-checkerboard Patch
@spectrum-web-components/reactive-controllers Patch
@spectrum-web-components/shared Patch
@spectrum-web-components/styles Patch
@spectrum-web-components/theme Patch
@spectrum-web-components/truncated Patch
example-project-rollup Patch
example-project-webpack Patch

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 Sep 22, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5747

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@iuliauta iuliauta marked this pull request as ready for review September 22, 2025 13:03
@iuliauta iuliauta requested a review from a team as a code owner September 22, 2025 13:03
Copy link
Contributor

@TarunAdobe TarunAdobe left a comment

Choose a reason for hiding this comment

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

LGTM!

@TarunAdobe TarunAdobe changed the title feat(sp-alert-dialog): Make the divider color transparent for S2 theme fix(sp-alert-dialog): Make the divider color transparent for S2 theme Sep 23, 2025
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.

Image

@marissahuysentruyt marissahuysentruyt force-pushed the iuta/improve-alrt-dialog-spectrum-two branch from 1bfbcc4 to f156687 Compare September 23, 2025 21:34
Copy link
Contributor

github-actions bot commented Sep 23, 2025

Tachometer results

Chrome

alert-dialog permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 515 kB 114.03ms - 115.36ms - faster ✔
2% - 5%
1.91ms - 5.72ms
branch 494 kB 116.73ms - 120.30ms slower ❌
2% - 5%
1.91ms - 5.72ms
-
Firefox

alert-dialog permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 515 kB 168.60ms - 173.16ms - unsure 🔍
-3% - +1%
-4.32ms - +2.44ms
branch 494 kB 169.32ms - 174.32ms unsure 🔍
-1% - +3%
-2.44ms - +4.32ms
-

@marissahuysentruyt marissahuysentruyt force-pushed the iuta/improve-alrt-dialog-spectrum-two branch from 2cb988b to f156687 Compare September 23, 2025 22:03
Comment on lines +14 to +18
.divider {
--spectrum-divider-background-color: var(--system-alert-dialog-divider-background-color);
--spectrum-divider-background-color-static-white: var(--spectrum-alert-dialog-divider-background-color-static-white);
--spectrum-divider-background-color-static-black: var(--spectrum-alert-dialog-divider-background-color-static-black);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious! Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the JIRA ticket it is mentioned to remove the divider from the alert dialog only for S2 theme, to not update the DOM, but by using background color: The changes in alert dialog highlighted show a removed separator line. This may be accomplished in theme by changing the divider's color, but should not alter the DOM or APIs.

That's why I added these 3 tokens in the overrides file (i found them when I inspected the alert dialog component from the storybook) and used 3 new bridge tokens (because I don't want to make all the dividers from all SWC components transparent in S2, only the ones from the alert dialog).
If there is other solution better than this, please let me know, this is the only one I taught of and I am very open to suggestions, I want to do it the right way!

Copy link
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

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

I am fine with this approach for now but I want to make sure that we are future proofing this solutionaing. If the ask is to remove the alert dialog from S2 we can do this via the presentation layer rather that going the CSS way. Not a blocker for now but once we merge Gen2, we need to revisit this implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants