Uh oh!
There was an error while loading. Please reload this page.
Automatically sync stable blocks from Gutenberg to wordpress-develop on release - #2940
Automatically sync stable blocks from Gutenberg to wordpress-develop on release#2940gziolo wants to merge 1 commit into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1ffc973 to
ace61e4Comparegziolo
commented
Jul 8, 2022
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
8e40981Compareazaozz
commented
Jul 8, 2022
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
edef13cCompareedef13c to
793e9a5Comparegziolo
commented
Sep 26, 2022
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-developis 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.jsonfiles from the@wordpress/block-librarydirectory.__experimentalrestrictions – these are the stable blocks.requires appropriate dynamic blocks PHP files.remove_actionwith appropriate arguments in PHP unit tests.All of this is possible thanks to WordPress/gutenberg#40655
To make the process smooth,
requireandremove_actioncalls were extracted to separate PPH files that can be easily autogenerated and overwritten:wp-includes/blocks/require-dynamic-blocks.phpwp-includes/blocks/require-static-blocks.phptests/phpunit/includes/unregister-blocks-hooks.phpHow to test?
npx grunt sync-gutenberg-packagespost-author-namewere excluded from both listscc @adamziel