-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Add Block API Version 3 #53046
Conversation
@@ -2,6 +2,9 @@ | |||
|
|||
This document lists the changes made between the different API versions. | |||
|
|||
## Version 3 (>= WordPress 6.3) | |||
- The post editor will be iframed if all registered blocks have a Block API version 3 or higher. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this :)
I think we should also note that the block editor gets only iframed if all blocks use apiVersion 3 and also no classic meta boxes like for example Yoast SEO are rendered…
That threw me when I ran into this updating all our blocks to get to this state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition.
shouldIframe={
(
( hasV3BlocksOnly || ( isGutenbergPlugin && isBlockBasedTheme ) )
&& ! hasMetaBoxes
)
|| isTemplateMode
|| deviceType === 'Tablet'
|| deviceType === 'Mobile'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one note on what I think would be a great addition. But approving as is :)
Flaky tests detected in 68b0601. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5689009552
|
What?
Adds Block API Version 3 to the docs.
More about the API Version and iframed editor:
https://make.wordpress.org/core/2023/07/18/miscellaneous-editor-changes-in-wordpress-6-3/
https://make.wordpress.org/core/2021/06/29/blocks-in-an-iframed-template-editor/