-
Notifications
You must be signed in to change notification settings - Fork 860
React 18 upgrade #6772
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
React 18 upgrade #6772
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6772/ |
1 similar comment
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6772/ |
|
is there any timeline on this? |
|
@cee-chen I cleaned up this branch to contain mostly the major pieces that make react 18 work with our code base. It's ready to review. After we merge this one, I'll rebase the feature branch and open next PRs for the remaining work waiting on branches on my fork :) |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6772/ |
1 similar comment
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6772/ |
| ["@babel/react", { runtime: 'classic' }], | ||
| ["@babel/typescript", { isTSX: true, allExtensions: true, allowDeclareFields: true }], |
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.
This reminds me - I'm going to go ahead and merge latest main into the upstream feature branch. It's missing all the latest babel upgrades which is almost certainly going to affect yarn.lock at the very minimum
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.
alrighty, main is in - @tkajtoch please rebase/merge main into this PR/branch 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.
I'm on it!
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.
Iiin hindsight, I realize is actually A Lot of conflicts/changes, especially with the #6809 (comment). 😅
@tkajtoch, if we're going to have to do major merge conflict resolution in any case, I'd like to talk about splitting this PR significantly more (especially since it's going into a feature branch and CI does not technically have to pass). Realistically, 120+ files touched and a 1-3k line diff is way too much for a single code review.
Can we split it up like so:
- PR 1:
- Initial React 18 package upgrade
- Any related or required dependency upgrades (e.g. redux devtools)
- Types fixes only, no test fixes, nothing has to be working
- PR 2:
- Non-portal Jest test fixes
- Enyzme adapter workaround
- Jest Emotion serializer update
- PR 3:
- Portal-specific workarounds/upgrades and test fixes
- PR 4:
- Cypress test fixes
- I believe you have a few more PRs queued up after this
Having more atomic PRs will make it significantly easier for us to progress with confidence that our code is consistent and thoroughly reviewed rather than trying to wait until the end to QA it all together.
| "react-router": "^5", | ||
| "react-router-dom": "^5", |
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.
Why have these packages (and history up above on line 205) only state a major instead of clearly delineating a minor/patch? Personally, I strongly prefer to use package.json minors as a way of keeping track of when we've deliberately upgraded to latest releases, rather than having to dig through yarn.lock to figure out what we're actually on. Can we update this to be the case?
…fore env is created
71fc316 to
92d3c9f
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6772/ |
|
The work is now divided into multiple PRs to make reviewing easier. See #6827. |
Summary
This is the first PR upgrading to React 18 and bumping all dependency versions that need it in order to support React 18.
Please note that the unit and e2e tests are not 100% passing. This is expected and will be addressed in further PRs to the
feature/react-18feature branch.@cfaester/enzyme-adapter-react-18enzyme adapter for React 18QA
rm -rf node_modules && yarn)yarn startand check if the development environments starts up and is accessible in browserhttp://localhost:8030and verify the application is (more or less) working as intended - there are no hard crashes and components are behaving as they would normally doyarn buildand check if the production build is passingyarn lintto confirm there are no typing or code style issuesIgnore failing unit and e2e tests for now. They will be fixed in the following PRs to
feature/react-18.General checklist
Changelog and possible breaking changes will be listed when merging the feature branch (
feature/react-18) to main