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

Initial USWDS setup #53

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Initial USWDS setup #53

merged 2 commits into from
Mar 22, 2024

Conversation

echappen
Copy link
Contributor

@echappen echappen commented Mar 21, 2024

Changes proposed in this pull request:

  • Adds the USWDS package globally to the NextJS app (read the added README notes for more information)

Closes #50

Notes

  • Example of a usa-banner is on the /design-guide page. I created this page as a place for testing out web components and other design elements as they're created.
  • Ideally, we wouldn't need any static USWDS javascript assets if we convert USWDS components to React components. (For example, usa-banner could handle it's opening/closing with React state instead, which would eliminate the need to use uswds-init js.) Since this will be a gradual process, I've kept the USWDS javascript files in here as we transition to that.
  • The way USWDS SASS is set up makes using NextJS style modules mostly incompatible, since every module would need to import the USWDS theme settings along with USWDS Core. For now, I suggest we add USWDS packages gradually to the global SASS entry point (styles.scss) until we see a need to have different entry points.

Security considerations

  • Adds new npm dependencies: sass and @uswds/uswds
  • Adds USWDS assets to a public folder. Since there's nothing scary in USWDS assets, this is fine.

Copy link
Contributor

@jduss4 jduss4 left a comment

Choose a reason for hiding this comment

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

I'm so impressed, this would have taken me multiple weeks to get halfway working. Thank you for documenting the steps to update / add things so clearly, too, as I'm confident I will be relying heavily on it!

@echappen echappen requested a review from hursey013 March 22, 2024 14:26
@echappen
Copy link
Contributor Author

@hursey013 Any other comments/concerns before I merge?

@echappen echappen merged commit 3d1c3e8 into main Mar 22, 2024
3 checks passed
@echappen echappen deleted the eoc/50 branch March 22, 2024 22:03
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.

Add USWDS package to NextJS app
3 participants