Revisit active checks in `top_nav_helper`
Description
In the first iteration of the top nav redesign, we moved the existing logic checks in nav/_dashboard.html.haml
, nav/_explore.html.haml
(and others) as-is to a new helper method which returned a view model.
There's probably some more we can do to improve and encapsulate how we check which links are active.
Context
The following discussion from !60394 (merged) should be addressed:
-
@fjsanpedro started a discussion: (+1 comment) For the sidebar, I took a slightly different approach. I passed the routes where the element should be active and then, in render time, I check the current path vs the element paths and then marked it as active.
Also:
Edited by Paul Slaughter