Add ability to set styles for section's regions

Created on 14 November 2019, about 5 years ago
Updated 19 February 2024, 9 months ago

Each section has an outer (.layout) and inner (.layout__region) wrapper by default. I'd like to be able to add classes not only to the outer wrapper, but also to the inner. This will help to customize layouts flexibly.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇩🇪Germany jakoloborodun Rostock

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • 🇺🇸United States pyrello

    Going to take a look at this.

  • @pyrello opened merge request.
  • 🇺🇸United States pyrello

    I used the existing patches as a guide for what to add and where, but ultimately they were too out-of-date to be applied. The underlying logic had changed quite a bit, so some rewriting was necessary. Also the patches contained some unrelated changes that I didn't think were important to capture as part of this update.

    What I pushed so far isn't working for me yet, but I'm not sure why. I figured I'd push what I have in case anyone else wants to take a look in the meantime.

  • Issue was unassigned.
  • 🇺🇸United States pyrello

    Not really sure why the tests are failing at this point.

    I took this on as an investigation to understand how we might use these options as an alternative for using a view to apply styles to a set of fields in a sidebar region. I don't think we are going to use this to solve that particular challenge, so I have put in about as much time as I can afford at the moment to move this forward. I still believe it is potentially valuable.

    There was not a lot of information in the IS, so I made some interpretive leaps with how this should be handled. I essentially made it so that regions could have their own styles by adding a new style type. Except for that the storage was set up that way, I don't really get why a style can only be of one type. It seems like it would potentially be useful for a style to be applied to a block, region, or section. Groups don't care about the style type, so you can adding styles with different types to the same group.

    Ultimately, I accomplished a lot of this by reusing existing code and making it work for looping through regions. There is definitely some refactoring that could happen to shrink the footprint.

    I updated the version because I'm assuming this new functionality will go into the most recent version of the module.

  • First commit to issue fork.
  • Merge request !21Resolve #3094344 "Set styles for region" → (Open) created by sakthi_dev
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.x + Environment: PHP 5.3 & MySQL 5.5
    last update 9 months ago
    Composer error. Unable to continue.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    6 fail
  • 🇮🇳India sakthi_dev

    Rerolled the patch.

  • Status changed to Needs review 9 months ago
  • 🇮🇳India ravi kant Jaipur

    The path is working for me.

    https://www.drupal.org/files/issues/2024-02-19/layout-builder-styless-cl...

    After apply patch navigate to Administration > Configuration > Content Authoring > Layout Builder Styles and add styles for region.

    The option for section configuration will be show as below.

Production build 0.71.5 2024