Converting to MR
3 unresolved threads
3 unresolved threads
Closes #3152281
Merge request reports
Activity
- Resolved by quietone
191 */ 192 public static function preRenderBlock(array $block_build): array { 193 $content = $block_build['content'] ?? NULL; 194 if ($content === NULL || Element::isEmpty($content)) { 195 // Block content is empty, abort rendering the whole block and preserve 196 // cache metadata. 197 // @see \Drupal\Core\Render\Renderer::doRender 198 $block_build['#printed'] = TRUE; 199 } 200 return $block_build; 201 } 202 203 /** 204 * {@inheritdoc} 205 */ 206 public static function trustedCallbacks() { changed this line in version 4 of the diff
494 494 // Confirm that the newly added extra field is visible. 495 495 $this->drupalGet('node/1'); 496 496 $assert_session->pageTextContains('Extra Field 2 is hidden by default.'); 497 498 // Ensure empty extra field and its container are not rendered. 499 /** @see \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::preRenderBlock */ 500 $assert_session->elementNotExists('css', '.block-extra-field-blocknodebundle-with-section-fieldlayout-builder-test-empty'); Positive assertion in this case would mean that extra field is not empty. And that's already covered by other assertions above. This issue is about empty extra field being rendered and I believe this negative assertion sufficiently proves that is not the case anymore. Let me know if I'm missing something.
added 803 commits
-
257b5f2d...fecffbff - 801 commits from branch
project:11.x
- 591d0fad - Merge branch '11.x' into 3152281-extra-field-blocks
- a95d5432 - Resolve nitpicks
-
257b5f2d...fecffbff - 801 commits from branch
added 887 commits
-
a95d5432...35044e45 - 883 commits from branch
project:11.x
- afa4412f - Converting to MR
- af8de247 - Adding post_update hook
- 9c687168 - Fix coding standards violation
- 37ca945e - Resolve nitpicks
Toggle commit list-
a95d5432...35044e45 - 883 commits from branch
- Resolved by Alex Pott
24 24 '#markup' => 'Extra Field 2 is hidden by default.', 25 25 ]; 26 26 } 27 if ($display->getComponent('layout_builder_test_empty')) { 28 $build['layout_builder_test_empty'] = [ 29 '#cache' => [], 30 ]; 31 } - Comment on lines +27 to +31
Please register or sign in to reply