Skip to content
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

Refactor USWDS alert component into a shortcode. #4027

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Conversation

adunkman
Copy link
Member

This is a cleaner syntax for alerts — I'm working on introducing a section around TTS Consulting which uses alerts, and this syntax seems much tidier.

Changes proposed in this pull request:

  • Refactor alert component to a shortcode.
  • Adjust usages of the alert component to use the new shortcode.

security considerations

None, new shortcode runs only in build.

@adunkman adunkman requested review from a team as code owners December 10, 2024 18:47
This is a cleaner syntax for alerts.
Copy link
Member

@mgwalker mgwalker left a comment

Choose a reason for hiding this comment

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

Very nice!

very clean

I moved the low-system banners to the tops of pages because we were getting some kind of 11ty Markdown rendering bug on the GSA Pages page. It wanted to render the alert inside a list item and then it... couldn't, for some reason, so half of the alert became additional list items outside of the alert container. Rather than fight 11ty bugs, I opted to just move the alert. The top of the page makes more sense to me anyway. 🤷🏻‍♂️

@adunkman adunkman enabled auto-merge (squash) December 11, 2024 18:40
@adunkman adunkman merged commit 716fbba into main Dec 11, 2024
8 checks passed
@adunkman adunkman deleted the refactor-alerts branch December 11, 2024 18:43
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.

2 participants