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(deps): Upgrade react-router-dom to v6 MAASENG-1606 #5369

Conversation

ndv99
Copy link
Contributor

@ndv99 ndv99 commented Mar 22, 2024

Done

  • Upgraded react-router-dom to v6
  • Removed react-router-dom-v5-compat
  • Removed CompatRouter from UI and tests
  • Use HistoryRouter from redux-history-first/rr6

Code review

As you can probably see, this PR changes a lot of files. Most of these are just simple replacements, where "react-router-dom-v5-compat" is replaced with "react-router-dom". However, some files required more work in order to retain functionality. I've listed them below so it's easier to filter through the files that should be reviewed more carefully:

  • src/app/base/components/AppSidePanel/AppSidePanel.tsx
  • src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx
  • src/index.tsx
  • src/redux-store.ts
  • src/testing/utils.tsx
  • src/app/tags/views/TagUpdate/TagUpdate.test.tsx
  • src/app/kvm/components/SettingsBackLink/SettingsBackLink.tsx
  • src/app/settings/components/Routes/Routes.test.tsx
  • src/app/devices/views/DeviceList/DeviceListHeader/DeviceListHeader.test.tsx
  • src/app/kvm/views/LXDSingleDetails/LXDSingleSettings/LXDSingleSettings.test.tsx
  • src/testing/factories/state.ts
  • src/app/Routes.test.tsx
  • src/app/subnets/views/SubnetDetails/SubnetDetailsHeader/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx

QA steps

  • Ensure that you can navigate around the UI using the navigation, tab links on details pages, etc.
  • Click on "Settings" and ensure you are redirected to configuration/general
  • Ensure the settings subnavigation works
  • Click on your user profile and ensure the preferences subnavigation works

Fixes

Fixes MAASENG-1606

@webteam-app
Copy link

Demo starting at https://maas-ui-5369.demos.haus

@ndv99 ndv99 changed the title chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 WIP chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 Mar 22, 2024
@ndv99 ndv99 changed the title WIP chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 WIP Mar 22, 2024
@ndv99 ndv99 changed the title chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 WIP chore(deps): Upgrade react-router-dom to v6 MAASENG-1606 Mar 25, 2024
@ndv99 ndv99 marked this pull request as ready for review March 25, 2024 13:09
src/app/Routes.tsx Outdated Show resolved Hide resolved
@ndv99 ndv99 changed the base branch from main to react-router-v6 March 25, 2024 15:21
@ndv99 ndv99 force-pushed the MAASENG-1606-upgrade-react-router-dom-v6 branch from e6498f7 to f3b05b0 Compare March 26, 2024 11:26
Copy link
Contributor

@petermakowski petermakowski left a comment

Choose a reason for hiding this comment

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

Great work @ndv99
A few minor comments, but looking good overall.

src/app/settings/components/Routes/Routes.test.tsx Outdated Show resolved Hide resolved
src/redux-store.ts Show resolved Hide resolved
package.json Show resolved Hide resolved
ndv99 and others added 2 commits March 26, 2024 14:46
Co-authored-by: Peter Makowski <peter@makowski.uk>
Co-authored-by: Peter Makowski <peter@makowski.uk>
@petermakowski petermakowski merged commit 36eb8fb into canonical:react-router-v6 Mar 26, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants