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

Upgrade to React v19 and Storybook v8 #392

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

meissadia
Copy link
Contributor

@meissadia meissadia commented Jan 21, 2025

Closes #393

Keep up-to-date with the latest major React release. For compatibility, also requires upgrading to Storybook v8.

Changes

  • Remove unused dependency: @tanstack/react-query
  • Upgrade to React v19
    • Run related migration scripts
      • npx react-codemod update-react-imports
      • npx codemod@latest react/19/migration-recipe
      • npx types-react-codemod@latest preset-19 ./
  • Upgrade to Yarn v4.6
  • Upgrade to Storybook v8
    • Run related migration scripts
    • Check for "implicit spies" (the command provided by the upgrade script seems to have had an error in it's glob pattern): npx storybook migrate find-implicit-spies --glob="./src/**/*.stories.*"
  • (eslint) Remove no-longer-compatible storybook/recommended plugin

TODO

  • Best way to verify I haven't broken/disabled/removed any critical DSR functionality?
    • We don't have E2E testing implemented here yet, so I don't think we have an automated option.
    • There seem to be snapshot tests implemented in the Github actions workflows but we have not established the baseline snapshots yet.
    • We could rely on SBL Frontend's snapshot tests to at least verify the components we have integrated there

Notes

  • DSR unit tests all pass (yarn test)
  • SBL Frontend: Functional integration is successful (e2e tests all pass)
  • SBL Frontend: Snapshot tests verify that DSR styles remain unchanged

How to test this PR

  1. Verify unit tests pass: yarn test
  2. Manually verify documentation site loads and functions: yarn start (may need to reload page to get things loaded)

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for cfpb-design-system-react ready!

Name Link
🔨 Latest commit b48568a
🔍 Latest deploy log https://app.netlify.com/sites/cfpb-design-system-react/deploys/679414b5344cb00008c5c03c
😎 Deploy Preview https://deploy-preview-392--cfpb-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@meissadia meissadia changed the title Upgrade to React 19 Upgrade to React v19 and Storybook v8 Jan 22, 2025
@meissadia meissadia force-pushed the upgrade-to-react-19 branch from 24ccdcb to fbc2314 Compare January 24, 2025 18:06
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.

[Explore] Upgrade to React v19, Storybook v8
1 participant