-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(components, app, labware-library): migrate to react-router-dom v6.24.1 #15699
Conversation
964390c
to
3928521
Compare
the migration guide would be useful to review this pr |
app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/DeviceResetModal.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/InstrumentMountItem/AttachedInstrumentMountItem.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/ChangePipette/__tests__/ChangePipette.test.tsx
Outdated
Show resolved
Hide resolved
...nisms/DeviceDetailsDeckConfiguration/__tests__/DeckConfigurationDiscardChangesModal.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/NetworkSettings/__tests__/AlternativeSecurityTypeModal.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/NetworkSettings/__tests__/DisplayWifiList.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/NetworkSettings/__tests__/SelectAuthenticationType.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/OnDeviceDisplay/NameRobot/__tests__/ConfirmRobotName.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/OnDeviceDisplay/RobotDashboard/__tests__/RecentRunProtocolCard.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/OnDeviceDisplay/RunningProtocol/__tests__/ConfirmCancelRunModal.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/OnDeviceDisplay/RunningProtocol/__tests__/RunFailedModal.test.tsx
Outdated
Show resolved
Hide resolved
@@ -53,7 +53,7 @@ | |||
"react-intersection-observer": "^8.33.1", | |||
"react-markdown": "9.0.1", | |||
"react-redux": "8.1.2", | |||
"react-router-dom": "5.3.4", | |||
"react-router-dom": "6.24.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not introducing v6.25.0/v6.25.1 because too new?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait i think v6.25.0 came out just yesterday, that is why i did not use it lol. Shouldn't we stick with 6.24.1 to match PD though? hmm. @shlokamin thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.25.0 2days ago and 6.25.1 yesterday.
https://github.com/remix-run/react-router/releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't matter to me as long as all of our frontend projects share the same version, so we can either update PD or keep these at 6.24.1
app/src/organisms/OnDeviceDisplay/RunningProtocol/ConfirmCancelRunModal.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/QuickTransferFlow/__tests__/SummaryAndSettings.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/RobotSettingsDashboard/__tests__/RobotSystemVersionModal.test.tsx
Show resolved
Hide resolved
app/src/pages/InstrumentsDashboard/__tests__/InstrumentsDashboard.test.tsx
Outdated
Show resolved
Hide resolved
app/src/App/OnDeviceDisplayApp.tsx
Outdated
{targetPath != null && ( | ||
<Route path="/" element={<Navigate to={targetPath} />} /> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://stackoverflow.com/questions/69868956/how-can-i-redirect-in-react-router-v6
{targetPath != null && ( | |
<Route path="/" element={<Navigate to={targetPath} />} /> | |
)} | |
<Route path="*" element={<Navigate to={targetPath} replace />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you so much koji!
For ODD, we would need to check the followings unboxing flow [with software update] Navigation item after unboxing flow
Robot settings Dashboard
|
making my way through this PR but chiming in to say that i can devote time early next week to test this on a bot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this branch on ODD (tested the UnboxingFlow 2,3 times a couple of times) and didn't see any issues.
I think once Shlok tested this branch and if he doesn't see any issue, this branch will be good to go!
Thank you for updating react-router
!
closes AUTH-564
Overview
This PR updates
react-router-dom
to v6.24.1 in the stack to match PD'sreact-router-dom
versionBig changes between v5 and v6:
useHistory
is deprecated and replaced withuseNavigate
. Instead ofhistory.push('path')
andhistory.goBack()
it isnavigate('path')
andnavigate(-1)
Route
no longer has children, instead the component goes into theelement
prop.Switch
is deprecated and is nowRoutes
Route
must be wrapped inRoutes
(should mainly have to worry about this in unit testing since the app components are wrapped inRoutes
already from the top level)<Redirect/>
is deprecated and is now<Navigate/>
(if it is wrapped inRoutes
then you may useRoute
andNavigate
goes into the element prop)Test Plan
Smoke test labware-library, protocol designer but most importantly, smoke test the app and ODD.
Changelog
react-router-dom
in Labware-library and appcomponents
Review requests
see test plan
Risk assessment
high since we have a 8.0.0 release and this touches a bunch of code. we need to smoke test well before merging