-
Notifications
You must be signed in to change notification settings - Fork 860
Upgrade to React 17 #5584
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 17 #5584
Conversation
|
Just tested this with Nevertheless this is still pretty exciting - could React 17 possibly be this easy? 💦 |
|
Spencer also came back re: Kibana's plans for React 17:
Which I would take as an implicit greenlight to upgrade ahead of Kibana itself (rather than pinning to match them). Our |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5584/ |
+ update snapshots that changed as a result
- Remove directly unused react-test-renderer dependency (it's used a sub-dependency of other dependencies, but we shouldn't have to manually keep it updated since we don't import it directly) - Fix `@emotion/react` semver - Fix unnecessary `react-is` import
|
This is ready for review. Unlike #5591, I think this is a non-breaking change since applications still on React 16.12+ should still fully work with EUI, it's just that now React 17+ is supported as well. Am I incorrect in thinking that @thompsongl @chandlerprall? Once staging is updated, I'll do a quick QA of all components and another test against local Kibana (to confirm the combined Typescript upgrade works as well). |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5584/ |
Agreed! |
chandlerprall
left a comment
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.
Changes LGTM
Yep, however the change to |
Ahh sorry that wasn't intentional, I was just trying to fix the semver. I thought 11.x wasn't valid semver, was I wrong about that? I can switch to EDIT: I was totally wrong, |
`11.x` is valid semver
|
OK, I tested (on all 4 browsers) the following utilities that might potentially be affected by the event delegation changes, and I'm fairly confident everything's working as before:
I also tested locally against Kibana with no issues - I tested Lens' datagrid as well as flyouts, everything is rendering as before. Any objections if I merge today so we have 1 breaking change release with React/Typescript/export types etc all at once? |
I'll review this afternoon 👍 |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5584/ |
thompsongl
left a comment
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.
LGTM! Thanks, Constance!
Verified that the concerns raised in #4250 are resolved (probably with the dep upgrades) and focus traps work as expected.
Also confirmed that Kibana can accept the changes as long as react-beautiful-dnd is upgraded to v13.1
|
Thanks for flagging that issue Greg! I also just tested a combobox on Kibana (still on React 16.12) and it looks like the focus behavior is still working there as well. I'll go ahead and merge, it's possible we still might run into shenanigans once we start an actual upgrade on Kibana and have to do a patch release - fingers crossed! |
Summary
closes #4800
closes #4250
This PR upgrades React 16.12 to 17.0, as well as upgrading various other React-based 3rd-party component dependencies that now also support React 17.
Thanks to React's new policy of easy upgrades, the actual impact on our components and docs is minimal (barring QA on React's 17 changelog).
QA
16.12.0. We need to test if EUI on React 17 will work with Kibana and start a conversation with them on their planned upgrade timelines.Checklist
- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Added or updated jest and cypress tests- [ ] Checked for accessibility including keyboard-only and screenreader modes