Adjust how Help link and Content links are removed from the Administration menu for the Navigation bar

Created on 18 January 2024, 6 months ago
Updated 2 July 2024, 10 days ago

Problem/Motivation

The majority of the Administration menu (/admin/structure/menu/manage/admin) is displayed via the admin NavigationBlock plugin. There are two parts of the Administration menu that we put elsewhere, the Help menu item and the Content (and all of it's children) menu item.

The problem is the method by which we hide the Help link and Content menu items when displaying the Adminstration menu. We currently use hook_menu_links_discovered_alter to remove Help and Content menu links from the Administration menu. Using hook_menu_links_discovered_alter means that the Administration menu is altered everywhere the Administration menu is used instead of just the place we need it altered within the Navigation bar. For instance, when you go into the Admin UI for the Adminstration menu (/admin/structure/menu/manage/admin), those Help and Content links are gone. This could be very unexpected for other modules using the Administration menu.

Steps to reproduce

  1. Browse to the Adminstration menu UI (/admin/structure/menu/manage/admin)
  2. Take note of the Help and Content (and child) menu items
  3. Enable the Navigation module
  4. Browse to the Adminstration menu UI (/admin/structure/menu/manage/admin)

Expected result

  • Help and Content (and child) menu items display in admin UI
  • Help and Content (and child) menu items do not show in the admin NavigationBlock plugin instance in the Navigation bar

Actual result

  • Help and Content (and child) menu items DO NOT display in admin UI
  • Help and Content (and child) menu items do not show in the admin NavigationBlock plugin instance in the Navigation bar

Proposed resolution

Take cues from toolbar module for how it achieves the alterations to the Admin menu in order to shuffle parts of it around its UX. Namely avoid using hook_menu_links_discovered_alter and instead alter it on output as part of the admin NavigationBlock plugin.

Remaining tasks

Backend implementation.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

RTBC

Version

11.0 πŸ”₯

Component
NavigationΒ  β†’

Last updated about 10 hours ago

No maintainer
Created by

πŸ‡¨πŸ‡¦Canada m4olivei Grimsby, ON

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024