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

Upgrade React Router #1349

Merged
merged 116 commits into from
Dec 20, 2023
Merged

Upgrade React Router #1349

merged 116 commits into from
Dec 20, 2023

Conversation

labkey-alan
Copy link
Contributor

@labkey-alan labkey-alan commented Nov 16, 2023

Rationale

This PR upgrades React Router from 3.x to 6.x and bumps components version to 3.0.0.

Related Pull Requests

Changes

  • Breaking Changes:
    • Upgrade react-router dependency to react-router-dom version 6.x
      • If you use react-router you will need to upgrade
      • If you have history pinned in your dependencies you should remove it
    • withQueryModels updated to be compatible with React Router 6.x
  • Other Changes:
    • Note: all other changes listed here have to do with our upgrade of React Router, they're not considered breaking because they are all on our internal APIs which you should not be using
    • URL helpers:
      • use ReactRouter SetURLSearchParams instead of InjectedRouter and Location
      • remove resetParameters
      • remove Location type
      • add getQueryParams
    • Add withRouterDeprecated
      • This is a wrapper that is very similar to withRouter, which no longer exists, in order to ease the transition to React Router 6
    • Update components to use React Router Hooks
    • Don't export UsersGridPanel or PermissionAssignments

@labkey-alan labkey-alan self-assigned this Nov 16, 2023
@labkey-alan labkey-alan force-pushed the fb_upgrade_react_router branch 2 times, most recently from 7081abd to 5233f63 Compare November 30, 2023 23:20
Copy link
Contributor

@labkey-nicka labkey-nicka 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 so far.

packages/components/src/internal/util/URL.ts Show resolved Hide resolved
packages/components/src/internal/actions.ts Outdated Show resolved Hide resolved
packages/components/src/internal/actions.ts Outdated Show resolved Hide resolved
packages/components/src/internal/actions.ts Outdated Show resolved Hide resolved
packages/components/src/internal/app/models.ts Outdated Show resolved Hide resolved
packages/components/src/internal/url/URLResolver.ts Outdated Show resolved Hide resolved
packages/components/src/internal/url/URLResolver.ts Outdated Show resolved Hide resolved
packages/components/src/internal/withRouterDeprecated.tsx Outdated Show resolved Hide resolved
@labkey-alan labkey-alan force-pushed the fb_upgrade_react_router branch from 7136c05 to 37dc6e0 Compare December 4, 2023 22:02
@labkey-alan labkey-alan force-pushed the fb_upgrade_react_router branch from 50954f6 to 02e7e9a Compare December 5, 2023 23:39
@labkey-alan labkey-alan force-pushed the fb_upgrade_react_router branch 4 times, most recently from efd0251 to cbbe073 Compare December 18, 2023 15:44
@labkey-alan labkey-alan marked this pull request as ready for review December 18, 2023 16:10
@labkey-alan labkey-alan force-pushed the fb_upgrade_react_router branch from c332a95 to e459e7f Compare December 19, 2023 20:37
@labkey-alan labkey-alan merged commit a21e0a8 into develop Dec 20, 2023
@labkey-alan labkey-alan deleted the fb_upgrade_react_router branch December 20, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants