Problem/Motivation

Coming here from #3473343: Switch our base to Drupal 11.

Drupal CMS contains a core patch to the navigation module, to add default block config and implement an alter for dashboard support. Since navigation is in core and dashboard is currently in contrib (and Drupal CMS won't be able to have patches applied while also supporting automatic updates), it seems like the default config and alter hook could move to dashboard module instead.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork dashboard-3486246

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

catch created an issue. See original summary.

plopesc’s picture

I don't think we can ship that config change as part of the Dashboard module.

Would be great if we could get #3478224: Provide Config Action to add new blocks to navigation from recipes merged to allow to include the dashboard block as part of the corresponding Drupal CMS recipe. Another option would be to add the block to the navigation top programmatically, following the approach in #3463142: Allow modules to hook into top of content section of new core navigation.

plopesc’s picture

penyaskito’s picture

Created #3490031: Mark navigation dashboard block as navigation safe after #3443833: Provide a way for other modules to flag block plugin implementations as 'navigation safe' landed for the Drupal CMS use case.
I'd like to focus this issue on how to provide the block by default in any site with Navigation + Dashboard enabled.

For Drupal CMS this shouldn't be a blocker, as we can provide the config there or use the config action when it lands in the recipe.

penyaskito’s picture

Title: Support navigation module » [PP-1] Support navigation module
Status: Active » Postponed

This is postponed on #3478224: Provide Config Action to add new blocks to navigation from recipes landing.

I discussed this today with @plopesc. From all the alternatives, we have, my preference is still using the block.
We would need to implement hook_install (for adding the block), hook_uninstall (for removing the block), and hook_modules_installed (in case navigation is enabled AFTER dashboard).

penyaskito’s picture

Before we work on this, we should wait for #3491081: Allow other modules to include their own Navigation blocks during installation.
If that lands it would simplify a ton the work needed for this.
If it doesn't, we should use that MR code as a reference.

penyaskito’s picture

Status: Postponed » Active
penyaskito’s picture

Title: [PP-1] Support navigation module » Provide a block for Navigation top region on installation

penyaskito’s picture

Status: Active » Needs review

Now that we have hook_navigation_defaults hook in core is much easier to implement. This will only work on >=11.2 though.

penyaskito’s picture

I considered if we should provide an upgrade path adding the block.

But at this point there's a huge chance that people already managed their way to add the block.

As a workaround, they can uninstall navigation or dashboard, whatever doesn't hurt them, and re-install it.

plopesc’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! This is a nice improvement that will be very helpful.

  • penyaskito committed 69fc946c on 2.x
    Issue #3486246 by penyaskito, plopesc, catch: Provide a block for...
penyaskito’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks!

Status: Fixed » Closed (fixed)

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