From 1013cfce6b9a77c8084f03960921fb395f3555d0 Mon Sep 17 00:00:00 2001
From: Justin Toupin <justin@atendesigngroup.com>
Date: Thu, 20 Jan 2022 15:51:33 -0700
Subject: [PATCH] Issue #3257666: Misleading dialog title for "Delete" action

---
 layout_paragraphs.module         | 1 +
 src/Form/DeleteComponentForm.php | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/layout_paragraphs.module b/layout_paragraphs.module
index 7c355cb..dc79ebb 100644
--- a/layout_paragraphs.module
+++ b/layout_paragraphs.module
@@ -247,6 +247,7 @@ function layout_paragraphs_preprocess_layout_paragraphs_builder_controls(&$varia
           'modal' => TRUE,
           'target' => Dialog::dialogId($layout),
           'dialogClass' => 'lpb-dialog',
+          'width' => 'auto',
         ]),
         'title' => t('Delete'),
       ],
diff --git a/src/Form/DeleteComponentForm.php b/src/Form/DeleteComponentForm.php
index bd96cac..104d4af 100644
--- a/src/Form/DeleteComponentForm.php
+++ b/src/Form/DeleteComponentForm.php
@@ -65,9 +65,9 @@ class DeleteComponentForm extends FormBase {
     $this->componentUuid = $component_uuid;
     $component = $this->layoutParagraphsLayout->getComponentByUuid($this->componentUuid);
     $type = $component->getEntity()->getParagraphType()->label();
-    $form['#title'] = $this->t('Delete @type', ['@type' => $type]);
+    $form['#title'] = $this->t('Delete component', ['@type' => $type]);
     $form['confirm'] = [
-      '#markup' => $this->t('Really delete this @type? There is no undo.', ['@type' => $type]),
+      '#markup' => $this->t('Really delete this "@type" component? There is no undo.', ['@type' => $type]),
     ];
     $form['actions'] = [
       '#type' => 'actions',
-- 
GitLab