Skip to content

Update alert styling to improve contrast#439

Merged
aduth merged 2 commits intomainfrom
aduth-alert-contrast-redesign
Apr 26, 2024
Merged

Update alert styling to improve contrast#439
aduth merged 2 commits intomainfrom
aduth-alert-contrast-redesign

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Apr 25, 2024

🎫 Ticket

Implementation for LG-9877

🛠 Summary of changes

Updates alert banner styling to improve contrast and consistency with USWDS.

📜 Testing Plan

  1. Run npm start
  2. Visit http://localhost:4000/alerts/
  3. Validate changes

👀 Screenshots

Before After
before after

@aduth aduth requested a review from nickttng April 25, 2024 17:45
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to remove all of the files in this folder, but there's a few that are still currently in use:

  • alerts/success.svg (used by "Success Message" and "Badge" components)
  • alerts/error.svg (used by "Error Message" component)
  • alerts/unphishable.svg (used by "Badge" component)

I'll plan to make these changes separately.

For all except the unphishable icon, I think it's a pretty straight-forward swap to use an equivalent Icon instead.

Two caveats:

  • There's not a great equivalent design for unphishable icon. lock and lock_outline are pretty close, but they don't have the inverted circle effect that the current icon has.
  • While Success and Error Message icons are applied in styles and can be done in a backwards-compatible manner, the badge icons are embedded in the actual markup, so this could be a breaking change if downstream projects are referencing the icon assets directly.
    • For this reason, it might make sense to keep at least success.svg and unphishable.svg assets present until the next major version release

Copy link
Contributor

Choose a reason for hiding this comment

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

It makes sense to keep the success.svg and unphishable.svg until we consider the badges more thoroughly.

Copy link
Contributor

@nickttng nickttng left a comment

Choose a reason for hiding this comment

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

LGTM!

@aduth
Copy link
Contributor Author

aduth commented Apr 26, 2024

Visual regression failure is expected for the stylistic changes:

image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants