Skip to content

Conversation

@ziyiz-amzn
Copy link
Contributor

@ziyiz-amzn ziyiz-amzn commented Oct 27, 2025

Issue #:

Description of changes:
Upgrade to React 19
Upgrade testing-library/react to 16
Upgrade to Storybook 8
Upgrade Jest to 29
Replace deprecated react-popper with floating-ui/react
Rewrite the PopOver component using floating-ui/react
Replace storybook/addon-styling with storybook/addon-themes
Update supported node >= 18 and npm >= 8 versions
Update amazon-chime-sdk-js to the latest 3.29.0

Testing

  1. Have you successfully run npm run build:release locally?
    Yes.

  2. How did you test these changes?

  • Run npm test to execute the test suite.
  • Run npm start to start the Storybook server locally and verify that the pages render correctly and the links are working as expected.
  • Run the demo app with the latest React component library locally and perform a sanity test.
  • A QA regression test will be conducted on the serverless demo app.
  1. If you made changes to the component library, have you provided corresponding documentation changes?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ziyiz-amzn ziyiz-amzn requested a review from a team as a code owner October 27, 2025 18:59
},
'@storybook/addon-storysource',
'@storybook/addon-styling',
'@storybook/addon-themes',
Copy link
Contributor Author

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",
Copy link
Contributor Author

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({
Copy link
Contributor Author

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

@ziyiz-amzn ziyiz-amzn force-pushed the react-19 branch 2 times, most recently from 04d1022 to 5fc0f74 Compare October 28, 2025 17:59
}

// If current element not found in nodes, focus first node
if (nodes.length > 0) {
Copy link
Contributor Author

@ziyiz-amzn ziyiz-amzn Oct 27, 2025

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.

@xuesichao
Copy link
Contributor

How did you verify the backwards compatibility for react 17, 18 and 19?

@ziyiz-amzn
Copy link
Contributor Author

How did you verify the backwards compatibility for react 17, 18 and 19?

Built and run the meeting demo app using React 17, 18, 19 respectively, tested.

@ziyiz-amzn ziyiz-amzn merged commit 31ec1ca into main Nov 10, 2025
4 of 5 checks passed
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.

2 participants