Problem/Motivation

I'm using Navigation module and toolbar module is normally disabled. Workbench module has re-enabled toolbar, but it is not shown at all because navigation is enabled.

Steps to reproduce

Proposed resolution

  1. Remove dependency on toolbar module
  2. Add compatibility with Navigation module.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#7 workbench_nav.patch1.23 KBrtvenge

Comments

marc.bau created an issue. See original summary.

agentrickard’s picture

Status: Active » Closed (won't fix)

Toolbar is a core feature.

marc.bau’s picture

Status: Closed (won't fix) » Active

Navigation bar is a Core Module and is default in v11 as I know. It is experimental in 10.3, but honestly it works sooo great - there is no need wait and not using it. This is a massive usability step forward - i install it on every site. No issues yet except Workbench.

agentrickard’s picture

Still marked as experimental in 11.x

https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/navig...

I'd be happy to review an MR though.

agentrickard’s picture

I will also note that I reviewed the module and it has no API and no clear means for adding items.

* How do we add a menu group?
* How do we make the menu group expandable?
* How do we add an icon?

I would wait until it is stable and those are provided, as they are in Toolbar now.

marc.bau’s picture

From my understanding this is just core menu api. Add the menu items and routes and we are done… not that complicated.

rtvenge’s picture

StatusFileSize
new1.23 KB

I was able to get the menus added to the Navigation. See attached patch.

This patch doesn't take into account sites still using Toolbar but I wasn't sure how to keep both concurrently (Do I just duplicate all and rename?). Any advice on that would be helpful.

agentrickard’s picture

Status: Active » Needs work

We might have to use dynamic routing to support both. See https://www.drupal.org/docs/drupal-apis/routing-system/providing-dynamic.... With that approach, we could dynamically set the path based on whether Toolbar or Navigation were installed.

I still don't quite understand if Navigation will ever get past its "Experimental" status, especially given https://www.thedroptimes.com/49399/drupal-core-adopt-gin-admin-theme-rep...

agentrickard’s picture

It looks like we can use hook_menu_links_discovered_alter()

See #3524476: Support the gin theme for an example.

tomefa’s picture

The patch make the workbench menu appear with navigation module.

From Drupal 11.3 release note: https://www.drupal.org/project/drupal/releases/11.3.0

Navigation is now stable

The Navigation module is now stable and safe for use on production sites. Navigation provides a collapsible, vertical sidebar for Drupal's administrative user interface. It is a significant improvement for Drupal's administrative user experience.

Navigation will replace Drupal's existing Toolbar in the Standard profile in a future release.

The actual patch is a bit simple and the implementation in https://www.drupal.org/project/workbench/issues/3524476 looks better but actually limited to gin_toolbar.
Would be good to make it similar for the navigation module and also remove the dependency to toolbar as it will be disable in the futur in drupal core.