Problem/Motivation

Navigation module provides a flexible system to manage the blocks shown in the Navigation Bar. However, it can be confusing for site admins that they have to manually add the Navigation blocks provided by other modules, or even they won't notice that other modules are providing those blocks.

The aim of this issue id to provide a simple system that will allow modules to add Navigation Blocks in a similar way as recipes do in #3478224: Provide Config Action to add new blocks to navigation from recipes. In this way, block are added to the Navigation Bar, and editors afterwards can decide whether the blocks can be moved or removed from the bar.

Dashboard and it's Dashboard block is a good example for this new feature.

Proposed resolution

Create a new hook navigation_deafults that allows to define Navigation blocks that will be added to Navigation when the module providing the logic in installed.

Remaining tasks

Finish definition
Test POC

User interface changes

None

Introduced terminology

None

API changes

Add a new hook defined in Navigation module to declare the default blocks.

Data model changes

Release notes snippet

CommentFileSizeAuthor
#12 3491081-nr-bot.txt91 bytesneeds-review-queue-bot

Issue fork drupal-3491081

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

plopesc created an issue. See original summary.

plopesc’s picture

Status: Active » Needs review
penyaskito’s picture

Status: Needs review » Needs work

This would be super useful for a bunch of modules. Not having this logic in navigation means having to duplicate it elsewhere (dashboard that I'm aware, potentially workspaces, environment indicator, etc).

Added some comments, but nothing should be blocking. New feature has test coverage.

Hope this can make it to 11.1.

penyaskito’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +Drupal CMS release target

LGTM then.

Wondering if there should be an issue for adding the 'plugin.manager.config_action' service to core.services.yml to allow autowiring or if this was intentional.

This is not strictly speaking a Drupal CMS blocker as there are workarounds, but definitely is a nice to have.

penyaskito’s picture

Neat!

penyaskito’s picture

Status: Reviewed & tested by the community » Needs work

Just remembered about $is_syncing. We don't want duplicated blocks.

plopesc’s picture

Status: Needs work » Needs review

I did not realize until you mentioned it. Great catch!

Changes added to the MR.

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

Left some minor feedback on the MR, this is really nice!

plopesc’s picture

Status: Needs work » Reviewed & tested by the community

Thank you for your review @larowlan. I think the feedback has been addressed.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

plopesc’s picture

Status: Needs work » Reviewed & tested by the community

Back to RTBC once conflicts have been solved.

  • larowlan committed 999063c1 on 11.x
    Issue #3491081 by plopesc, penyaskito, larowlan: Allow other modules to...
larowlan’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 11.x - thanks
Discussed backport with @catch and decided not needed because this isn't a stable blocker

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.