Conversation
|
Skipping CI for Draft Pull Request. |
1b94499 to
d3b2961
Compare
|
Images are ready for the commit at 7f25dec. To use with deploy scripts, first |
ui/apps/platform/src/Containers/AccessControl/AuthProviders/AuthProviderForm.tsx
Show resolved
Hide resolved
ui/apps/platform/src/Containers/NetworkGraph/TopologyComponent.tsx
Outdated
Show resolved
Hide resolved
a45af79 to
aeaf0dc
Compare
ea04091 to
a13ef4a
Compare
62d7bd0 to
791f882
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #13628 +/- ##
==========================================
- Coverage 49.20% 48.89% -0.31%
==========================================
Files 2533 2547 +14
Lines 185529 186992 +1463
==========================================
+ Hits 91290 91433 +143
- Misses 87003 88318 +1315
- Partials 7236 7241 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dvail
left a comment
There was a problem hiding this comment.
This looks really good - thanks for all your hard work on this @bradr5 !
A handful of thoughts:
(1) Regarding the need for react-router-v5 compat in the RH console plugin architecture
I don't think we should allow that concern to hold up the work in this PR. From what I understand, v5 is deprecated and the next release will likely support v6 only. Assuming we needed to build a plugin tomorrow, which we don't, we would still need to have the plugin code working in a v6-only environment, as well as a v5/v6 environment in order to support older console versions.
Although I wasn't able to easily get react-router-dom-v5-compat working as-is with this PR, I think that the path from here to there is much shorter than the path from v5 to there.
As an additional aside, when hooking into the console we will not be using most of the top level <Router>, etc. components, as those will be provided. Using Violations as an example, aside from the <ViolationsPage> which we could easily bypass, we only need <Link> and useParams() in components in the Violations directory. The API for these hasn't changed between v5 and v6, so that should not be much of an issue. If there are other react-router APIs that we need that have changed, we could inject a wrapper via Context or some other method if we absolutely had to.

(2) I'm not sure if it is possible at this point, but it would be nice to inventory everything that was found in a bug bash document that did not cause an e2e test failure, and create follow-on tickets to get tests in place for those. The types of failures we found (ex. an entire page does not render) should definitely be caught by some smoke test in our suite given the severity of the failure.
(3) We should do some more testing before approval, especially with changes that landed at the end of the 4.7 cycle (VM, Violations). Aside from that, the sooner we get this in the better IMO as it will give us ample soak time and unblock other dependency work that is in the pipeline.
ui/apps/platform/src/Containers/AccessControl/AuthProviders/AuthProviderForm.tsx
Show resolved
Hide resolved
ui/apps/platform/src/Containers/ComplianceEnhanced/Coverage/CoveragePage.tsx
Outdated
Show resolved
Hide resolved
ui/apps/platform/src/Containers/ComplianceEnhanced/Schedules/ScanConfigsTablePage.tsx
Show resolved
Hide resolved
ui/apps/platform/src/Containers/MainPage/Navigation/HorizontalSubnav.tsx
Show resolved
Hide resolved
ui/apps/platform/src/Containers/Vulnerabilities/ExceptionManagement/ExceptionManagementPage.tsx
Show resolved
Hide resolved
ui/apps/platform/src/Containers/Vulnerabilities/NodeCves/NodeCvesPage.tsx
Outdated
Show resolved
Hide resolved
7f86ec0 to
6572ede
Compare
166ef7b to
7a70532
Compare
11d62cc to
fe4f316
Compare
|
dvail
left a comment
There was a problem hiding this comment.
Code LGTM and the testing has been pretty solid. I think there is still something a little bit amiss with the handling of isActive states of nav items as you navigate through the pages. I don't think it is a critical bug but we should prioritize it as a first fix after this is merged if we want to get this in asap.
|
@sourcery-ai review |
Description
React Router v6 Upgrade
Key Changes
Switch from
connected-react-routertoredux-first-historyconnected-react-routernot compatible with router v6withRouterredux-first-historyis a modern replacement@remix-run/routerhistory objectRouting
<Switch>with<Routes><Route>now uses theelementprop instead ofcomponent/renderor childrenpathnow relative to parent routeuseNavigatereplacesuseHistorynavigatefor navigation instead ofhistory{replace: true}for replacehistory.goBack()/history.goForward()replaced bynavigate(-1)/navigate(1)Redirectreplaced byNavigate<Redirect>with<Navigate to="path" />for redirectionuseMatchreplacesuseRouteMatchuseMatchto check for route matchesIssues
useParamsType DefinitionsuseParamsare typed asstring | undefinedConsiderations
Outletfor Nested Routes<Outlet />in parent components to render child routes dynamicallyuseRoutesHookuseRouteshookUser-facing documentation
Testing and quality
Automated testing
How I validated my change