react-uswds
react-uswds copied to clipboard
feat: upgrade to USWDS v3.1.0
Summary
This PR installs the new version of USWDS and follows the required steps in the migration guide.
- Gets rid of
uswdsResources.css
and moves the settings/overrides into_uswds-theme.css
(as suggested by the guide.) - Updates Sass entry point to use
@forward
syntax. - Updates paths to USWDS assets
Related Issues or PRs
Closes #2199
How To Test
Test by running yarn build
, yarn test
, and yarn run storybook
. No errors should appear.
Screenshots (optional)
Thanks, I was in the middle of writing a issue for this, you've covered all the steps I'd considered in my review.
We may want to raise a separate issue & MR for optimising the installation of USWDS in this project, or otherwise it would be nice to update the documentation to cover how users of the library can optimise their own projects. I see you've raised an issue for documentation updates here.
@jhancock532 I agree that we should have an issue for optimization updates and some place for discussion. If you already have something you were thinking about go ahead file an issue, it is very good to track this.
Update: just to link related issues in terms of scss and style optimization this was raised here https://github.com/trussworks/react-uswds/issues/192#issuecomment-1023397490 and I know that @brandonlenz spoke with a developer using the lib who was incrementally importing only the deps they needed from react-uswds to avoid pain here.
@kleinschmidtj thanks for the PR! 🌮
Minor thing but I went ahead and changed the conventional commit prefix on your PR to feat
. I think our users consider this a feature (we are moving up a major version in USWDS and consumers will all want to migrate alongside us if they haven't yet). Also chore
commits don't show up in our changelog (you can see the settings for this in package.json
, those can always be adjusted if the maintainer wants). Want to make sure this shows up. cc: @gidjin
Thanks for working on this! @kleinschmidtj do you know if there are any plans to ship a release with these changes?
(We're peckish for a react-uswds version that's uswds v3 compatible :) )