PageTemplate: allow configuring which regions are exposed

Created on 8 January 2025, 12 days ago

Overview

I think we should make two quick hard-coded fixes for now, and then figure out how to abstract and provide UI affordance in a follow-up:

  • Don't render the Highlighted region within the canvas. It can still be in the layers panel.
  • Don't render the Help block within the canvas. It can still be in the layers panel.

My premise here is that what editors generally want to see in the canvas is what their site visitors will see under typical circumstances, not what only other admin users will see or what site visitors will see only under rare circumstances. There's plenty of gray area around this, but the above two items seem pretty clear cut to me, and I wonder how much closer the canvas will get to the preview with just those two fixed.

— @effulgentsia at #3497990-2: The XB canvas incorrectly renders blocks (and their corresponding margins as specified by the theme's CSS) that usually have empty content for most/all site visitors

I agree with the premise set by @effulgentsia in #2. There was already some related discussion in 📌 Add support for global regions Active on this.

Content creators not seeing the site as the site visitor is a pain point that comes up consistently in interviews with users. There are several actions that are already on the way to make the rendered preview represent more closely what an actual visitor of the site would see.

We are already moving local tasks from the page to the navigation in Drupal Core in Create the Top Bar Needs review . The goal would be to do the same for local actions.

Messages may need a special case along with main content and help because they are usually not changed after the initial configuration. The initial configuration could be done by a developer.

— @lauriii at #3497990-3: The XB canvas incorrectly renders blocks (and their corresponding margins as specified by the theme's CSS) that usually have empty content for most/all site visitors

Proposed resolution

  • Build upon this single checkbox:
  • … upon checking it, show a list of checkboxes: one per region, to allow opting specific regions out from editing through XB.
  • This information could trivially be stored in the PageTemplate config entity.
  • … we could then automatically respect that in ApiLayoutController + ApiPreviewController

User interface changes

TBD

📌 Task
Status

Active

Version

0.0

Component

Page builder

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024