Skip to content

Extract reusable USWDS Alert ViewComponent#375

Open
jgavin-nava wants to merge 4 commits intomainfrom
jgavin/OSCER-368-extract-reusable-USWDS-alert-viewComponent
Open

Extract reusable USWDS Alert ViewComponent#375
jgavin-nava wants to merge 4 commits intomainfrom
jgavin/OSCER-368-extract-reusable-USWDS-alert-viewComponent

Conversation

@jgavin-nava
Copy link
Contributor

@jgavin-nava jgavin-nava commented Mar 23, 2026

Ticket

Resolves OSCER-368

Changes

What was added, updated, or removed in this PR.

  • Extract reusable USWDS alerts across the application
  • We needed to dry up a lot of these alerts as they have been growing across the application.

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers.

  • I used the idea from the ticket and made sure to check the standard in the Strata SDK repo for this work.
  • I believe I found the necessary areas to fix

Testing

Provide evidence that the code works as expected. Explain what was done for testing and the results of the test plan. Include screenshots, GIF demos, shell commands or output to help show the changes working as expected. ProTip: you can drag and drop or paste images into this textbox.

  • Found areas that the alert component was added.
  • I believe the one for the sign in is the right alert it looks the same from the
Screenshot 2026-03-20 at 3 58 29 PM Screenshot 2026-03-20 at 4 04 20 PM

BEFORE for empty password:
Screenshot 2026-03-23 at 1 05 12 PM

AFTER:
Screenshot 2026-03-23 at 12 18 14 PM
(Same outcome)

Preview environment for reporting-app

@jgavin-nava jgavin-nava self-assigned this Mar 23, 2026
@jgavin-nava jgavin-nava requested a review from a team as a code owner March 23, 2026 14:52
@jgavin-nava jgavin-nava requested a review from giverm March 23, 2026 14:52
@jgavin-nava jgavin-nava changed the title Jgavin/oscer 368 extract reusable uswds alert view component Extract reusable USWDS Alert ViewComponent Mar 23, 2026
Copy link
Contributor

@giverm giverm left a comment

Choose a reason for hiding this comment

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

Looks good! Just one comment about the role

@@ -0,0 +1,12 @@
<%= tag.div class: alert_classes, role: (error? ? "alert" : nil), style: style do %>
Copy link
Contributor

@giverm giverm Mar 23, 2026

Choose a reason for hiding this comment

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

Some of these have "role=status", which I think we'll want to preserve for accessibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that makes sense. Right now I see most of them either have role as status or alert except for one. I am wondering if all these alerts should be either one or the other. And as stated in the ticket only type error should alert? so would just be a change to make the role one or the other. instead of preserving it on the view side of things

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TLDR: do we need more than 2 roles / expecting nil roles or can we just update the code under the comment to just be alert or status?

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.

Extract reusable USWDS Alert ViewComponent

2 participants