[wp-trac] [WordPress Trac] #60784: Add __experimentalSkipSerialization support to shadow

WordPress Trac noreply at wordpress.org
Fri Mar 15 16:00:00 UTC 2024


#60784: Add __experimentalSkipSerialization support to shadow
--------------------------+-----------------------------
 Reporter:  ColinD        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 What?
 This is a backport of the merged Gutenberg PR
 https://github.com/WordPress/gutenberg/pull/59887

 When a dynamic block defines experimentalSkipSerialization in its
 block.supports.shadow the styles continue to be printed to the block
 wrapper element. This PR corrects that behavior so that shadow behaves
 like border, color, and others.

 Why?
 This provides the expected behavior for dynamic blocks that need to opt
 out of having the shadow styles printed to the block wrapper.

 How?
 Added a check at the start of the render function to return an empty array
 of the block has set experimentalSkipSerialization

 (This is my first attempt at submitting a Gutenberg PR to be included back
 into WP Core so welcome any advice if I'm doing this wrong)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60784>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list