Layout builder style should belong to Layout settings

Created on 15 April 2021, almost 4 years ago
Updated 13 March 2025, 25 days ago

Problem/Motivation

Layout builder style is adding the selection outside of the Layout Settings in the form alter. Drupal core has an entry for Layout settings so it seems logicial that Layout builder styles should be inside.
It doesn't really matter in term of functionality but it doesn't seem right, and it will break some themes like gin layout builder.

Steps to reproduce

Proposed resolution

Change the form alter to add the select inside the layout settings.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France asherry

    phjou I wonder if the need for this is maybe related to the actual theming of the widget in the admin? I stumbled upon this ticket because for us the styles widget looks like this:

    If it is, then as it turns out this is specific to the gin theme. Here is a screenshot of the same field with claro:

    Furthermore to bkosborne's point, these style settings are not associated nor stored with the plugin settings. If they were they would have to be associated with only certain plugins like the TwoColumnLayout in core for example. Those plugins are what create that part of this form. The style settings in this module can be restricted but they are completely independent of any particular plugin.

    I realized that this becomes even more evident with blocks. When you edit an inline block in layout builder the block entity edit form is embedded which will save data back to the block content entity itself. These settings are saved in a serialized array of metadata in the node__layout_builder__layout table. It actually is probably better that these form fields appear very different and separated in the UI so that it is clear the data is very different.

    I know I'm not a maintainer but I'm going to label this as works as designed unless there was some other purpose for this phjou. This is for my reference more than anything.

Production build 0.71.5 2024