Skip to content

[WNMGDS-3185] Upgrade to React 18.3.1 #3433

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

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

Conversation

jack-ryan-nava-pbc
Copy link
Collaborator

@jack-ryan-nava-pbc jack-ryan-nava-pbc commented Feb 11, 2025

Summary

This is the feature branch that all subsequent React 18 related upgrades will build off of.
Steps:

  • upgrade React and react-dom
  • upgrade react-test-renderer
  • upgrade @Testing-library-react - WNMGDS-3182
  • upgrade Gatsby to version 5 - WNMGDS-3243
  • maybe optional: replace JSDOM - WNMGDS-3226

How to test

  1. Site builds
  2. Storybook and Doc Site can be run locally
  3. All tests pass

Checklist

  • Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
  • Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
  • Selected appropriate Impacts, multiple can be selected.
  • Selected appropriate release milestone

@jack-ryan-nava-pbc jack-ryan-nava-pbc self-assigned this Feb 11, 2025
@jack-ryan-nava-pbc jack-ryan-nava-pbc added Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Changed Indicates a change to an existing element of the DS. labels Feb 11, 2025
@jack-ryan-nava-pbc jack-ryan-nava-pbc added this to the 12.2.0 milestone Feb 12, 2025
jack-ryan-nava-pbc and others added 8 commits February 25, 2025 11:11
* Updates to latest `@testing-library/react` and removes `@testing-library/react-hooks` dep

* removes reference to outdated package in jest config

* swaps out references to `@testing-library/react-hooks` with ones to `@testing-library/react`

* fixes failing autocomplete test with a pause

* removes outdated references to test-utils in webpack config

* simplifies jest config preact settings

* replaces references to `react-dom/test-utils` with `@testing-library/react`

* replaces `react-dom/test-utils` references to `@testing-library/react` and uses jest's modern fakeTimers

* update jest config

* update `@testing-library/user-event` to latest

* updates Autocomplete unit tests based on v14 of `@testing-library/user-event`

* invoke userEvent and allow for custom settings in web component renderer

* updates Accordion Item unit tests

* refactors userEvent invoking in autocomplete

* refactors choice and choice list tests

* updates date field unit tests

* updates dialog tests

* specifically listen for the `Escape` key in addition to the keyCode because v14 of `@testing-library/user-event` only passes along `key`

* addresses drawer and dialog tests

* refactors drawer tests

* refactors dropdown tests

* refactors filter chip tests

* refactors help drawer and month picker tests

* updates skip nav and review unit tests

* tabs and idleTimeout unit test updates

* removes `sleep` helper utilities from unit tests

* updates mask unit tests

* refactors ds-tooltip unit test

* refactors Tabs unit test

* refactors p/react TextField unit tests

* removes a resolved TODO

* refactors tooltip unit tests

* refactors vertical nav unit tests

* resolves failing preact unit tests

* resolve `ds-dropdown` test

* removes eslint overrides in docs project for now

* respond to PR feedback
* upgrades packages for gatsby v5

* package updates

* [for now] removes repeatable content import from markdown files

* updates eslint

* Updates graphql query based on warning from gatsby
build tools

* creates new helper for sending view event

* upgrades to latest mdx plugin; updates queries and content renderer component

* updates packages used in docs site

* Use ES Modules format for gatsby config files

* updates MdxQuery types

* fixes missing slug

* fixes `code` and `pre` formatting

* updates markdown files (WNMGDS-3285)

https://mdxjs.com/docs/what-is-mdx/#interleaving

* prettier and interleaving inconsistencies

* fixes missing slug info
Resolves eslint errors and adjusts linting rules to allow for destructuring objects
* fixes `react-app` examples

* updates astro package dependencies;
@kim-cmsds kim-cmsds modified the milestones: 12.3.0, 13.0.0 Apr 23, 2025
kim-cmsds and others added 3 commits April 29, 2025 11:45
* Initial commit

* Remove stray console log and one line of whitespace

* Clean up Layout component

* Uninstall react helmet

* Remove react helmet reference in base package-lock

* Remove unnecessary params.

* Switch to LocationInterface

* Hardcode site origin base url in SEO to fix missing location.origin in Head context.

* Use dynamic window.location.origin in SEO

* Adds ogUrl variable
* Removes default props for `Alert` and updates docs

* Removes default props for `Autocomplete` and updates Docs

* Removes default props for `Button` and updates Docs

* Removes default props for `ChoiceList`

* Removes default props for `Drawer` and updates docs

* Removes default props for `SvgIcon`

* Updates docs for svgicon

* Removes default props for `Label` and updates docs

* Removes default props for `Pagination` and updates docs

* Removes default props for `Review` and updates docs

* Removes default props for `Spinner` and updates docs

* Removes default props for `Table` and `TableCell` and updates docs

* Removes default props for `TabPanel`

* Removes default props for `TextField` and updates docs

* Removes default props for `Tooltip` and updates docs

* Removes default props for `VerticalNav` and `VerticalNavItem` and updates docs

* Removes default props for ds-healthcare-gov `Header` and updates docs

* removes default props for `FilterDialog`

* removes default props for `InlineLinkLists`

* removes default props for ds-healthcare-gov `Logo`

* Updates docs

* Addresses jest warning for timings when running unit tests

* Updates how ds-tooltip default props work

* Fixing placement error in popper js

---------

Co-authored-by: jack-ryan-nava-pbc <[email protected]>
tamara-corbalt and others added 10 commits June 17, 2025 13:52
* Upgrade storybook packages, fix peer dependency issue with an mdx package

* Fix prop table formatting by removing HTML tags from example descriptions

* Update package lock

* Remove unnecessary storybook addon from config

* Adds snapshots
* Remove unneeded ref prop from prop tables

* Hide internal prop from external documentation

* Hide internal facing props

* Show children for accordion item props table

* Replace hide-prop with ignore directive and clean up label story

* Show children prop as required

* Update snapshots
Bump version to 2.4.0, and remove override.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Changed Indicates a change to an existing element of the DS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants