Avoid dynamic path in Navigations screen in Browse Mode #51561
Labels
[Feature] Navigation in Site View
Navigation section in the Site Editor when in Site View, offering a way to manage Navigation Menus a
[Type] Code Quality
Issues or PRs that relate to code quality
Currently we dynamically alter the path of "Navigation" on the main Browse Mode listing screen depending on whether there are multiple menus (go to Navigation listing route) or just one (go directly to single Navigation route).
Unfortunately this exposes the need to replicate that logic anytime external code needs to route to "Navigation".
Instead let's remove the routing and instead make the Navigation Listing route handle the dynamic part. That way the Editor can simply route to
/navigation
and it will "just work".I'm not sure it's wise to do this (change the path depending on the number of menus). This creates an issue because now the "parent" of the navigation is "hidden". so for instance if you go to "navigation" and you click "back" you don't end up in the root place.
I wonder if the best solution is to instead of doing this, change the behavior within the
/navigation
screen to actually render the menu directly when there's one.Originally posted by @youknowriad in #50840 (comment)
The text was updated successfully, but these errors were encountered: