Problem/Motivation

Layout builder is now in core and offers much of the same functionality of Panels and Panelizer - which Lightning Layout currently uses. Layout Builder also has the following advantages:

  • UI improvements
  • Larger community working on it

In addition, the current solution has the following known bugs which should be solved by using Layout Builder (confimation needed?):

Proposed resolution

  • Provide a branch of Lightning Layout that uses core’s Layout Builder instead of Panels and Panelizer.
  • Once we have a stable release and migration path, support security releases on the legacy branch for the current and one more minor Drupal version.
  • Work with the community to provide a stable migration or update path to Layout Builder for existing panelizer-defined layouts and document the specific steps to use within the context of Lightning.
  • At the end of life for the legacy branch, provide a final release that allows you to uninstall Lightning Layout entirely while keeping the underlying modules enabled for users that don't want to or cannot migrate.

Remaining tasks

Feature Parity

  • Provided OOTB by Layout Builder in 8.7
    • ✅When I create a one-off page I want to be able to add blocks and position them for just that page so both the layout and the content are unique
    • ✅When I edit a content type, I want to set a default layout that suits the fields in that type so my content type layouts vary in a way that makes them quickly identifiable
    • ✅Create block content from within the provided UI: #2957425: Allow the inline creation of non-reusable Custom Blocks in the layout builder
  • ✅Need some way for editors to switch between predefined layouts. (When I create content I want to be able to choose a layout for just one post, so I can use layout to visually emphasize something unique about the content) https://www.drupal.org/project/layout_library
  • ✅Easily embed any entity (Same solution as before: Entity Block)

Migration/update path

Several community members are interested in contributing to the migration/update. Lightning can leverage and hep with that work. Notes:

  • It would likely live in the 5.x branch of Panelizer.
  • Need to decide if a migration is actually necessary, or if it’s prudent to handle this with the hook_update system.
  • Some migrations would actually only be config (if a site has no overrides - only panelizer-defined layouts). Most would include massaging and moving data on individual content entities. For the latter, we need to make sure we have specific steps that work well on sites that use a VCS to manage and deploy configuration. Perhaps Panelizer could remain installed after the migration to mitigate some of the problems - with the code that affects the Manage display tab removed so as not to interfere with Layout builder.
  • Since the migration/update will need to be performed on production databases (at least for typical sites which have overrides) it would be nice to have some benchmarks on the migration so that people know what to expect in terms of time.

Incompatibilies

The Bootstrap theme is not currently compatible with core’s Settings Tray. Users of Bootstrap will have significantly degraded UI. Workarounds may exist. See #2821008: [bootstrap] Add support for the Off-canvas dialog used by Settings Tray and Layout Builder for more info.

Known Issues

Summary of blocking/related issues:

User interface changes

  • The IPE would be replaced by the Layout Builder UI. The Layout Builder appears on a separate tab and makes use of core’s Settings Tray.
  • The Panelizer wizard would be replaced with the Layout Builder UI as well.
  • Initiating the configuration of a layout on the Manage display tab is slightly different, as is allowing editors to define layouts.

API changes

If you use Lightning API to retrieve information about layout configuration, the endpoints will change.

Data model changes

  • Entity bundles that currently have panelized displays would have their config migrated to individual view modes.
  • Overrides currently stored in the Panelizer field would be moved to the Layout Builder-provided field and the contents would be modified to be compatible with Layout Builder.

Comments

balsama created an issue. See original summary.

balsama’s picture

Issue summary: View changes
balsama’s picture

Issue summary: View changes
balsama’s picture

Issue summary: View changes
balsama’s picture

Issue summary: View changes
balsama’s picture

Issue summary: View changes
damienmckenna’s picture

I'm really excited to see this, thank you!

One thing to note:

Need some way for editors to switch between predefined layouts. Ultimately this means switching the display mode on the default route.

I disagree this needs to involve switching the display mode, IMHO it's shoehorning two separate things (display purpose, display selection) together that should be kept separate.

balsama’s picture

Issue summary: View changes

Thanks @DamienMcKenna. I removed that sentence since the second option below it captures the possibility of switching view modes to solve. Sounds like Layout builder library or something similar is a more favorable solution and wouldn't conflate display purpose with selection. Thanks.

balsama’s picture

We held a Layout sprint in Boston the week of 30 April. The summary can be found here:
https://docs.google.com/document/d/1IX-yGjHBHmwa-ZXgOe-V90HYWiyzI7T5soGE...

bisonbleu’s picture

I'm following this issue with interest. I'm asking myself: «to panelize or not to panelize» ?

Context. I'm starting a small project with a delivery by end of Q2 of this year. The project uses Acquia's Lightning distro. By default, Lightning comes with a Landing Page content type which uses Panelizer.

My question: Layout Builder is currently labelled under Core (Experimental) so it's probably not a good idea to use it in production. Because of this, I've decided to go ahead with Panelizer. Is this a bad idea given what is suggested in the present issue?

roberto_araya’s picture

#10 +1

tim.plunkett’s picture

That is not a bad idea. It's a good idea. It's why we're working so hard on a migration path.

  • phenaproxima authored e5ed091 on 8.x-2.x
    Replace Panels and Panelizer with core's Layout Builder (Issue #2952620...

balsama’s picture

An alpha of this functionality is now available here: https://www.drupal.org/project/lightning_layout/releases/8.x-2.0-alpha1

composer require 'drupal/lightning_layout:^2.0'

Known issues:

  • There is currently no ability to define and choose from multiple layouts.
  • There is currently no migration path from the 1.x branch (panels/panelizer).
  • The block categories/labels should be improved.
balsama’s picture

bkosborne’s picture

The IS has "Add a way for editors to switch view modes (Issue TBD)". I believe that issue is this one: https://www.drupal.org/project/layout_library/issues/2972041

damienmckenna’s picture

Issue summary: View changes

I updated the summary to reference "change displays" instead of "change view modes", which is more accurate to what content staff want to do.

bkosborne’s picture

But to be clear, what would happen under the hood is actually changing the view mode, right?

damienmckenna’s picture

No, it wouldn't switch the view modes, it's an extra layer, like how Panelizer does it on D7.

balsama’s picture

Status: Active » Fixed

This shipped with Lightning Layout 2.x and Lightning 4.x on 16 May.

Status: Fixed » Closed (fixed)

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