From f245f21ea664f22c81d8d28c6f0f4a42fb9a5890 Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Wed, 13 Jul 2022 13:38:28 -0400 Subject: [PATCH] Issue-2951547 layout builder off-canvas tray width --- .../modules/layout_builder/layout_builder.links.contextual.yml | 3 +++ .../layout_builder/src/Controller/ChooseBlockController.php | 1 + core/modules/layout_builder/src/Element/LayoutBuilder.php | 1 + 3 files changed, 5 insertions(+) diff --git a/core/modules/layout_builder/layout_builder.links.contextual.yml b/core/modules/layout_builder/layout_builder.links.contextual.yml index 4bbfcc9e64d..7feeba409d0 100644 --- a/core/modules/layout_builder/layout_builder.links.contextual.yml +++ b/core/modules/layout_builder/layout_builder.links.contextual.yml @@ -7,6 +7,7 @@ layout_builder_block_update: class: ['use-ajax'] data-dialog-type: dialog data-dialog-renderer: off_canvas + data-dialog-options: '{"width": 900}' layout_builder_block_move: title: 'Move' @@ -17,6 +18,7 @@ layout_builder_block_move: class: ['use-ajax'] data-dialog-type: dialog data-dialog-renderer: off_canvas + data-dialog-options: '{"width": 900}' layout_builder_block_remove: title: 'Remove block' @@ -27,3 +29,4 @@ layout_builder_block_remove: class: ['use-ajax'] data-dialog-type: dialog data-dialog-renderer: off_canvas + data-dialog-options: '{"width": 900}' diff --git a/core/modules/layout_builder/src/Controller/ChooseBlockController.php b/core/modules/layout_builder/src/Controller/ChooseBlockController.php index 687840acdd2..7eeaf6b209c 100644 --- a/core/modules/layout_builder/src/Controller/ChooseBlockController.php +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php @@ -225,6 +225,7 @@ protected function getBlockLinks(SectionStorageInterface $section_storage, int $ foreach ($blocks as $block_id => $block) { $attributes = $this->getAjaxAttributes(); $attributes['class'][] = 'js-layout-builder-block-link'; + $attributes['data-dialog-options'] = '{"width": 900}'; $link = [ 'title' => $block['admin_label'], 'url' => Url::fromRoute('layout_builder.add_block', diff --git a/core/modules/layout_builder/src/Element/LayoutBuilder.php b/core/modules/layout_builder/src/Element/LayoutBuilder.php index 5c91b1e3920..9853caa6a22 100644 --- a/core/modules/layout_builder/src/Element/LayoutBuilder.php +++ b/core/modules/layout_builder/src/Element/LayoutBuilder.php @@ -289,6 +289,7 @@ protected function buildAdministrativeSection(SectionStorageInterface $section_s ], 'data-dialog-type' => 'dialog', 'data-dialog-renderer' => 'off_canvas', + 'data-dialog-options' => '{"width": 900}', ], ] ), -- GitLab