Enabling XB for managing page template breaks Olivero header

Created on 10 February 2025, about 2 months ago

Overview

After installing XB and enabling it for managing global regions, the Olivero header looks like this:

Proposed resolution

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇫🇮Finland lauriii Finland

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

Comments & Activities

  • Issue created by @lauriii
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Added screenshot to show what it should look like instead.

    I bet either:

    • XB is messing up the markup somehow
    • Olivero is expecting specific markup, including expectations of BlockPageVariant being used

    The latter is easily confirmed:

      const searchWideButtonSelector =
        '[data-drupal-selector="block-search-wide-button"]';
      const searchWideButton = document.querySelector(searchWideButtonSelector);
      const searchWideWrapperSelector =
        '[data-drupal-selector="block-search-wide-wrapper"]';
      const searchWideWrapper = document.querySelector(searchWideWrapperSelector);
    

    core/themes/olivero/js/search.js

    which is targeting markup literally only available in core/themes/olivero/templates/block/block--secondary-menu--plugin-id--search-form-block.html.twig 😅

    And that Twig template is specifically targeting a Block config entity in the secondary_menu region with using the search_form_block plugin ID.

    Conclusion

    Olivero is heavily tightly coupled with the Block module. 😱

    I don't see how this is possible to solve without either:

    • hardening Olivero
    • duplicating a lot of Olivero inside XB… 😱
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    This is what @lauriii indicated in DM.

Production build 0.71.5 2024