-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Automatically sync stable blocks from Gutenberg to wordpress-develop on release #2940
Conversation
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 think we're good – this is great, thank you so much for taking #2647 across the line! With this PR, 90% of the mundane tasks required for the editor merge process are automated!
1ffc973
to
ace61e4
Compare
I landed most of the changes with https://core.trac.wordpress.org/changeset/53688. The last remaining piece is the changes to the weback config that requires updating core blocks first. |
ace61e4
to
8e40981
Compare
Any particular reason the auto-generated PHP files are committed to trunk? Think it was decided to not do that again after the problems with Also, these files are supposed to be overwritten every time WP is build, right? So why commit the potentially old versions of them :) |
8e40981
to
edef13c
Compare
edef13c
to
793e9a5
Compare
With https://core.trac.wordpress.org/changeset/54308 all changes are now included in WordPress core. |
Replaces #2647.
Trac ticket: https://core.trac.wordpress.org/ticket/56179.
What problem does this PR solve?
Syncing stable blocks from the Gutenberg repository to
wordpress-develop
is currently a manual process.The thing is, it can be automated.
That's what this PR does.
How does this PR solve it?
The big idea is to:
block.json
files from the@wordpress/block-library
directory.__experimental
restrictions – these are the stable blocks.require
s appropriate dynamic blocks PHP files.remove_action
with appropriate arguments in PHP unit tests.All of this is possible thanks to WordPress/gutenberg#40655
To make the process smooth,
require
andremove_action
calls were extracted to separate PPH files that can be easily autogenerated and overwritten:wp-includes/blocks/require-dynamic-blocks.php
wp-includes/blocks/require-static-blocks.php
tests/phpunit/includes/unregister-blocks-hooks.php
How to test?
npx grunt sync-gutenberg-packages
post-author-name
were excluded from both listscc @adamziel