Move layout builder to submodule, make middleware-only base module

Created on 31 October 2022, over 1 year ago
Updated 25 February 2023, over 1 year ago

Problem/Motivation

The module currently has a hard dependency on layout builder. But Tailwind is incredibly useful in other contexts too, without the complex layout builder.

E.g. I want to use Layout Paragraphs → (this uses layout discovery, but not layout builder) with Style options → (which uses YAML config files to generate the editor UI/inject classes into layout discovery templates and into paragraph templates) instead of Layout Builder.

Another common use-case might be "fake" inline styles in CKeditor using Tailwind's arbitrary value injector (stuff like <p class="custom-one-off-styling pt-[41px] lg:pt-[42px] bg-[#1da1f2]">... for experienced editors

Proposed resolution

Create a sub-module for the layout builder integration, leave only the scraping middleware and the style injector in the base module.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇦🇹Austria hudri Austria

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.

  • 🇳🇮Nicaragua edysmp Nicaragua

    I'm also getting:

    Error: Class "Drupal\layout_builder\LayoutBuilderEvents" not found in /var/www/html/web/modules/contrib/tailwindcss_utility/src/EventSubscriber/SectionSubscriberRenderArray.php
    

    It seems the module doesn't set the `drupal/layout_builder` as a dependency.

  • heddn Nicaragua

    Let's roll a patch for at least the undocumented layout builder dependency. alternatively, a patch to unravel the dependency into a sub module.

Production build 0.69.0 2024