Skip to content

React 19 upgrade #5552

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

Merged
merged 20 commits into from
May 25, 2025
Merged

React 19 upgrade #5552

merged 20 commits into from
May 25, 2025

Conversation

vietanhtran16
Copy link
Contributor

@vietanhtran16 vietanhtran16 commented Mar 3, 2025

Important: Request PR reviews on Slack

Please reach out to the design system team on Slack in #prod_design_system for PR reviews. GitHub notifications (e.g. from tagging a person) are not actively monitored.

Why

To prepare for our Nextjs 15 and React 19 upgrade, I created this PR to test it out. My findings has been documented here

What

  • Upgrade to react and react-dom 19 for devDependencies
  • Allow react 19 and react dom 19 as peer dependencies
  • Released as canary and tested in conversations-ui

@vietanhtran16 vietanhtran16 requested a review from a team as a code owner March 3, 2025 02:43
Copy link

changeset-bot bot commented Mar 3, 2025

🦋 Changeset detected

Latest commit: 19acc98

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@kaizen/design-tokens Minor
@kaizen/components Minor
@kaizen/tailwind Minor
@docs/storybook Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 3, 2025

✨ Here is your branch preview! ✨

Last updated for commit 19acc98: chore(changeset): Consolidate changeset

@vietanhtran16 vietanhtran16 changed the title Viet: Spike react 19 upgrade for next 15 Support React 19 for Next 15 and React 19 upgrade in consumer apps Mar 5, 2025
@vietanhtran16
Copy link
Contributor Author

A bunch of tests are failing. I reckon it might be because of mismatch react version from possibly storybook? I also noticed react and react dom as dependency in the root package.json - are they needed there?

@ryanseddon ryanseddon force-pushed the viet/react-19-peer-deps branch 3 times, most recently from 7dd6d47 to 7a6805f Compare April 15, 2025 05:58
@ryanseddon ryanseddon self-assigned this Apr 28, 2025
@ryanseddon ryanseddon force-pushed the viet/react-19-peer-deps branch 3 times, most recently from a31c6ed to 5e409ed Compare May 14, 2025 04:10
@@ -43,6 +43,7 @@ $cell-border-radius: 3px;
justify-content: space-between;
width: 100%;
color: $color-purple-800;
top: -0.25rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is needed as the original rdp nav would actually jump out of its containing block.

v8 on the left and this branch on the right, this fixes that. Due to how the markup has changed the cleanest way was to pull the nav outside of it's containing block again.

Screenshot 2025-05-14 at 3 43 06 pm

Copy link
Contributor

@mcwinter07 mcwinter07 left a comment

Choose a reason for hiding this comment

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

Changes look good but given how much the deps update for react day picker impact the behavior of FilterDateRangePicker and DateRangePicker, can we update or add another changeset with a patch to call out this update out specifically. It'll help if we ever need to refer to the changelog cc: @ryanseddon

@ryanseddon ryanseddon changed the title Support React 19 for Next 15 and React 19 upgrade in consumer apps React 19 upgrade May 16, 2025
@ryanseddon
Copy link
Contributor

ryanseddon commented May 16, 2025

@mcwinter07 absolutely was planning to get everything settled and then do a proper changeset
Done in 00d0ef4

vietanhtran16 and others added 11 commits May 23, 2025 13:51
* chore: Ignore peerDep warnings for older packages

Target specific packages so as not to ignore valid warnings we can
ignore

* chore: add react popper

* chore: add popper core

* chore: add changeset and order packages
* fix: remove root-level React dependencies

* Add react as a peerDep and don't rely on root

* Add a devDep too to match other packages
* feat(components): upgrade react-day-picker from 8.10.1 to 9.6.7

Update react-day-picker to version 9.6.7 and update all dependent
components to work with the new API. Changes include:

- Refactor component props to use the updated type definitions
- Update component rendering to match the new API requirements
- Modify CSS modules to accommodate new class naming conventions
- Adjust navigation components to use the new Chevron component API
- Add new styles for proper range highlighting and hidden elements

* update test to target button correctly

* fix linting problems

* Failing tests

* fix(Calendar): replace ClassNames type casting with explicit PropsBase typing

* Fix classnames

* Fix css changes and first child not working in v9 dom
* fix: use ts-patch before building components

* chore: changeset
* fix: remove root-level React dependencies

* Add react as a peerDep and don't rely on root

* Add a devDep too to match other packages
ckychris and others added 9 commits May 23, 2025 13:51
* fix: use ts-patch before building components

* chore: changeset
* fix: remove root-level React dependencies

* Add react as a peerDep and don't rely on root

* Add a devDep too to match other packages
* fix: use ts-patch before building components

* chore: changeset
* fix: use ts-patch before building components

* chore: changeset
- Add top spacing (-0.25rem) to navigation elements in all Calendar
variants
- Fix styling for today's date and disabled days
- Update test selectors to properly target day buttons within grid cells
@ryanseddon ryanseddon force-pushed the viet/react-19-peer-deps branch from 00d0ef4 to 19acc98 Compare May 23, 2025 03:52
@ryanseddon ryanseddon merged commit fd29d3d into main May 25, 2025
18 checks passed
@ryanseddon ryanseddon deleted the viet/react-19-peer-deps branch May 25, 2025 23:14
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.

5 participants