--- 3072231-83.patch 2023-02-10 18:10:24.000000000 +0530 +++ 3072231-84.patch 2023-02-13 13:56:37.000000000 +0530 @@ -1,16 +1,16 @@ diff --git a/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php -index 7bedf79..5d447bf 100644 +index 083de3983d..f19c32c2cc 100644 --- a/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php -@@ -126,6 +126,7 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) { +@@ -125,6 +125,7 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) { + '#base_plugin_id' => $block->getBaseId(), '#derivative_plugin_id' => $block->getDerivativeId(), - '#in_preview' => $event->inPreview(), '#weight' => $event->getComponent()->getWeight(), + '#attributes' => $content['#attributes'] ?? [], ]; // Place the $content returned by the block plugin into a 'content' child -@@ -140,7 +141,6 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) { +@@ -139,7 +140,6 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) { // move these properties from $content and merge them into the top-level // element. if (isset($content['#attributes'])) { @@ -19,44 +19,42 @@ } // Hide contextual links for inline blocks until the UX issues surrounding diff --git a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php -index 9d79703..8869bff 100644 +index 76281f8731..c6cbbffccd 100644 --- a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php +++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php -@@ -121,6 +121,7 @@ public function testOnBuildRender($refinable_dependent_access) { +@@ -120,6 +120,7 @@ public function testOnBuildRender($refinable_dependent_access) { + '#base_plugin_id' => 'block_plugin_id', '#derivative_plugin_id' => NULL, 'content' => $block_content, - '#in_preview' => FALSE, -+ '#attributes' => Array (), ++ '#attributes' => array(), ]; $expected_build_with_expected_cache = $expected_build + [ -@@ -196,7 +197,9 @@ public function testOnBuildRenderWithoutPreviewFallbackString($refinable_depende +@@ -195,6 +196,7 @@ public function testOnBuildRenderWithoutPreviewFallbackString($refinable_depende '#base_plugin_id' => 'block_plugin_id', '#derivative_plugin_id' => NULL, 'content' => $block_content, -+ '#attributes' => [], - '#in_preview' => FALSE, -+ '#attributes' => Array (), ++ '#attributes' => array(), ]; $expected_cache = $expected_build + [ diff --git a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php -index a149ff8..41ae965 100644 +index fe9fbdc35c..052c7a602b 100644 --- a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php +++ b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php -@@ -116,6 +116,7 @@ public function testToRenderArray() { +@@ -115,6 +115,7 @@ public function testToRenderArray() { + 'tags' => [], 'max-age' => -1, ], - '#in_preview' => FALSE, + '#attributes' => [], ]; $block = $this->prophesize(BlockPluginInterface::class)->willImplement(PreviewFallbackInterface::class); -@@ -256,6 +257,7 @@ public function testContextAwareBlock() { +@@ -254,6 +255,7 @@ public function testContextAwareBlock() { 'tags' => [], 'max-age' => -1, ], + '#attributes' => [], - '#in_preview' => FALSE, ]; + $block = $this->prophesize(BlockPluginInterface::class)