-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore: migrate repo to React 19 #35434
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
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
| setStartFromX(0); | ||
| } | ||
| }, [props, prevProps]); | ||
| }, [props.width, props.height, props.chartType, props.showYAxisLables, props.yAxisType]); |
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 was causing infinite loops exposed within test run - migrated to use refs and not references for hook integrity
|
|
||
| jobs: | ||
| generate_vrt_screenshots: | ||
| if: ${{ github.repository_owner == 'microsoft' }} |
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.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Charts-DonutChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png | 27053 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 276 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 595 | Changed |
vr-tests-react-components/TagPicker 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png | 659 | Changed |
| vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png | 1321 | Changed |
| vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png | 635 | Changed |
| vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png | 678 | Changed |
vr-tests-web-components/Accordion 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Accordion. - Dark Mode.normal.chromium_1.png | 3151 | Changed |
vr-tests-web-components/Checkbox 4 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Checkbox. - Dark Mode.normal.chromium_1.png | 29 | Changed |
| vr-tests-web-components/Checkbox.Checked.normal.chromium.png | 118 | Changed |
| vr-tests-web-components/Checkbox.Circular Checked.normal.chromium.png | 90 | Changed |
| vr-tests-web-components/Checkbox.Disabled.normal.chromium.png | 39 | Changed |
vr-tests-web-components/MenuList 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/MenuList. - Dark Mode.normal.chromium.png | 500 | Changed |
| vr-tests-web-components/MenuList. - RTL.normal.chromium_1.png | 39082 | Changed |
vr-tests-web-components/Radio 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Radio. - Dark Mode.normal.chromium_1.png | 29 | Changed |
vr-tests-web-components/RadioGroup 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/RadioGroup. - Dark Mode.normal.chromium_1.png | 59 | Changed |
| vr-tests-web-components/RadioGroup.Default Checked.normal.chromium.png | 51 | Changed |
| vr-tests-web-components/RadioGroup.Disabled Item.normal.chromium.png | 27 | Changed |
vr-tests-web-components/Switch 5 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Switch. - Dark Mode.normal.chromium_1.png | 179 | Changed |
| vr-tests-web-components/Switch.Disabled Checked.hover.chromium.png | 187 | Changed |
| vr-tests-web-components/Switch.Checked.normal.chromium.png | 201 | Changed |
| vr-tests-web-components/Switch.Disabled Checked.normal.chromium.png | 165 | Changed |
| vr-tests-web-components/Switch.Disabled.normal.chromium.png | 100 | Changed |
vr-tests/Callout 7 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Callout.Right center.default.chromium.png | 2080 | Changed |
| vr-tests/Callout.Gap space 25.default.chromium.png | 2181 | Changed |
| vr-tests/Callout.Right top edge.default.chromium.png | 1116 | Changed |
| vr-tests/Callout.No callout width specified.default.chromium.png | 2126 | Changed |
| vr-tests/Callout.Rendering callout attached to a rectangle.default.chromium.png | 1832 | Changed |
| vr-tests/Callout.Top auto edge.default.chromium.png | 2196 | Changed |
| vr-tests/Callout.Top center.default.chromium.png | 2113 | Changed |
vr-tests/Keytip 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Keytip.Offset.default.chromium.png | 86 | Changed |
vr-tests/react-charting-MultiStackBarChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - RTL.default.chromium.png | 343 | Changed |
There were 15 duplicate changes discarded. Check the build logs for more information.
26a1e2e to
5b187ac
Compare
| "outDir": "dist/esm", | ||
| "importHelpers": true | ||
| "importHelpers": true, | ||
| "types": [] |
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.
locally builds were failing, after investigation the cause is that all node_modules/@types were part of compilation production assets which might provide false positives - this change fixes it and aligns with how we run tsc for prod assets in repo
| '\\.(scss)$': path.resolve(__dirname, './v8/jest-style-mock.js'), | ||
| KeyCodes: path.resolve(__dirname, './v8/jest-mock.js'), | ||
| enzyme: path.resolve(__dirname, './v8/jest-mock.js'), | ||
| // explicitly needed as R17 doesn't have this API and if not declared explicitly our integration jest config wouldn't be able to override this |
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.
same override as we use for v9. to mitigate this we would need to completely drop react-hooks and provide extra transforms for RIT pipeline so React 17 passes. not a prio atm
| ); | ||
| }); | ||
| CartesianChart.displayName = 'CartesianChart'; | ||
| CartesianChart.defaultProps = { |
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.
defaultProps no longer work in React 19 https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops
| "esModuleInterop": true, | ||
| "isolatedModules": true | ||
| "isolatedModules": true, | ||
| "skipLibCheck": 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.
incompatible SB types with React 19, need to skip
| /** | ||
| * @jest-environment node | ||
| */ | ||
| import * as React from 'react'; |
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.
decoupled SSR jest test that were causing issues within browser mocked env (react loaded incompatible modules)
21478a9 to
5c20411
Compare
…ect in CartesianChart
…pting tests and jest configuration
…String, increase timeout, and fix webpack bundling errors caused by react-monaco
…inclusion to production compilation output
5c20411 to
cd4097f
Compare


Previous Behavior
New Behavior
general:
MutableRefObjectdeprecation were muted for now / 62f1dcdcustom jsx runtime
createElementwithin tests / 72eb938storybook:
.d.tsforced using skipLibCheck for addon / 8dd92e1test(jest)
ssr
charts:
defaultPropsapi doesn't work anymore - logic was refactored to use ES6 default paramsRelated Issue(s)