Problem/Motivation
Track the steps needed to deprecate extension Toolbar. See Remove a core module and move it to a contributed project of the deprecation policy.
The removal of extension Toolbar was approved in #3476882: [Policy] Move Toolbar module to contrib.
All the child issues here, except in the infrastructure project, are "11.5.0 release priority".
Remaining tasks
To find uses start with
git grep -lwi "toolbar" | grep -v core/modules/toolbar/ | grep -v core/assets | grep -v phpstan-baseline | grep -v MAINTAINERS
But there are other uses of the word in core so not all are related to this issue.
The issue to remove Toolbar has an MR and can help find what needs to be changed to deprecate Toolbar. #3586211: Remove the Toolbar module
Settings Tray has a dependency on Toolbar. If Settings Tray is deprecated and moved to a contributed project before Toolbar this isn't a problem. Settings Tray in contrib can depend on Toolbar in contrib. See this comment.
- ✅ Find someone to maintain the contrib version of the extension. @dydave has agreed, see #21
- Move integrations implemented by other modules to the extension.
Create child issues or child meta issues, as needed, to address the following points. Not all points will apply to all extensions.- Handle usages in help #3560205: Remove toolbar usage in hook help
- Remove the extension from one or more profiles.
- Tests
- Hooks #3611762: Move toolbar hook implementations to the toolbar module
- Integration with Navigation #3507711: Move the code that hides the toolbar when navigation is enabled to the toolbar module
- Setting tray is also being removed.
Handle usage in Setting Tray #3575909: Remove the Settings Tray dependency on Toolbar - Enable navigation in the standard profile #3575171: Add Navigation to the Standard profile and recipes
- Enable navigation in umami #3560118: In Umami, replace Toolbar with Navigation
- Move library overrides from Claro and Default Admin #3614955: Move library overrides for Toolbar from Claro and Default Admin to Toolbar.
- Remove references to the extension from database dumps. -- This will be done in a single issue with the other extensions being removed.
- Remove templates from the extension’s markup.
- Remove templates from themes that are staying in core, leave them in deprecated themes
- Keep skipping the template in the stable copies test.
- Do a thorough search of core for any remaining references to the extension. If references are found, outside of the extension, then create issues to remove the references.
- Create the contrib project with a stable release, before the alpha version of the major release. Follow the process in Create the contrib project with a stable release for creating the sub tree split.
- Deprecate the core extension #3560123: [PP-1] Deprecate the Toolbar module.
- #3567861: Ensure that Toolbar does not get special core treatment
| Comment | File | Size | Author |
|---|---|---|---|
| #45 | Screenshot 2026-08-24 at 06.22.12.png | 285.29 KB | gábor hojtsy |
Comments
Comment #2
cilefen commentedComment #3
catchExplicitly postponing this on navigation being stable, but that is close per #3421969: [PLAN] New Navigation and Top Bar to replace Toolbar Roadmap: Path to Stable.
We will need to enable navigation in the standard profile and umami in order to actually deprecate toolbar, but there might be some other things that could happen in the meantime like making sure that no tests have explicit dependencies on it.
Comment #4
gábor hojtsy#3421969-81: [PLAN] New Navigation and Top Bar to replace Toolbar Roadmap: Path to Stable onwards discusses that Settings Tray also has a hard dependency on Toolbar, however Settings Tray has such low usage that decoupling them may not be effort well spent. Should their move to contrib be handled together then?
Comment #5
quietone commentedThis is postponed on Navigation being stable and it is stable now that #3557578: Mark Navigation as a stable module was committed. Therefor setting this to active.
Comment #6
quietone commentedComment #7
quietone commentedComment #8
quietone commentedComment #9
quietone commentedAnd test usages which need to be changed.
Comment #10
quietone commentedUsages of the toolbar hook
And what could be the remaining
Comment #11
quietone commentedComment #12
catchLooks like we could tackle the things in #9 and #10 before navigation is in standard, that would mean less work to do later.
Comment #13
longwaveNot much we can do with #9 yet I'm afraid.
These need #3465299: Integrate Announcements module into Navigation's drawer/submenu:
These uses can likely be removed:
Some parts of these test integration with contextual.module, so probably needs to be moved into toolbar.module?
These are false positives:
These need to move into toolbar.module:
These only uninstall toolbar from standard or Umami:
Some parts of these test integration with shortcut.module, but that is also moving to contrib:
This needs to stay until we update the database dump:
This probably needs #3511374: Core Navigation + Workspace + Workspace UI modules crashes Drupal Installation and then the toolbar tests moving to toolbar.module:
Comment #14
catchThe toolbar hook implementations I think we could move all of those into the toolbar module with a moduleExists() check.
Comment #15
longwaveThis can't be completed until #3560117: [meta] Add Navigation to the Standard profile and recipes lands, which in turn is waiting for accessibility issues in Navigation to be fixed.
It feels unlikely at this point that Toolbar will be removed from Drupal 12.
Comment #17
berdirAlso related to toolbar: _system_is_claro_admin_and_not_active() and the 3 hooks in system module that use it, I don't know why that stuff is in system and not in toolbar, should be easy enough to move, I guess including claro_system_module_invoked_library_info_alter() in claro.theme.
Comment #18
andypostI bet there's one more blocker - who is willing to maintain it in contrib
Comment #19
ressaI see the Drupal 6 module https://www.drupal.org/project/toolbar, perhaps it can be Drupal core Toolbar's new home?
@dydave maintains https://www.drupal.org/project/admin_toolbar and I made him aware of this issue in #3565206: [Meta] Roadplan for Admin Toolbar 3.7 and 4.x, as a potential maintainer.
Comment #20
catchThat was originally a backport of the Drupal 7 module, makes sense to keep the namespace the same as core's.
Comment #21
dydave commentedAs mentioned by my contrib partner @ressa above at #19, I've been maintaining the Admin Toolbar module for more than a year now and would certainly be interested in helping maintaining the Toolbar module if it moves over to contrib.
Feel free to add me directly as one of the maintainers, if you'd like, or please let me know if you would like me to formally apply in module's issue queue, I would be glad to do so.
Congrats everyone for all the great work and efforts getting core Navigation stabilized. 🥳
Thanks in advance! 😊
Comment #22
quietone commentedComment #23
longwaveRunning into #4 over at #3575909: Remove the Settings Tray dependency on Toolbar - settings tray doesn't really work without toolbar, looks like we either need to make settings tray work with Navigation instead, or remove settings tray as well.
Comment #24
berdirThe toolbar/claro stuff in system module is fully moved to toolbar module in #3579899: Remove remaining claro.theme functions, but we likely need a follow-up to that to clean up a few things around that such as hardcoded core/themes/claro paths (this will not prevent removing toolbar, but it will need to fixed eventually before claro is moved)
Comment #25
quietone commentedComment #26
quietone commentedComment #27
quietone commentedComment #28
quietone commentedComment #29
quietone commentedComment #30
gábor hojtsyComment #31
quietone commentedComment #32
quietone commentedComment #33
dydave commentedRe #21:
I've contacted the contrib Toolbar module maintainer who kindly granted me maintainer's rights, see:
#3607179: Applying for 'Maintainer' role for the project Toolbar
I went ahead and imported the core toolbar module with its complete history with the command:
git filter-repo --subdirectory-filter core/modules/toolbar/into the 1.x branch in contrib Toolbar module's repo:
https://git.drupalcode.org/project/toolbar/-/commits/1.x
I'll make basic adjustments to the info, composer.json, .gitlab-ci files to get a minimal DEV release, which should allow unblocking the D12 compatible DEV for Admin Toolbar (4.x).
Comment #34
quietone commentedComment #35
quietone commentedComment #36
gábor hojtsyAdded tests part 2 to issue summary.
Comment #37
gábor hojtsyI fed the current diff of #3611762: Move toolbar hook implementations to the toolbar module and #3612474: Move toolbar integration tests to toolbar module, part 2 to Claude (with Sonnet 4.6) to find any other missing gaps. It found these that seem like are not already covered:
contextual/tests/EditModeTest.phpsystem/tests/Theme/ToolbarClaroOverridesTest.phpthemes/claro/claro.info.ymlthemes/default_admin/default_admin.info.ymlthemes/default_admin/src/Hook/ThemeHooks.phpThere are also these shortcut module mentions that I don't think need to be done given that shortcut also is moving to contrib.
shortcut/src/Hook/ShortcutHooks.phpshortcut/tests/ShortcutCacheTagsTest.phpshortcut/tests/ShortcutTestBase.php$modules = ['toolbar', 'shortcut']shortcut/tests/ShortcutTranslationUITest.phpComment #38
catchPretty sure the contextual test should either be moved to toolbar or deleted, per #3465295: Integrate Top Bar Navigation with Contextual editing where it was decided not to implement similar functionality in navigation.
Comment #39
gábor hojtsyAdded #3614955: Move library overrides for Toolbar from Claro and Default Admin to Toolbar for the library overrides, it seems pretty straightforward to move them from both Claro and Default Admin to Toolbar. Gets rid of some 'gin' mentions of default_admin even and also noticed that a CSS file was added by Default Admin that did not even exist. See there.
Comment #40
gábor hojtsyThe contextual clicking integration test is already handled in #3612474: Move toolbar integration tests to toolbar module, part 2 by being removed, so that satisfies @catch's note in #38 :) No need to open an issue for that. So I think everything in #37 is now covered.
Comment #41
quietone commentedThe issue to remove Toolbar has an MR and can help find what needs to be changed to deprecate Toolbar. #3586211: Remove the Toolbar module
Comment #42
quietone commentedCurrently, one child left before the actual deprecation.
Comment #43
quietone commentedComment #44
quietone commentedIf there are not more instances of the module being used then this ready for the actual deprecation.
Comment #45
gábor hojtsyI found the following (used LLM to assist me, but verified the found code paths and even manually tested some stuff):
Will be removed with the Shortcut module, should be done before Toolbar IMHO, so it stays in contrib Shortcut:
1.
ShortcutHooks.php:71— uses#[Hook('toolbar')]and thetoolbar_itemrender element2. Shortcut tests heavily use Toolbar.
ShortcutTestBase.php:20,ShortcutTranslationUITest.php:43,ShortcutCacheTagsTest.php:32and multiple shortcut tests grant'access toolbar'permission.Should still be moved to the Toolbar module to not loose these integrations
The backend parts of these were attempted to be moved in #3611762: Move toolbar hook implementations to the toolbar module but in many cases the utility classes, CSS/JS libraries, etc. stayed around with the modules apparently.
1. We already accepted the regression of announcements not appearing in the default toolbar (in Drupal CMS they are prominent on the dashboard). The base toolbar hook was moved but
AnnouncementsFeedToolbarHooks.php:22still implementshook_toolbar_alter()andLazyBuilders.php:48— uses toolbar CSS classes andannouncements_feed/drupal.announcements_feed.toolbarlibrary.2. User module integration in
user.services.yml:53— definesuser.toolbar_link_builderandToolbarLinkBuilder.phpitself, despite the hook already moved to Toolbar.3. Contextual menu integration for Toolbar has this toggle feature that shows ALL the contextually editable things. Navigation does not implement this. It was decided in #3465295: Integrate Top Bar Navigation with Contextual editing 2 years ago not do that. The hook implementation was moved to Toolbar already but
contextual.libraries.yml:25was not.4. Workspaces UI module has integration with Toolbar. The hook implementation was moved already but
WorkspacesUiLazyBuilders.php:44remained. It usestoolbar-item,toolbar-iconCSS classes andworkspaces_ui/drupal.workspaces_ui.toolbarlibrary.Should be removed at the same time as the Toolbar module:
1. Default Admin integration (this does not exist as contrib, so should be removed alongside Toolbar removal in core).
PreprocessHooks.php:650uses$this->currentUser->hasPermission('access toolbar'),ThemeHooks.php:222overridestoolbarandmenu__toolbartheme registry paths,PreprocessHooks.php:1223—#[Hook('preprocess_toolbar_user_picture')]and template overrides incore/themes/default_admin/templates/navigation/.2. Various small overrides and mentions.
core/themes/claro/templates/navigation/toolbar-warning.css, toolbar component CSS, toolbar template override@see toolbar_page_top()docblock referencescore/misc— comments indisplace.jsand off-canvas CSS mentioning toolbarComment #46
gábor hojtsyI opened #3618746: Toolbar uses in Announcement, User, Contextual and Workspaces for the ones that still need moving (where we already moved hooks in #3611762: Move toolbar hook implementations to the toolbar module but left around other integrations.
Comment #47
gábor hojtsy@quietone opened and started working on the toolbar alter in announcements feed at #3618772: Move toolbar_alter hook implementations to the toolbar module, left some feedback there.
Comment #48
quietone commented@dydave, can you create the contrib module for this? Item #4 in the Issue Summary has some links for this.