-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Directory: Fix "missing" block when the block can be installed from the directory #28030
Conversation
Size Change: +110 B (0%) Total Size: 1.3 MB
ℹ️ View Unchanged
|
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.
Works for me.
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.
Code looks good. Tested with admin and author accounts and works as expected ✅
The e2e test failures are unrelated; they're failing in other PRs too.
Description
When blocks were updated to use API v2/
useBlockProps
, it caused a bug with the modified missing block. See #25264 & #22631 for history, but basically if a missing block is found in the block directory, we modify the "Missing" message to let users install that block. When the block API was changed, the wrapper no longer applied correctly to the modified message, and it caused the breaking described in #27916 & #27287.Fixes #27916.
How has this been tested?
Manual testing, using the following code to trigger a request to install the Star Rating block
You can test the no HTML case with this block code:
Once the "Install Start Rating" button shows up, you should be able to click the missing block container. It should highlight, show the block toolbar, and you should be able to delete it.
Types of changes
Bug fix (non-breaking change which fixes an issue)