Skip to content

feat(in-line-alert): S2 migration #3659

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 23 commits into from
May 1, 2025

Conversation

cdransf
Copy link
Member

@cdransf cdransf commented Apr 8, 2025

Description

CSS-710

This migrates the in-line alert component to Spectrum 2. Custom properties have been updated and added per the design specification.

Subtle and bold treatments have been added for each badge variant.

To use the subtle treatment, you will need to apply the spectrum-InLineAlert--subtle class:

<div class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--subtle">
  <div class="spectrum-InLineAlert-header">
    Info variant with subtle fill
    <svg focusable="false" aria-hidden="true" role="img" class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon " id="icon-52w58" aria-label="InfoCircle">
      <title id="InfoCircle">Info Circle</title>
      <use xlink:href="#icon-info-circle" href="#icon-info-circle"></use>
    </svg>
  </div>
  <div class="spectrum-InLineAlert-content">
    This is an alert.
  </div>
</div>

To use the bold treatment (which is reserved for high-attention alerts only), you will need to apply the spectrum-InLineAlert--bold class:

<div class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--bold">
  <div class="spectrum-InLineAlert-header">
    Info variant with bold fill
    <svg focusable="false" aria-hidden="true" role="img" class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon " id="icon-mty2x" aria-label="InfoCircle">
      <title id="InfoCircle">Info Circle</title>
      <use xlink:href="#icon-info-circle" href="#icon-info-circle"></use>
    </svg>
  </div>
  <div class="spectrum-InLineAlert-content">
    This is an alert.
  </div>
</div>

Because subtle and bold treatments draw a similar level of attention you should choose only one to use consistently within a single product.

New mods

--mod-inlinealert-border-and-icon-color-neutral
--mod-inlinealert-min-spacing-header-to-icon
--mod-inlinealert-spacing-content-link-button
--mod-inlinealert-spacing-header-content

Removed mods

--mod-inlinealert-spacing-header-content-button
--mod-inlinealert-spacing-header-to-icon

New custom properties

--spectrum-inlinealert-min-spacing-header-to-icon
--spectrum-inlinealert-spacing-content-link-button
--spectrum-inlinealert-spacing-header-content

Removed custom properties

--spectrum-inlinealert-spacing-header-content-button
--spectrum-inlinealert-spacing-header-to-icon

Validation steps

Screenshots

Screenshot 2025-04-17 at 9 04 14 AM Screenshot 2025-04-17 at 9 04 11 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. ✨

Copy link

changeset-bot bot commented Apr 8, 2025

🦋 Changeset detected

Latest commit: 178bbe3

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

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

@cdransf cdransf self-assigned this Apr 8, 2025
@cdransf cdransf added 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) labels Apr 8, 2025
@cdransf cdransf changed the base branch from main to spectrum-two April 8, 2025 16:12
Copy link
Contributor

github-actions bot commented Apr 8, 2025

File metrics

Summary

Total size: 1.38 MB*

Package Size Minified Gzipped
inlinealert 9.80 KB 9.37 KB 1.53 KB

inlinealert

Filename Head Minified Gzipped Compared to base
index.css 9.80 KB 9.37 KB 1.53 KB 🔴 ⬆ 1.68 KB
metadata.json 5.58 KB - - 🔴 ⬆ 1.29 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.

Copy link
Contributor

github-actions bot commented Apr 8, 2025

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

@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch 2 times, most recently from 6c58d44 to 5938b6a Compare April 8, 2025 19:57
@cdransf cdransf marked this pull request as ready for review April 14, 2025 16:34
@cdransf cdransf requested review from castastrophe, marissahuysentruyt and 5t3ph and removed request for castastrophe April 14, 2025 16:34
@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch 4 times, most recently from d488b5f to c3d9962 Compare April 16, 2025 20:08
Copy link
Collaborator

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

Added a few questions, loving this update

@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch from 6e044d6 to 24aa091 Compare April 16, 2025 23:56
@cdransf cdransf requested review from castastrophe and jawinn April 17, 2025 15:59
@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch from f124162 to 178bbe3 Compare April 18, 2025 16:00
@aramos-adobe
Copy link
Contributor

@cdransf In-line alert migration looks beautiful! I love the colors and the CSS is well structured. The only thing I'd probably add is the Link child component. It looks like every border variant the Link is accent-color-default, bold and subtle matches the content's type color tokens

@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch from 178bbe3 to 9444ae6 Compare April 21, 2025 15:28
@cdransf cdransf requested a review from aramos-adobe April 21, 2025 16:47
cdransf and others added 20 commits May 1, 2025 10:32
Co-authored-by: [ Cassondra ] <castastrophe@users.noreply.github.com>
@cdransf cdransf force-pushed the cdransf/s2-in-line-alert-migration branch from 0c22272 to 24725ff Compare May 1, 2025 17:32
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.

Nice work! One last update and then I'm good to approve.

Co-authored-by: Josh Winn <965114+jawinn@users.noreply.github.com>
@cdransf cdransf requested a review from jawinn May 1, 2025 18:38
@cdransf cdransf merged commit 83b2fe9 into spectrum-two May 1, 2025
12 checks passed
@cdransf cdransf deleted the cdransf/s2-in-line-alert-migration branch May 1, 2025 19:04
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