Refactor Alert partial to ViewComponent#5565
Conversation
**Why**: Consistency, for all the benefits of using ViewComponent in the first place, and to avoid further entrenching ourselves into the partial with ongoing work including alerts (e.g. vendor outages handling).
More recently added "site alert" component: https://designsystem.digital.gov/components/site-alert/
It existed previously, but yeah, I don't love it either. I don't recall off the top of my head what it's needed for, but I'll dig a bit to see if we need it or could remove it. |
So, we do still need it in some circumstances, such as the IAL2 "review" screen: I think the reason is related to the caveat mentioned in the Rails i18n documentation:
Because the translation is happening in the controller, I suppose it's not automatically marked as safe. That being said, it seems like the sort of thing we ought to opt-in to, by explicitly calling They're a bit tricky to track down, though. I tried doing some regex searches like |
We could add a wrapper around flash assignment that checks for But either way, like you said it was already there and I think the html_safe might be worth filing a followup ticket for |
|
admin merging to get around codeclimate issue |

Why: Consistency, for all the benefits of using ViewComponent in the first place, and to avoid further entrenching ourselves into the partial with ongoing work including alerts (e.g. vendor outages handling).
Easier review with whitespace hidden:
?w=1