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

Migrate to React 18 #1652

Merged
merged 17 commits into from
Dec 12, 2023
Merged

Migrate to React 18 #1652

merged 17 commits into from
Dec 12, 2023

Conversation

MehdiNV
Copy link
Contributor

@MehdiNV MehdiNV commented Nov 21, 2023

Description

Migration of kedro-viz from React 17 to React 18

Breakdown of changes

Versionings:

  • Update React from 17 to 18
  • Update Redux from 7 to 8
  • Update adapter from 17 to 18 (to handle React 18)
  • Updating several other dependencies to higher versioning (Jest, Webpack et al)
  • Adjusting existing list of dependencies (e.g. removing enzyme)

Code changes

  • Adjusting existing code to be compatible w/ React 18 (particularly its batching rules)
  • Adapting Kedro-Viz to act as a component (for +compatibility)

Development notes

Upgrading React 18 required updates to other dependencies (e.g. Redux, Adapter, removal and addition of some dependencies), as well as changes to existing codebase (as otherwise React would default back to 17 per its own API). Hence why the scope of this PR covers multiple dependency changes and large changes to codebase solely for this migration.

QA notes

Combination of existing E2E testing (via Cypress), and manual QA to cover areas that existing tests haven't covered yet

@jitu5 jitu5 self-assigned this Nov 22, 2023
@jitu5 jitu5 added the Javascript Pull requests that update Javascript code label Nov 22, 2023
@MehdiNV MehdiNV marked this pull request as ready for review November 23, 2023 14:25
Copy link
Member

@tynandebold tynandebold left a comment

Choose a reason for hiding this comment

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

Nice work!

One quick question: we were often getting dependabot alerts to upgrade react-scripts from v4 to v5. Wonder if it's trivial to do that upgrade now in this PR?

@jitu5
Copy link
Contributor

jitu5 commented Nov 27, 2023

@tynandebold Sure let me explore react-scripts from v4 to v5 upgrade in this PR.

@astrojuanlu
Copy link
Member

That would also address some platform-specific installation issues #1278

Copy link
Contributor

@ravi-kumar-pilla ravi-kumar-pilla left a comment

Choose a reason for hiding this comment

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

Looks good to me and works well locally ! Awesome job !!

@jitu5
Copy link
Contributor

jitu5 commented Dec 7, 2023

@tynandebold I tried upgrading react-scripts from v4 to v5. This internally upgraded Webpack from v4 to v5, and since Webpack v5 includes many breaking changes, it required updating several dependencies in the app. I've managed to upgrade most of the dependencies, but it seems that workerize-loader doesn't work well with Webpack v5. Therefore, for now, we've decided not to include it in this PR and will address it later.

Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

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

LGTM!

@jitu5 jitu5 merged commit 8c9546e into main Dec 12, 2023
5 checks passed
@jitu5 jitu5 deleted the chore/react_18 branch December 12, 2023 15:43
This was referenced Dec 18, 2023
rashidakanchwala added a commit that referenced this pull request Dec 19, 2023
Release 7.0.0

Major features and improvements

Upgrade to React 18. (Migrate to React 18 #1652)
Change CLI command to run Kedro-viz tokedro viz run. (Change 'Kedro Viz' to 'Kedro Viz Run' #1671)
Add deploy command to the CLI using kedro viz deploy for sharing Kedro-viz on AWS. (AWS focussed CLI implementation for Shareable Viz  #1661)
Add support for kedro==0.19and kedro-datasets==2.0. (Fix bug on kedro viz --load-file #1677)
Drop support for python=3.7. (Remove support for Python 3.7 #1660)
Drop support for kedro==0.17.x. (Drop Kedro 17  #1669)
Bug fixes and other changes
Fix modular pipelines breaking when collapsed on the flowchart. (Fix modular pipelines breaking when collapsed.  #1651)
Display hosted URL in CLI while launching Kedro viz. (Display hosted URL in CLI while launching kedro viz #1644)
Fix Kedro-viz display on Jupyter notebooks. (Fix Kedro-viz embedded as an IFrame #1658)
Fix zoom issues on the flowchart. (Flowchart doesn't automatically reset the zoom when actions are performed. #1672)
Fix bug on kedro-viz run --load-file. (Fix bug on kedro viz --load-file #1677)
Fix bug on adding timestamps to shareable-viz. (_#1679)
@astrojuanlu astrojuanlu mentioned this pull request Jan 15, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Javascript Pull requests that update Javascript code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants