- Issue created by @xmacinfo
- 🇨🇦Canada xmacinfo Canada
Actually, Devel itself should expose it's menu directly in the new Navigation menu. But I would find it more convenient to see the Devel menu injected directly in the Tools (managed by Navigation Extra Tools) menu.
- 🇨🇦Canada xmacinfo Canada
Devel integration to Navigation ticket:
https://gitlab.com/drupalspoons/devel/-/issues/530#note_2206580745
- 🇮🇪Ireland lostcarpark
Thanks for all the information.
This is something I want to work on, and adding just the Devel menu seems and easier place to start than all the entity menus the Admin Toolbar Extras module implements.
- 🇮🇪Ireland lostcarpark
I have added the functionality to add the Development menu to the Tools menu.
It seems to be working, but I'd like to add some tests.
Feel free to try out in 1.1-dev in the meantime. Feedback very welcome.
- 🇮🇪Ireland lostcarpark
Just a note that because of the way Navigation renders menus with children, the Development menu itself isn't currently reachable. It just expands to reveal the submenu items. Since this points to
/admin/config/development
, which just shows the development menu page, I don't think it's a problem. - 🇮🇪Ireland lostcarpark
I've renamed the "ExtraTools" class to "ToolsMenuDeriver", which I think better describes its function. I've also added weights to the added menu items.
I've added a basic test that checks that the Development menu isn't present when Devel module isn't installed, and gets added after installing Devel.
A lot of the sub-menus depend on other modules, so I may add some further tests to test menus are only available when the expected modules are enabled.
I think this is ready for review. It would be helpful to have feedback from people using the functionality in Admin Toolbar.
- 🇮🇪Ireland lostcarpark
Hi @debrup, when assigning and issue to yourself, it's considered good queue etiquette to post a comment stating what you intend to do with it, and how long you expect the assignment to last. Usually this would be to work on the issue fork. It wouldn't usually be necessary to assign the issue to carry out a review.
- 🇨🇦Canada xmacinfo Canada
Devel is also working on exposing their menu in the Navigation. See the Github issue linked above.
Before going further, we may need to check with them the best course of action.
I did not try your code yet, though.
- 🇮🇳India debrup
@lostcarpark Thank you for your advice. I will keep that in mind. I tested the module in my site.
- The Development menu only shows when devel module is installed.
- The devel toolbar is not supported (for now). The development menu showed is displaying custom links defined in the deriver.
- Since the devel toolbar is not supported so the devel toolbar settings has no functionality (for now).It would be nice to have all the links available which are activated in the devel toolbar by default, especially "routes_info" page which is a very useful thing provided by the devel module. Please consider to add them.
- 🇮🇪Ireland lostcarpark
@debrup, the feature request was to replicate the development menu that the Admin Toolbar Extra Tools module adds. I think we should limit the scope of this issue to that functionality.
Replicating the functionality of the Devel Toolbar, sounds worth investigating, and adding options like
routes_info
certainly sounds useful. I'd like to check that the devel team aren't already working on that functionality.I would favour merging the current change, and opening a follow on issue to look at the possibility of incorporating features of Devel Toolbar.
Feel free to open that issue if you feel inclined.
- 🇮🇳India debrup
@lostcarpark the implementation looks good from my end. All the links are working correctly. Would you like to move the issue to RTBC or wait for further reviews.
- 🇮🇳India debrup
@lostcarpark another issue I found with the new navigation of Drupal is the when the variables are dumped on the page (due to devel) the nav bar gets overlapped with the dark variable container. I think its the issue of the navbar.
However because of this the development bar becomes inaccessible when we go to the "theme registry" link :(
- 🇨🇦Canada xmacinfo Canada
@debrup Please check the Devel Github issue queue to see if this is already reported. If not, open a new ticket over there:
- 🇮🇪Ireland lostcarpark
Thanks for the feedback.
I've also noticed that issue with the way devel dumps variables, and I'd agree it's a devel issue rather than anything this module can consider.
Regarding the devel toolbar, I notice it's discussed in this issue. The maintainer seems reluctant to do anything in the devel module. Can definitely consider it in a follow-on issue.
- 🇮🇪Ireland lostcarpark
I've merged this change to the 1.1.x branch. There are a couple of other changes I'm aiming to complete before a 1.1.0 release.
- 🇺🇸United States moshe weitzman Boston, MA
Devel maintainer here - thanks for doing this. I'm sure folks will like it. is there any way we could make the list of links in the new menu configurable? Thats what I was hoping for by building upon the Development menu. That way folks could use the menu UI to customize.
- 🇮🇪Ireland lostcarpark
I think that's a great idea, but definitely a separate feature request. If you would like to get the ball rolling, would you like to open an issue?
-
lostcarpark →
committed 0b4585b5 on 1.1.x
Resolve #3486463 "Expose devel menu"
-
lostcarpark →
committed 0b4585b5 on 1.1.x
- 🇮🇪Ireland lostcarpark
Accidentally merged to 1.0.x branch instead of 1.1.x branch. Reverted and merged to 1.1.x.
- 🇨🇦Canada xmacinfo Canada
Why do you require Devel in the Composer file require-dev section? In your code, your code already checks if devel is installed.
if ($this->moduleHandler->moduleExists('devel')) {
Even if it is in require-dev, I try not to impose dependencies, even the most popular ones.
- 🇺🇸United States moshe weitzman Boston, MA
composer ignores require-dev except for the root composer.json. So the effect of this addition is for this module's testing of itself and nothing more.
- 🇮🇪Ireland lostcarpark
Yes, the
require-dev
ensures the Devel module gets loaded on development systems to allow the automated tests to run. There is a test that checks the Tools->Development menu gets created if the Devel module is enabled.If you add this module to your site with
composer require
, it should not add the Devel module, so it should not get added to production sites.