Remove Layout Builder dependency for the config and rendering of the Navigation sidebar

Created on 25 April 2025, 4 months ago

Problem/Motivation

In πŸ“Œ Remove Layout Builder dependency for the UI of Navigation admin config Active we remove the UI part of LB dependency, here we need to update the config format and rendering to remove the LB dependency.

This means that a new config format is needed, that is understandable by the moderns display builders being worked on, like XB and the PHP necessary to process this config into HTML will need to be brought in core.

Steps to reproduce

Save the navigation configuration, and check the config format being stored.

Proposed resolution

  1. Define the new config format for modern display builders
  2. Use it here
  3. Bring in the supporting PHP necessary to render that config into HTML

Remaining tasks

User interface changes

none

Introduced terminology

probably a lot

API changes

probably quite a few things

Data model changes

Config format stored for the navigation config

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

navigation.module

Created by

πŸ‡«πŸ‡·France nod_ Lille

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

Merge Requests

Comments & Activities

  • Issue created by @nod_
  • πŸ‡¬πŸ‡§United Kingdom catch

    Adding some related issues from the XB issue queue.

  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 184s
    #484611
  • πŸ‡³πŸ‡±Netherlands casey

    I've created a MR that removes the dependency on layout_builder while keeping the same config format for navigation.block_layout. The dependency is removed by simply calling the Layout and Block plugin managers directly.

    The UI is still to be replaced. I only emptied navigation LayoutForm and added a new route "navigation.layout" to replace "layout_builder.navigation.view".

  • Pipeline finished with Failed
    4 months ago
    Total: 271s
    #484614
  • Pipeline finished with Failed
    4 months ago
    Total: 402s
    #484732
  • Pipeline finished with Failed
    4 months ago
    #485592
  • Status changed to Needs review 11 days ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    This currently moves down the dependency to layout_discovery. Is that a module that stays around in core? (There are a lot more criteria of course, but it is also not depended on by Experience Builder or UI Suite that I could find at least).

  • 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.

  • πŸ‡¬πŸ‡§United Kingdom catch

    @gΓ‘bor hojtsy layout_discovery provides the layout plugin manager service definition.

    πŸ“Œ Add support for layout plugins Active doesn't depend on the layout_discovery service but it does depend on the same layout plugin manager class that the service uses (which is in Drupal\Core).

    So I think that even if we eventually deprecate the layout_discovery module, the layout plugin manager itself will need to exist for quite a long time to support the just in time layout builder -> xb upgrade path. That could mean that navigation module ends up adding it's own version of the layout plugin manager or something like that - but it should be a relatively small incremental step to remove that dependency if/when we get to that point.

Production build 0.71.5 2024