Closed (fixed)
Project:
Project Browser
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
26 Jun 2024 at 15:09 UTC
Updated:
28 Oct 2024 at 17:49 UTC
Jump to comment: Most recent
In #3238996: Provide menu link we added project browser to the menu. But then in #3444662: Make PB menu items behave similar to their siblings we noticed we weren't doing The Right Thing™ because it was showing up in the new Navigation module when the siblings weren't.
But NOW, if using admin_menu, the tab no longer shows in the dropdown menu for Extend, but its siblings *do*.
Spin up latest 2.0.x and see that it's not on the menu (can also use Try It Now from //dgo.to/project_browser).
Comments
Comment #2
chrisfromredfinOK so as @lostcarpark points out in Slack, there are three scenarios to test for:
We are behaving "correctly" for Drupal without Navigation, and WITH Navigation (cases 1 & 2).
We are a bit different for the "Admin Toolbar" module. In fact, with only Admin Toolbar enabled, there are still no sub-children under the "Extend" menu. The module admin_toolbar_tools is in fact what registers those paths on the menu, by providing its own menu links yaml, which registers some of those core routes: https://git.drupalcode.org/project/admin_toolbar/-/blob/3.x/admin_toolba...
So, I think there are two possible approaches here - use a menu alter to add our menu link *only if admin_toolbar_tools is enabled* -OR- punt this upstream to admin_toolbar.
My hunch is that once we're in core, admin_toolbar will probably support adding the menu link to the Browse route in admin_toolbar_extra_tools the same as it does for, say, the current uninstall route.
One possibility to mitigate why this is an issue for us, is to perhaps enable Navigation in our DrupalPod Try It Now - or NOT enable admin_toolbar_extra?
Comment #3
gslexie commentedFWIW I don't think it would make the most sense for a Core module to be altering menu links from a contrib. So I followed up on the other suggestion and created an issue and a patch for admin_toolbar to try to get it fixed there. There's already a deriver that conditionally adds links for various optional modules, so it fits neatly in there.
Comment #4
chrisfromredfinThanks, @gslexie! I tend to agree that would be the preferred path forward.
Comment #5
gslexie commentedLooks like the update to admin_toolbar_tools has been merged into 3.5, so this issue is probably either fixed or outdated
Comment #6
narendrarHi @Chris, can you please close this issue?
Comment #7
chrisfromredfinI have noticed it showing properly in admin_toolbar as of late - that's great! I think this is doing what we want now naturally.