Skip to content
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

feat(ui): Upgrade to react 18.3 #83334

Merged
merged 12 commits into from
Feb 13, 2025
Merged

feat(ui): Upgrade to react 18.3 #83334

merged 12 commits into from
Feb 13, 2025

Conversation

scttcper
Copy link
Member

@scttcper scttcper commented Jan 13, 2025

To help make the upgrade to React 19 easier, we’ve published a react@18.3 release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.
We recommend upgrading to React 18.3 first to help identify any issues before upgrading to React 19.

https://react.dev/blog/2024/04/25/react-19-upgrade-guide

part of https://github.com/getsentry/frontend-tsc/issues/68

Upgrading to react 18.3 helps with the react 19 migration by displaying various warnings for features that are removed in react 19.

https://react.dev/blog/2024/04/25/react-19-upgrade-guide

part of getsentry/frontend-tsc#68
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 13, 2025
Copy link

codecov bot commented Jan 13, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8504 1 8503 3
View the top 1 failed test(s) by shortest run time
ContextPickerModal preserves path object query parameters
Stack Traces | 0.074s run time
Error: expect(jest.fn()).toHaveBeenLastCalledWith(...expected)

Expected: {"pathname": ".../org2/path/project2/", "query": {"referrer": "onboarding_task"}}

Number of calls: 0
    at Object.<anonymous> (.../app/components/contextPickerModal.spec.tsx:276:22)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link

codecov bot commented Jan 13, 2025

Bundle Report

Changes will increase total bundle size by 530 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 32.86MB 530 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: app-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/vendors-node_modules_emotion_styled_base_dist_emotion-styled-base_browser_esm_js-node_modules-0f7219.*.js -52 bytes 1.56MB -0.0%
chunks/app_actionCreators_redirectToProject_tsx-app_actionCreators_sudoModal_tsx-app_bootstrap_commo-cf589d.*.js 363 bytes 432.64kB 0.08%
chunks/vendors-node_modules_classnames_index_js-node_modules_lodash_debounce_js-node_modules_lodash_-bf5b2d.*.js 42 bytes 307.59kB 0.01%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-5dfcad.1305c7913810d94021ca.js (New) 274.67kB 274.67kB 100.0% 🚀
chunks/app_components_button_stories_tsx.*.js 166 bytes 108.4kB 0.15%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_projectDetail_index_tsx.22f7e6e0adc32dc186e4.js (New) 95.16kB 95.16kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.c28bb5aa9a8303a74661.js (New) 37.35kB 37.35kB 100.0% 🚀
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_feedback_widget_us*-726f16.46525b0b573d149c2146.js (New) 31.85kB 31.85kB 100.0% 🚀
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.b4c0c984887c051d8040.js (New) 31.14kB 31.14kB 100.0% 🚀
chunks/vendors-node_modules_moment-timezone_index_js-node_modules_query-string_index_js-node_modules-c3aedd.*.js 11 bytes 28.74kB 0.04%
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.3403fbcdede12f57a4ed.js (New) 24.18kB 24.18kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.5c3194cf46d19f6053e5.js (New) 17.19kB 17.19kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.bb6db5be4b5efe3e5a7f.js (New) 16.21kB 16.21kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.ac88cc418a18b0c2edf3.js (New) 13.36kB 13.36kB 100.0% 🚀
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.69d1a8b95acafd7808db.js (New) 12.21kB 12.21kB 100.0% 🚀
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-5dfcad.7c22153ee861e513cebd.js (Deleted) -274.67kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_projectDetail_index_tsx.665e323f38137559fe69.js (Deleted) -95.16kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_views_performance_transactionSummary-51d702.f810a94cf1a5db7f6eef.js (Deleted) -37.35kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_components_dataZoomInside_tsx-app_components_feedback_widget_us*-726f16.7071c1198ec3f026bfcf.js (Deleted) -31.85kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_eventsRequest_tsx-app_components_feedback_widget_us*kWidget_tsx--fbb1b9.d4d0f624b942b5ace9b2.js (Deleted) -31.14kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-feae7d.330c60527f5ffc2a7511.js (Deleted) -24.18kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_utils_discover_discoverQuery_tsx-app-c5fefe.cccd1bb0872474bb0ce6.js (Deleted) -17.19kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_gridEditable_sortLink_tsx-d372f4.fe8b9ff59a3e3aea7356.js (Deleted) -16.21kB 0 bytes -100.0% 🗑️
chunks/app_components_feedback_widget_us*kWidget_tsx-app_components_performance_transactionSe-f61270.7364909648a9e6d19e15.js (Deleted) -13.36kB 0 bytes -100.0% 🗑️
chunks/app_components_charts_lineChart_tsx-app_components_feedback_widget_us*kWidget_tsx-app_-26fc43.a2adb2d47e9aae3a8bcf.js (Deleted) -12.21kB 0 bytes -100.0% 🗑️

Files in chunks/app_actionCreators_redirectToProject_tsx-app_actionCreators_sudoModal_tsx-app_bootstrap_commo-cf589d.*.js:

  • ./app/utils/silence-react-unsafe-warnings.ts → Total Size: 1.95kB

# Conflicts:
#	package.json
#	yarn.lock
@getsantry
Copy link
Contributor

getsantry bot commented Feb 7, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Feb 7, 2025
@scttcper scttcper removed the Stale label Feb 7, 2025
# Conflicts:
#	package.json
#	yarn.lock
@scttcper scttcper marked this pull request as ready for review February 13, 2025 00:08
@scttcper scttcper requested a review from a team as a code owner February 13, 2025 00:08
@scttcper scttcper requested a review from a team February 13, 2025 00:08
Comment on lines +39 to +42
// TODO: Remove after either the removal of AsyncComponent or migrating the tests not to use contexts
if (
/uses the legacy contextTypes API which is no longer supported/.test(errorMessage)
) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevents one of the new warnings from failing tests for AsyncComponent

/uses the legacy contextTypes API/,
// TODO(react19): Another error from AsyncComponent.
// <ComponentName> declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.
/declares both contextTypes and contextType static properties/,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional, but the warnings are annoying if you're working on an async component

@scttcper scttcper merged commit 35306c7 into master Feb 13, 2025
42 checks passed
@scttcper scttcper deleted the scttcper/react-18.3 branch February 13, 2025 18:20
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants