tl-its-umich-edu / my-learning-analytics

My Learning Analytics (MyLA)
Apache License 2.0
36 stars 39 forks source link

I1529 Frontend Dependancy Update #1555

Closed pushyamig closed 8 months ago

pushyamig commented 10 months ago

Fixes #1529 and #1525

  1. Fix the UI changes due to MUI v5 update as it seems to be due to MUI adopting https://emotion.sh/docs/introduction
    1. https://mui.com/material-ui/migration/migration-v4/. The documentation is nuanced since it talk all scenarios with upgrade to MUi v5 with React 17, MUi v5 with React 18, MUi v5 supporting JSS etc
    2. used CodeMods for updating the MUI to v5. here are the docs what gets updated https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#variant-prop
  2. react-router-dom has some major changes, the nested router path are relative now
    1. withRouter higher order hook is removed, so need to write a custom function
  3. React 18 had some changes to how react is initiated. lot of Improvement to async support.
  4. The strategy for package-lock.json was just delete node_module and update the package.json and generate a new lock file. This was simplest!
  5. upgrade to @apollo/client, Assignment planning was crashing so added a configuration option assumeImmutableResults: false, to enable mutable object of response which was allowed as an configuration option.
  6. used npm-check-updates for checking the latest package version in the repo. It is recommended by package dev to install it globally. https://www.npmjs.com/package/npm-check-updates npm install -g npm-check-updates
  7. Three security advisory w.r.t (postcss, graphql, @babel/traverse) are resolved now. check using the command npm ls <package-name> Eg., npm ls postcss

Todo List:


Test Plan

https://docs.google.com/spreadsheets/d/18c_VDE7wdme8c36Zo5-pjad77Kit8hFz4ylbmFXmLP8/edit#gid=0

Testing should be done from Student, instructor and MyLa Admin role

pushyamig commented 10 months ago

This Draft PR is branched out of #1554 since that has major Backend updates. So it make sense to this way until that PR get merged

pushyamig commented 9 months ago

used CodeMods for updating the MUI to v5. here are the docs what gets updated https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md

pushyamig commented 9 months ago

I have built the latest from this repo which is here https://github.com/pushyamig/my-learning-analytics/actions/runs/7413997544

pushyamig commented 9 months ago

This PR is now ready for Review, I have added test plan as well

pushyamig commented 9 months ago

I pretty much tested/reviewed it from my lense and things are ok .

I have updated things I tested according to test plan https://docs.google.com/spreadsheets/d/18c_VDE7wdme8c36Zo5-pjad77Kit8hFz4ylbmFXmLP8/edit#gid=0

pushyamig commented 8 months ago

I can't approve a PR which is opened by me. But I will approve the Jaydon's work as well