-
Notifications
You must be signed in to change notification settings - Fork 167
React 19 upgrade #1008
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 19 upgrade #1008
Conversation
| }, | ||
| '@storybook/addon-storysource', | ||
| '@storybook/addon-styling', | ||
| '@storybook/addon-themes', |
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.
replace deprecated dependency, as they do dot support React19.
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@popperjs/core": "^2.2.2", | ||
| "@floating-ui/react": "^0.26.28", |
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.
replace popperjs with floating-ui for PopOver component. popperjs not support React19 any more
| !!nodes && nodes[0].focus(); | ||
| } | ||
| }, [isOpen]); | ||
| const { refs, floatingStyles, context } = useFloating({ |
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.
rewrite The PopOver component using floating-ui
04d1022 to
5fc0f74
Compare
| } | ||
|
|
||
| // If current element not found in nodes, focus first node | ||
| if (nodes.length > 0) { |
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.
Previously, when popover is clicked, the document.activeElement is the button, which is in the nodes list. But after migrating to floating-ui, nodes will contain focusable elements in the floating element. When first navigate up or down, this will focus to the first element in the list.
|
How did you verify the backwards compatibility for react 17, 18 and 19? |
…styling with storybook/addon-themes
Built and run the meeting demo app using React 17, 18, 19 respectively, tested. |
Issue #:
Description of changes:
Upgrade to React 19
Upgrade
testing-library/reactto 16Upgrade to Storybook 8
Upgrade Jest to 29
Replace deprecated
react-popperwithfloating-ui/reactRewrite the PopOver component using
floating-ui/reactReplace
storybook/addon-stylingwithstorybook/addon-themesUpdate supported node >= 18 and npm >= 8 versions
Update amazon-chime-sdk-js to the latest 3.29.0
Testing
Have you successfully run
npm run build:releaselocally?Yes.
How did you test these changes?
npm startto start the Storybook server locally and verify that the pages render correctly and the links are working as expected.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.