-
Notifications
You must be signed in to change notification settings - Fork 1
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
[CMDCT-3817] Upgrade React-Router-Dom #139753
base: main
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit 7b71347 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 89.2% (90% is the threshold). This pull request will bring the total coverage in the repository to 79.2% (-0.5% change). View more on Code Climate. |
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.
Blocking due to issue with user timeout
@@ -39,7 +34,7 @@ const Timeout = () => { | |||
unlisten(); | |||
clearInterval(timer); | |||
}; | |||
}); | |||
}, [location]); |
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.
the timeout isn't working as expected and I'm wondering if this might be why? it's listening on location and location won't change if you are not using the page
steps to reproduce:
- in
authLifecycle
change IDLE_WINDOW from 30 to 1 and PROMPT_AT from 29 to 0.5 - Log in and let sit until the modal pops up
- The modal displays and says you will be logged out in 59 seconds. The time never changes and it does not change the view after that time
<Route path={"/state_assoc"} element={Unauthorized} /> | ||
<Route path={"/role_jobcode_assoc"} element={Unauthorized} /> | ||
<Route path={"/users"} element={Unauthorized} /> | ||
</Routes> |
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.
Just a thought in reviewing these: is it normal to control routes by user type? or to have all routes and restrict them on a component level by type? just curious
@@ -107,7 +107,7 @@ export const Header = () => { | |||
<li> | |||
<a | |||
data-testid={"headerDropDownMenuButton"} | |||
href="#menu" | |||
href="javascript:void(0);" |
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.
🤷
Description
The long awaited react-router upgrade is here, and the fruits of our labor can finally be fully observed. Bask in the hooks that make this a lot easier to use router!
Related ticket(s)
CMDCT-3817
How to test
Log in as a stateuser
Enter a report
Navigate through the sections, clicking any buttons you see to go to different pages. I.E., check the Sidebar, the print actions button on the bottom, the navigation buttons on the bottom, etc.
If everything loads, fill in some data and make sure it saves
Use the top right menu to check that your state user info shows up in the account page
Click the banner image to see you navigate to the root page
Sign out
Sign in as an admin
Repeat the same steps as above and it should all work
Notes
React-Router is removed
React-Router-Dom 5.2 -> 6.26
Pre-review checklist
Pre-merge checklist
Review