generated from amazon-archives/__template_Apache-2.0
-
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
Merged
Merged
React 19 upgrade #1008
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4db0247
Upgrade React, Dom to 19; testing-lib to 16
ziyiz-amzn a9b857f
Update tsconfig
ziyiz-amzn e235213
Upgrade storybook 8
ziyiz-amzn 6338143
Fix unit tests
ziyiz-amzn ac7c293
Fix build
ziyiz-amzn 88c2e88
Fix lint
ziyiz-amzn b96f57a
Replace react-popper with floating-ui/react; replace storybook/addon-…
ziyiz-amzn 7e7edac
Upgrade Jest to 29
ziyiz-amzn bef5d12
Fix more unit tests; PopOver component
ziyiz-amzn 50c48e7
Fix storybook related issues
ziyiz-amzn 0e0b288
Fix PopOver component and unit tests
ziyiz-amzn 4dbb64b
Update package-lock.json
ziyiz-amzn 200e849
Update supported node and npm versions
ziyiz-amzn 623fe54
Upgrate chime js sdk to the latest
ziyiz-amzn 3e45acc
Resolve comments, update React to 19.2
ziyiz-amzn 8609784
Fix /docs/themes--page links
ziyiz-amzn 7641189
Add CHANGELOG, fix issues when running build:release
ziyiz-amzn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,26 @@ const config: StorybookConfig = { | |
| prop.parent ? !/node_modules/.test(prop.parent.fileName) : true, | ||
| }, | ||
| }, | ||
| webpackFinal: async (config) => { | ||
| config.module = config.module || {}; | ||
| config.module.rules = config.module.rules || []; | ||
|
|
||
| // Ensure TypeScript files are handled correctly | ||
| config.module.rules.push({ | ||
| test: /\.tsx?$/, | ||
| use: [ | ||
| { | ||
| loader: require.resolve('ts-loader'), | ||
| options: { | ||
| transpileOnly: true, | ||
| }, | ||
| }, | ||
| ], | ||
| exclude: /node_modules/, | ||
| }); | ||
|
|
||
| return config; | ||
| }, | ||
| stories: ['../src/**/*.@(stories.tsx|mdx)'], | ||
| addons: [ | ||
| { | ||
|
|
@@ -19,8 +39,7 @@ const config: StorybookConfig = { | |
| actions: false, | ||
| }, | ||
| }, | ||
| '@storybook/addon-storysource', | ||
| '@storybook/addon-styling', | ||
| '@storybook/addon-themes', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. replace deprecated dependency, as they do dot support React19. |
||
| '@storybook/addon-a11y', | ||
| ], | ||
| framework: { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| import { create } from '@storybook/theming'; | ||
| import { addons } from '@storybook/addons'; | ||
| import { addons } from '@storybook/manager-api'; | ||
|
|
||
| addons.setConfig({ | ||
| theme:create({ | ||
| base: 'light', | ||
| brandTitle: 'Amazon Chime SDK Components' | ||
| }) | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,37 @@ | ||
| import { ThemeProvider } from 'styled-components'; | ||
| import { withThemeFromJSXProvider } from '@storybook/addon-styling'; | ||
| import { withThemeFromJSXProvider } from '@storybook/addon-themes'; | ||
| import type { Preview } from '@storybook/react'; | ||
|
|
||
| import { GlobalStyles } from '../src/theme/GlobalStyles'; | ||
| import lightTheme from '../src/theme/light'; | ||
| import darkTheme from '../src/theme/dark'; | ||
|
|
||
| export const decorators = [ | ||
| withThemeFromJSXProvider({ | ||
| themes: { | ||
| light: lightTheme, | ||
| dark: darkTheme, | ||
| }, | ||
| defaultTheme: 'light', | ||
| Provider: ThemeProvider, | ||
| GlobalStyles: GlobalStyles, | ||
| }), | ||
| ]; | ||
|
|
||
| export const argTypes = { | ||
| tag: { table: { disable: true } }, | ||
| id: { table: { disable: true } }, | ||
| className: { table: { disable: true } }, | ||
| css: { table: { disable: true } }, | ||
| testId: { table: { disable: true } }, | ||
| viewBox: { table: { disable: true } }, | ||
| height: { table: { disable: true } }, | ||
| title: { table: { disable: true } }, | ||
| children: { table: { disable: true } }, | ||
| const preview: Preview = { | ||
| decorators: [ | ||
| withThemeFromJSXProvider({ | ||
| themes: { | ||
| light: lightTheme, | ||
| dark: darkTheme, | ||
| }, | ||
| defaultTheme: 'light', | ||
| Provider: ThemeProvider, | ||
| GlobalStyles: GlobalStyles, | ||
| }), | ||
| ], | ||
| argTypes: { | ||
| tag: { table: { disable: true } }, | ||
| id: { table: { disable: true } }, | ||
| className: { table: { disable: true } }, | ||
| css: { table: { disable: true } }, | ||
| testId: { table: { disable: true } }, | ||
| viewBox: { table: { disable: true } }, | ||
| height: { table: { disable: true } }, | ||
| title: { table: { disable: true } }, | ||
| children: { table: { disable: true } }, | ||
| }, | ||
| parameters: { | ||
| layout: 'centered', | ||
| }, | ||
| }; | ||
|
|
||
| export const parameters = { | ||
| layout: 'centered', | ||
| }; | ||
| export default preview; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.