-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Introduce the USWDS Site Alert as info banner, use the USWDS Banner as intended #1328
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -181,6 +182,7 @@ | |||
"google-polyline": "^1.0.3", | |||
"gulp-postcss": "^10.0.0", | |||
"gulp-sass": "^6.0.0", | |||
"he": "^1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is he doing? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed a way to properly decode the html string passed in the configuration for the banner, so it would be rendered as a valid html, but I'm open to other approaches or suggestions.
Closes: #1235
Demo: https://www.loom.com/share/f7c5868033054d859a0a4177722951a6?sid=42347137-07f4-46de-8f1d-25021ccf3204
Description of Changes
Banner
component withSiteAlert
but kept some of the core functionalities such as the expiration date feature and close buttonBanner
to align with its intended USWDS role i.e. showing government information at the top of every pageNotes & Questions About Changes
I'm still a little unsure whether the Banner and SiteAlert components should live within the veda-ui library or be implemented specifically within the instances. Since Banner was already part of the veda-ui, I followed the same approach for the SiteAlert.
Validation / Testing
See the configuration for the SiteAlert and the Banner here. Note: Run
yarn clean
to clear the Parcel cache if the changes you make in the config are not reflected in the UIBanner testing:
SiteAlert testing: