Define how to handle secondary local tasks in entity pages when Navigation Top Bar is enabled

Created on 16 January 2025, about 2 months ago

Problem/Motivation

Navigation Top Bar moves the local tasks to an options dropdown in entity pages.

While working on 📌 [PP1] Move the Edit buttonoutside the more actions drop down Postponed , it was found that modules like Devel introduce 2nd level local tasks that were not considered in the initial implementation, since that scenario is not provided by any core module.

In this scenario, only 1st level local tasks are moved to the dropdown, like in this screenshot:

When clicking on the "Devel" option, user is redirected to the main 2nd level local task, but links to the rest of tasks is lost.

Steps to reproduce

  • Install a Vanilla Drupal 11 site
  • Enable Navigation Top Bar & Devel modules
  • Create a node and visit the "Devel" action from the top bar
  • Confirm that Devel secondary action links are not shown
  • Disable Navigation Top Bar
  • Confirm that Local tasks are visible again and when selecting the "Devel" task 2nd level items are displayed

Proposed resolution

Not defined yet.

Remaining tasks

Define how this scenario should be addressed from the technical and UX perspective.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

navigation.module

Created by

🇪🇸Spain plopesc Valladolid

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

Comments & Activities

  • Issue created by @plopesc
  • 🇪🇸Spain ckrina Barcelona

    We've added this to the admin UI design backlog, but with lower priority since it isn't a Navigation Stable blocker and no core modules need 2nd level items. The first idea was implementing a drop-down, but we are not sure if that's really the best UI pattern based on the problems it should solve. Also in the future we’ll need to evaluate if we want to keep dividing the drop down from the right sidebar on entities as two different things, and if so define clear rules.

    Changing the priority to Minor for now.

  • 🇪🇸Spain ckrina Barcelona
  • 🇪🇸Spain plopesc Valladolid

    Made a couple of simple proposals to try to unblock this one:

    When there are 2 level tasks, show the 1st level in the page actions drop down and shown the 2nd level tasks as 2nd level tasks, like in the original behavior:

    When there are 2 level tasks, show the 1st level in the page actions drop down and shown the 2nd level tasks as 1st level tasks, promoting them one level:

    Any of these options would not need to define any extra design, nor define complex behaviors. They just set a rule about how to deal with the 2nd level local tasks in a generic way.

  • 🇪🇸Spain ckrina Barcelona

    We just discussed it with @plopesc and this still needs some definition in terms of UX for the different situations this would end ups giving a solution to, so it needs to be addressed more holistically and taking into account the changes XB is bringing into the future of the UI. So postponing this as "Needs design" since we'll work on defining it first.

  • 🇷🇴Romania amateescu

    While this is still in the design phase, I'd like to point to an issue from the Trash module, which uses 2nd level tasks for each trash-enabled entity type. The problem raised there shows that there could be as many as 15-20 2nd level tasks, and it probably won't work very well with the proposal from #4.

Production build 0.71.5 2024