Stabilise BlockPreview props#47231
Conversation
|
Size Change: +264 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
ntsekouras
left a comment
There was a problem hiding this comment.
Thank you for the PR Robert! I've left a couple of comments.
| return [ | ||
| ...styles, | ||
| ...__experimentalStyles, | ||
| ...additionalStyles, |
There was a problem hiding this comment.
That's not from this PR, but is there a case that we don't have styles but we do have additionalStyles?
There was a problem hiding this comment.
Yes in theory there could be no styles attribute in the block editor settings which would mean styles is undefined here. This likely happens when the block editor is used outside of WordPress.
|
Flaky tests detected in 6e85766. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3955058016
|
|
Thanks @ntsekouras |
| version: '6.4', | ||
| alternative: 'additionalStyles', | ||
| } ); | ||
| } |
There was a problem hiding this comment.
Should we follow-up and remove these props now? If you think it's still too early, consider increasing the version.
What?
Removes/stabilises the
__experimentalprops fromBlockPreviewin@wordpress/block-editor.Remove
__experimentalMinHeightin favour ofminHeight.This has been around for a while (Update query block creation and replacement flows #38997) and seems stable, so mark it as such.
Remove
__experimentalStylesin favour ofadditionalStyles.This was added recently (Global Styles: Add Style Book to Global Styles #45960) but I think it's quite flexible. I decided to use the word "additional" for clarity.
Remove
__experimentalPaddingin favour of passing abody { padding: ...; }style toadditionalStyles.Given
additionalStyleslets us add arbitrary styles to the iframe body, we don't need props for every CSS property including padding.Why?
#47196
Testing Instructions