-
Notifications
You must be signed in to change notification settings - Fork 800
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
Block Infrastructure: allow building blocks separately #17099
Comments
I opened a proposal PR #18003 for using the |
Once the individual block.json files are present and able to provide visibility, we'll put this project on hold while Gutenberg works on the async asset loading solution. |
I'm going to close this issue since we've done as much as we can until async block loading is present. |
Jetpack product discussion
Background
Jetpack blocks are currently tightly bound to one another:
_inc/blocks
.Jetpack_Gutenberg
.Jetpack_AMP_Support
,Jetpack_Options
,Jetpack
, and for some blocks some classes created specifically for those blocks:Jetpack_Mapbox_Helper
andJetpack_Instagram_Gallery_Helper
come to mind._inc/lib/core-api/wpcom-endpoints/
.Those blocks were also created before WordPress 5.8 and its new block registration process were introduced:
https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/
Ideally, we would want to switch to this new block registration process for a few reasons:
Obviously, switching from one big JavaScript bundle with all blocks and their dependencies to multiple files can have a negative impact on performance. This problem may be addressed with some changes in Gutenberg.
Async block loading in Gutenberg
There has been an effort in the Gutenberg project to change the way blocks are loaded, allowing third-party plugins to load multiple blocks without impacting the block editor performance. This project is tracked here:
Tasklist
Tasks
apiVersion: 3
#34120Requirements (old project)
In order to be able to ship some of those blocks as standalone blocks, without the need for the full Jetpack plugin, we'd need to make a few changes:
Jetpack_Gutenberg
and into the new package if possible and necessary. Blocks: add new methods to new package #17126 Blocks: add AMP and CSS Classes methods to the new package #17101 Blocks: add block registration to package #17167 Blocks: switch all blocks to be registered using new package #17263 Blocks: add block enqueuing methods #17262block.json
(https://github.com/WordPress/wporg-plugin-guidelines/blob/28d945f414db3bb42e04805fb109e7178cbabc9a/blocks.md),composer.json
to register the package defined above as a dependency,readme.txt
file, ...block.json
file above).jetpack-blocks
package.Past Jetpack Product discussions
Async communication
#jetpack-blocks-improvements
#gutenberg-async-loading-code-splitting
The text was updated successfully, but these errors were encountered: