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 Material UI version to v5 #1694

Open
4 tasks
phixMe opened this issue Oct 7, 2021 · 6 comments
Open
4 tasks

Migrate Material UI version to v5 #1694

phixMe opened this issue Oct 7, 2021 · 6 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed web

Comments

@phixMe
Copy link
Member

phixMe commented Oct 7, 2021

The main UI package we use across our project has made some major changes with the new major release and has a long list of migration actions.

https://mui.com/guides/migration-v4/#update-react-amp-typescript-version

This includes

  • Bumping the React Version
  • Bumping the TS Version
  • Migrate to Emotion from JSS
  • Doing individual component modifications
@phixMe phixMe added help wanted Extra attention is needed good first issue Good for newcomers web labels Oct 7, 2021
@dakshin-k
Copy link
Contributor

Hi @phixMe, I looked into picking this one up. Tried to upgrade to React 17 and ran into a couple problems:

  • react-vis is deprecated and doesn't support v17
  • react-helmet won't work with v17 (Apparently the solution is to migrate to react-helmet-async?)

I'm not sure what to do about either of the above problems. Maybe they need to be separate issues that we should discuss and fix first?

Side note: I'm not sure what other problems we may face upgrading to v17, since at the moment I can't get past the npm install stage

@phixMe
Copy link
Member Author

phixMe commented Oct 17, 2022

Hi @dakshin-k, thanks for looking into this.

I think we can actually drop react-vis as a dependency. It's actually not used as far as I can tell except adding a few stylesheets and TypeScript configuration.

I think we should look into migrating to react-helmet-async. It should be a fairly simple task.

I can create issues for both of these.

@phixMe
Copy link
Member Author

phixMe commented Oct 17, 2022

@dakshin-k I've fixed both of the issues you've reported in the following PR. #2197

@dakshin-k
Copy link
Contributor

Perfect! I'll try to raise a PR upgrading to React 17 over the next few days

@dakshin-k
Copy link
Contributor

Found another problem, and a biggie - Enzyme doesn't support React 17

There is an unofficial fork that seems quite popular, however the author has said there won't be a version for React 18.

For now, we might be able to switch to this fork for tests (Let me know if I can raise a PR to do that).
Long term, looks like the only possible solution is to migrate the tests to use the React Testing library 😞

@phixMe
Copy link
Member Author

phixMe commented Oct 20, 2022

I think we should just move over to jest and react-testing-library. The tests should not be that difficult to migrate over since the project isn't too big. Many of the tests we had before have been removed already. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed web
Projects
Status: No status
Development

No branches or pull requests

2 participants