Created on 16 August 2023, 11 months ago
Updated 4 April 2024, 3 months ago

When we activate the layout paragraphs option "Require paragraphs to be added within a layout" the add section button is superimposed on top of the + button.

With Mercury editor

With normal widget and without mercury

With experimental widget and without mercury

It seems that part of the problem comes because in the Mercury editor there is a padding at 0 (.lpb-layout), that in the layout paragraphs is at 20px.

I could create a patch to remove this, but I understand that this padding was removed to bring the content preview closer to the final version.

So I don't really know how to proceed, can you think of a solution to this problem?

πŸ› Bug report
Status

Active

Version

2.1

Component

User interface

Created by

πŸ‡ͺπŸ‡ΈSpain Carlitus

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

Comments & Activities

  • Issue created by @Carlitus
  • πŸ‡ͺπŸ‡ΈSpain Carlitus

    Another issue with this.

    If i have a layout inside a layout i cannot see the controls of the first level layout. But when saving the .lpb-layout with padding 0 of the modules/contrib/mercury_editor/build/css/preview-screen.css disapears and with the padding 20px i can see well the layout controls.

    Provisional solution:

    function hook_library_info_alter(&$libraries, $extension) {
      if(!empty($libraries['preview_screen'])) {
        unset($libraries["preview_screen"]["css"]["component"]["build/css/preview-screen.css"]);
      }
    }
    
  • πŸ‡ΊπŸ‡ΈUnited States esch

    Another option is changing the min-height to 60px, from layout paragraphs builder.css => .js-lpb-region class. However, this still takes away how close it resembles the final rendering.

  • πŸ‡¬πŸ‡§United Kingdom rachelf

    Another provisional solution is to only add the padding when hovering over a layout section:

    .lpb-layout:hover {
      padding: 40px 0;
    }
    

    This keeps the preview closer to the final version.

Production build 0.69.0 2024