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

chore: upgrade react to 17.0.2 #22708

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Jan 12, 2023

SUMMARY

  • upgrade react to 17.0.2

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@EugeneTorap
Copy link
Contributor

Hi @lilykuang! I see you removed react-virtualized from package.json.
Should we rewrite existed code which uses this lib?

@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 31, 2023
@lilykuang
Copy link
Member Author

@EugeneTorap I removed react-virtualized for testing purpose. I am actually waiting to see if react-virtualized will release a new version since the support for v17 and v18 bvaughn/react-virtualized#1740 is merged

@EugeneTorap
Copy link
Contributor

They don't update the lib during 2 years. I've started rewriting FilterableTable in order to use our new AntD table.

@lilykuang
Copy link
Member Author

sounds good. thank you for the heads up @EugeneTorap

@michael-s-molina
Copy link
Member

michael-s-molina commented Dec 22, 2023

It would be great if we could merge this PR as part of the 4.0 initiative, during the breaking window. During that period, we'll merge many PRs that introduce breaking changes and will need to do a full test of the application, which would be a great opportunity to test the impact of this PR.

If you agree, just add a card to the 4.0 project board about upgrading React and mark this PR with the v4.0 label 😉

@lilykuang
Copy link
Member Author

/testenv up

Copy link
Contributor

@lilykuang Ephemeral environment spinning up at http://54.191.98.204:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@lilykuang lilykuang changed the title chore: upgrade react to 17.0.2 [WIP] chore: upgrade react to 17.0.2 Dec 23, 2023
@lilykuang lilykuang added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label Dec 23, 2023
Copy link

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5e85f5c) 69.18% compared to head (ae78073) 69.18%.
Report is 4 commits behind head on master.

Files Patch % Lines
...dashboard/components/SliceHeaderControls/index.tsx 50.00% 0 Missing and 2 partials ⚠️
superset-frontend/src/pages/Dashboard/index.tsx 0.00% 1 Missing ⚠️
...erset-frontend/src/pages/DatasetCreation/index.tsx 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22708      +/-   ##
==========================================
- Coverage   69.18%   69.18%   -0.01%     
==========================================
  Files        1945     1945              
  Lines       75971    75984      +13     
  Branches     8467     8475       +8     
==========================================
+ Hits        52559    52566       +7     
- Misses      21225    21228       +3     
- Partials     2187     2190       +3     
Flag Coverage Δ
javascript 56.51% <42.85%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lilykuang lilykuang requested a review from a team January 3, 2024 17:07
@eschutho
Copy link
Member

eschutho commented Jan 3, 2024

@michael-s-molina @lilykuang Do we know for sure if there are any breaking changes for this PR or are we thinking of putting it into 4.0 just to be extra cautious?

@michael-s-molina
Copy link
Member

@michael-s-molina @lilykuang Do we know for sure if there are any breaking changes for this PR or are we thinking of putting it into 4.0 just to be extra cautious?

We added the v4.0 label to merge it during the breaking window and reuse the tests/stabilization period given that this impacts the whole application and will require a full test. Is just to be extra cautious and optimize efforts 😉

@@ -39,6 +39,6 @@
"peerDependencies": {
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"react": "^15 || ^16"
"react": "^15 || ^16 || ^17"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should drop 15?

Copy link
Member

Choose a reason for hiding this comment

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

💯

@@ -35,7 +35,7 @@
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"mapbox-gl": "*",
"react": "^15 || ^16"
"react": "^15 || ^16 || ^17"
Copy link
Member

Choose a reason for hiding this comment

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

... same with the rest of these. We've been on React 16 long enough that I would hope we can drop 15 as a peer dependency? ¯\_(ツ)_/¯

@kgabryje
Copy link
Member

/testenv up

Copy link
Contributor

@kgabryje Ephemeral environment spinning up at http://34.221.110.31:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina michael-s-molina removed the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label Jan 26, 2024
@mistercrunch
Copy link
Member

Wondering if we should re-open this against the main fork so more people can collab on it. I don't mind doing the rebasing and re-opening if people are going to push on this.

@michael-s-molina
Copy link
Member

Wondering if we should re-open this against the main fork so more people can collab on it. I don't mind doing the rebasing and re-opening if people are going to push on this.

@mistercrunch This was punted to 5.0 because of the following:

Histogram and Event flow charts use old, unsupported library @data-ui, which is not compatible with React 17. Since there are no easy replacements, we need to rewrite those plugins using a different library or deprecate them before moving on with React 17 upgrade.

So I think we need to resolve some prerequisites before continuing the work. @kgabryje will know more.

@mistercrunch
Copy link
Member

mistercrunch commented Feb 2, 2024

Any hacks to support conflicting reacts? Plugins-in-iframe-mode?

:( williaster/data-ui#201

@amadejzv
Copy link

amadejzv commented May 8, 2024

hey @michael-s-molina @kgabryje, any news in this area?

@rusackas
Copy link
Member

rusackas commented May 9, 2024

Plugins-in-iframe-mode?

There are actually a lot of reasons to do this... but I've tried it begore, and it requires some major refactoring. It ain't gonna be easy until we've reached the end of the theming road. Hopefully we'll get there soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants