-
Notifications
You must be signed in to change notification settings - Fork 148
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
When the core/buttons block is registered, migrate from the coblocks/buttons block #1241
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.
This is looking good!
I wonder if it'd be good to make the CoBlocks Buttons block non-insertable, so users don't get confused about having 2 blocks with the same name on the inserter.
Gutenberg supports a inserter
option in the supports
block settings that can be used to prevent the block from being inserted while maintaining support for existing posts containing it.
Seems this is not converting the Hero's Buttons child block. Likely because the new coblocks/src/blocks/hero/edit.js Line 33 in a66d386
|
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.
This is working well!
It would be nice to figure out a way to auto-transform our blocks into the Core versions so that we could minimize the amount of code left behind. But for this block we actually still need to keep this code around since the core/buttons
block is not merged into WordPress Core yet.
This is a great method of deprecating our blocks to prefer the core versions and I'm looking forward to improving on this over time. Great work @AnthonyLedesma!
Closes #1235
With the release of Gutenberg 7.2 a new buttons block has been introduced. The new core/buttons block seems to have conflicts with the coblocks/buttons block as shown in this screenshot.
Before
This PR adds logic to automatically convert the CoBlocks Buttons block to the Core Buttons block if available.
After