-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 installations for 'template-locked' mode #69394
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. |
Size Change: +23 B (0%) Total Size: 1.84 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.
LGTM! I think everything works as expected.
Thanks for testing, @t-hamano! |
3421c91
to
a1b2cb0
Compare
* Use stable reference fallback for getDownloadableBlocks * Do nothing when there are no installed block types * Update block directory selectors * Remove unused utility method and tests Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: karthikeya-io <[email protected]>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: 68b1105 |
What?
Closes #69360.
PR fixes the Block Directory installation bug when "Show Template" mode is enabled. The bug can be reproduced in older WP versions, but it has become more visible now that users can persist "Show Template" settings.
Why?
The block directory store uses blocks visible in content to finish or clean up installations. When rendering in
template-locked
mode, the content becomes nested inside the template, but directory selectors weren't adopted for this mode.How?
Use the
getClientIdsWithDescendants
selector to get all the blocks currently used in the editor.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast