Improve the clarity about the navigation block overview page and the "Place navigation block" dialog modal

Created on 5 April 2024, 9 months ago
Updated 26 April 2024, 8 months ago

Problem/Motivation

If you get onto /config/user-interface/navigation-block you see Shortcuts in the Navigation category and Content and Administration in the Menus category.

If you are trying to map those navigation blocks to the sections available in the sidebar you see the Shortcuts section, then the Content section and finally the Administration section. It you disable the Administration section under the assumption the block at the bottom with the menu items Help and the username might belong to the Administration navigation block, it turns out it does not. The block at the bottom is fixed and an implicit given navigation block, which is not clearly communicated out of the box, or better at all.

If you press now the Place navigation button, the dialog modal (/admin/config/user-interface/navigation-block/library?region=content) is presenting you a list of six menu blocks from the standard installation profile and two navigation blocks provided by the navigation module itself.

For each of the eight blocks you have a Place navigation block button, but you have no way to directly see within this modal view which of these blocks is already in use and building the current navigation in the sidebar - you have to actually remember, in case of a small working memory that can be challenging endeavor.
Beyond that, even though you don't have a User navigation block listed on /admin/config/user-interface/navigation-block, in the modals list you actually have two navigation blocks in relation to the user, User account menu in the Menus category and User in the Navigation menu category which is a bit of a head scratcher. If you don't want to assume something you have to actually manually test and as it turns out if you add the User navigation block you have a duplicate of the menu already placed at the bottom of the sidebar which is not listed on /admin/config/user-interface/navigation-block. In general it has to be noted that you are able to add any of those menus x number of times.

Steps to reproduce

  1. go to /admin/config/user-interface/navigation-block/library?region=content
  2. click the Place navigation block button for the Footer block
  3. Click Save navigation block button

Repeat those three steps another one or two times

Proposed resolution

On /config/user-interface/navigation-block

:
One approach might be to simply add the User navigation block to the list so you get by default the following order:

  1. Shortcuts
  2. Content
  3. Administration
  4. Use

The only detail I am not sure if it is possible to disable the ability to change the order of a single component in those vertically sortable lists?

On /admin/config/user-interface/navigation-block/library?region=content

Option A: only one instance per available block allowed
I would only show the Place navigation block button for those blocks that have not been added yet, either just remove the button or replace it with a label with something like Already added. as an alternative you could also just hide already added navigation blocks entirely and only show navigation blocks not added yet.

Option B: more than one instance per available block allowed
If there is the need/requirement to add one of the blocks a second time (or even more times) it might be a good thing to either add some sort of confirmation step or add a fourth column with how many times a navigation block is already added?

Each of the options would provide some sort of guard rails to the user enabling them to make an informed decision.

Terminology

Probably out of scope for this issue and might need a follow up, but i wanted to note about an inconsistency in the context of blocks. On the Block Layout page the verb "place" is used (Place block) same as the navigation module, while in Layout Builder the verb "add" is used (Add block). Ideally the verb should be consistent.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Closed: outdated

Version

1.0

Component

User interface

Created by

🇩🇪Germany rkoller Nürnberg, Germany

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024