Fix: Buttons block shows inserter picker when multiple allowed blocks are registered#77858
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks for working on this, @adithya-naik! I think we can remove the P.S. Rebasing on top of the trunk should resolve the failing e2e test. |
|
Okay, it seems there's a minor issue with copying attributes when We'll need to fix the attributes to copy the issue first and then land this. @stokesman, I think you were already working on it - #54409. Do you have time to continue work on that PR? I can also take over and handle it. |
|
Thanks for the clarification! You can take it up and merge it @Mamaduka , and then we can proceed with merging this PR. |
What
Fixes Buttons block not showing inserter picker when multiple allowed blocks are registered.
Why
The current logic only checks for
core/buttonvariations and ignores multiple allowed block types, so it always inserts the default button.How
Update
directInsertlogic:Result
Testing
core/buttonsPicker should appear.
Issue
Fixes #77839