-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
base: master
Are you sure you want to change the base?
Conversation
packages/react/etc/react.api.md
Outdated
|
|
||
| // @public | ||
| export const getFontIcon: (iconName: string, className?: string, ariaLabel?: string) => React_2.ReactNode; | ||
| export const getFontIcon: (iconName: string, className?: string, ariaLabel?: string) => React_2.ReactNode | Promise<React_2.ReactNode>; |
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.
hmm this might fail on R17 as there is no async support. this is coming from new React.FC which in r19 now returns Node | Promise<Node>
📊 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/Avatar Converged 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Avatar Converged.badgeMask - RTL.normal.chromium.png | 6 | Changed |
vr-tests-react-components/Charts-DonutChart 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png | 12635 | Changed |
| vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png | 30793 | Changed |
| 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 | 904 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 733 | Changed |
vr-tests-react-components/TagPicker 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| 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-web-components/Avatar 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Avatar. - Dark Mode.normal.chromium.png | 10381 | Changed |
| vr-tests-web-components/Avatar. - Dark Mode.normal.chromium_1.png | 298 | Changed |
vr-tests-web-components/Checkbox 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/Checkbox. - Dark Mode.normal.chromium_1.png | 3 | 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.2nd selected.chromium.png | 17 | Changed |
vr-tests-web-components/RadioGroup 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-web-components/RadioGroup. - Dark Mode.normal.chromium_1.png | 59 | Changed |
vr-tests/Callout 11 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Callout.Beak 25.default.chromium.png | 2185 | Changed |
| vr-tests/Callout.Bottom center.default.chromium.png | 2116 | Changed |
| vr-tests/Callout.Bottom right edge - RTL.default.chromium.png | 1114 | Changed |
| vr-tests/Callout.Bottom right edge.default.chromium.png | 1120 | Changed |
| vr-tests/Callout.Left top edge.default.chromium.png | 2168 | Changed |
| vr-tests/Callout.Left bottom edge.default.chromium.png | 3123 | Changed |
| vr-tests/Callout.Gap space 25.default.chromium.png | 2181 | Changed |
| vr-tests/Callout.Left center.default.chromium.png | 2544 | Changed |
| vr-tests/Callout.No beak.default.chromium.png | 2177 | Changed |
| vr-tests/Callout.Right bottom edge.default.chromium.png | 3037 | Changed |
| vr-tests/Callout.Right center.default.chromium.png | 2080 | Changed |
vr-tests/Coachmark 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Coachmark.Collapsed.default.chromium.png | 159 | Changed |
vr-tests/Keytip 3 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/Keytip.Disabled.default.chromium.png | 24 | Changed |
| vr-tests/Keytip.Offset.default.chromium.png | 86 | Changed |
| vr-tests/Keytip.Root.default.chromium.png | 51 | Changed |
vr-tests/react-charting-AreaChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-AreaChart.Custom Accessibility.default.chromium.png | 11 | Changed |
vr-tests/react-charting-LineChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests/react-charting-LineChart.Events.default.chromium.png | 1 | Changed |
There were 2 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)
…18 async renderer
…inclusion to production compilation output
21478a9 to
5c20411
Compare
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.
![]()


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)