Skip to content
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

Merged
merged 3 commits into from Jul 28, 2023
Merged

Docs: Add Block API Version 3 #53046

merged 3 commits into from Jul 28, 2023

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.
Copy link
Member

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

Copy link
Member Author

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'
}

https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-post/src/components/visual-editor/index.js#L357C7-L364C8

Copy link
Member

@fabiankaegy fabiankaegy left a 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 :)

@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Flaky tests detected in 68b0601.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5689009552
📝 Reported issues:

@fabiankaegy fabiankaegy enabled auto-merge (squash) July 28, 2023 06:44
@fabiankaegy fabiankaegy merged commit b9ddc91 into trunk Jul 28, 2023
50 checks passed
@fabiankaegy fabiankaegy deleted the docs/block-api-v3 branch July 28, 2023 07:15
@github-actions github-actions bot added this to the Gutenberg 16.4 milestone Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants