-
Notifications
You must be signed in to change notification settings - Fork 6
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: Decouple USWDS packages from the library bundle #1337
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
package.json
Outdated
@@ -40,6 +40,10 @@ | |||
"engines": { | |||
"node": ">=18.0.0" | |||
}, | |||
"peerDependencies": { | |||
"@uswds/uswds": "^3.8.1", | |||
"@trussworks/react-uswds": "^9.0.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.
do we need react-uswds as a peer dependency?
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.
Good point. Thinking about it again, we should move @trussworks/react-uswds
to regular dependencies since we're using its components directly in our library that gets bundled by Parcel. I've updated the package.json in the instance repo as well.
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.
🙇 thanks sfor looking at it. I left a question but not a blocker
**Related Ticket:** #1317 ### Description of Changes Added USWDS theming guide documentation to help developers understand and implement custom styling configuration when using VEDA UI components with USWDS. This documents the changes implemented in #1337 and developmentseed/next-veda-ui#30. ### Notes & Questions About Changes _{Add additonal notes and outstanding questions here related to changes in this pull request}_ ### Validation / Testing _{Update with info on what can be manually validated in the Deploy Preview link for example "Validate style updates to selection modal do NOT affect cards"}_
Related Ticket / Closes: #1317
Related Next.js PR: developmentseed/next-veda-ui#30
Description of Changes
Restructured the library build for local development and library build:
devDependencies
and added USWDS as apeerDependency
Notes & Questions About Changes
Going forward, the VEDA UI library now expects consuming apps to:
_uswds-theme.scss
config fileFurthermore, we could also expose the themed variables that @AliceR and @sandrahoang686 created in a similar config file like the one for USWDS (e.g.
_veda-theme.scss
) and allow instances to customize them in a similar manner like the uswds theme. Since that's out of scope for this PR, I'll create a follow-up issue to track it.Validation / Testing
yarn dev
and check that the development environment still has full USWDS access_uswds-theme.scss
config file -> check that the change is applied, for example, to the header