Complete and generate the Devel menu based on the Devel Toolbar settings

Created on 25 July 2025, 18 days ago

Problem/Motivation

Currently, the Devel menu is hardcoded in the /src/Plugin/Derivative/ToolsMenuDeriver.php file.
Some menu entries for features provided by Devel are also missing (e.g., Container Info, Routes Info, etc.)

Proposed resolution

Complete the links by adding the features provided by Devel, and use the devel.toolbar.settings configuration to add or omit the menu items.

โœจ Feature request
Status

Active

Version

1.2

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance rmpereira

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @rmpereira
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance rmpereira
  • Pipeline finished with Failed
    16 days ago
    Total: 259s
    #558525
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance rmpereira
  • Can confirm this works as advertised. Modified devel Toolbar settings, cleared caches, those same menu items appear in Tools menu under "Development."

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    This looks great! I'm all for anything to make the module more generic. I've flagged a couple of minor PHPCS issues, and there are a couple of tests that need updating. I will review and try to get this and other issues merged over the next few days.

  • Pipeline finished with Failed
    13 days ago
    #561591
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance rmpereira

    I fixed the minor PHPCS issues.
    I attempted to update the tests without success. The 'Tools' menu item does not appear in the navigation bar during test execution, and I havenโ€™t managed to add it.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    Moving to 1.3.x.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    Rebased for 1.3.x.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    Tests need fixing up.

    Would be nice to get fixed up and included in a new release.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    The problem I see with this change is that the default development menu options are very much reduced from what 1.2 provides.

    Here's the current list in 1.2:

    Here it is after this change:

    I am not finding the "Devel Toolbar Settings" page shown in #5. Is it provided by another module?

    While being able to customise the options on the menu is useful, I'm sure there are other users like me who don't know this is possible.

    I can think of several solutions:

    1. Add a recommendation to the project page/README to install the module providing the Devel Toolbar settings page. I think this would be useful to do, but I would not favour as the only solution.
    2. In ToolsMenuDeriver, detect if module providing Devel Toolbar settings is enabled, and if not, add the options that 1.2 includes that the Devel module does not add by default.
    3. During Install, enable the missing options in the same way as the Devel Toolbar settings page. An update hook would also be needed for those upgrading from earlier versions.

    My preference would be option 3, as it's fairly seamless for existing users of the module.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    Ah! I found the route in the Devel module, and realised it has a dependency on the Toolbar module. I normally disable Toolbar when I enable Navigation, hence I was not seeing it.

    I think it would be worth opening an issue in the Devel module to get this dependency removed, or to make dependent on Toolbar OR Navigation.

    I'm still feeling the best solution is to enable a larger set of options during install.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland lostcarpark

    Added service to enable the previously included Devel menu items.

    Called from hook_install and hook_modules_installed, to catch devel being installed after navigation_extra_tools.

    Fixed up tests.

    Would like to add a test that covers installing navigation_extra_tools before devel, and vice versa.

    Need to add an update hook to enable options when upgrading.

    Would like to generate a fixture and add a test of the update.

Production build 0.71.5 2024