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
- Quick edit: #2948828: Layout Builder's Field Blocks do not work with Quick Edit
- Commerce: #2952529: Support for Layout Builder module
UI: #2916877: Update Layout Builder CSS to match updated mockups
Summary of blocking/related issues:
- #2948828: Layout Builder's Field Blocks do not work with Quick Edit
- #2952529: Support for Layout Builder module
- #2916877: Update Layout Builder CSS to match updated mockups
- #2948064: Layout Builder should support inline creation of Custom Blocks using entity serialization
Add a way for editors to switch displays- #2821008: [bootstrap] Add support for the Off-canvas dialog used by Settings Tray and Layout Builder
- #2936358: Layout Builder should be opt-in per display (entity type/bundle/view mode)
- Migration/update path for config and content (Issue TBD)
- Migration/update path benchmark
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
Comment #2
balsamaComment #3
balsamaComment #4
balsamaComment #5
balsamaComment #6
balsamaComment #7
damienmckennaI'm really excited to see this, thank you!
One thing to note:
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.
Comment #8
balsamaThanks @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.
Comment #9
balsamaWe 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...
Comment #10
bisonbleu commentedI'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?
Comment #11
roberto_araya commented#10 +1
Comment #12
tim.plunkettThat is not a bad idea. It's a good idea. It's why we're working so hard on a migration path.
Comment #15
balsamaAn 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:
Comment #16
balsamaComment #17
bkosborneThe 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
Comment #18
damienmckennaI updated the summary to reference "change displays" instead of "change view modes", which is more accurate to what content staff want to do.
Comment #19
bkosborneBut to be clear, what would happen under the hood is actually changing the view mode, right?
Comment #20
damienmckennaNo, it wouldn't switch the view modes, it's an extra layer, like how Panelizer does it on D7.
Comment #21
balsamaUpdated IS.
Now that we have feature parity with LL 1.x, we can release a beta. There are some underlying issues that should be committed first though.
List of beta blockers
Core issues:
Lightning/Lightning Layout:
Comment #22
balsamaThis shipped with Lightning Layout 2.x and Lightning 4.x on 16 May.