-
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
Code Quality: Use contentOnly locking for pattern block #61227
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: -7 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
…eck in block inspector
ee3f54f
to
af4d7fe
Compare
Flaky tests detected in af4d7fe. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8917915951
|
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.
The changes here make sense 👍
✅ Quick navigation appears when pattern block is selected as per trunk
✅ Couldn't insert or drag other blocks between those in the pattern
LGTM 🚢
The flaky tests seem weird and might be related, but they have already happened on trunk 🤔. I think they are separate issues. |
Seems like it's this commit where it started happening most recently, though it doesn't necessarily mean that's the one that caused it: 59ed45e It might also be related to this issue - #61038. |
…block check in block inspector (#61227)" (#61517) This reverts commit 1351c67. Co-authored-by: talldan <[email protected]> Co-authored-by: kevin940726 <[email protected]>
What?
Minor tidy-up. In trunk, the pattern block uses
templateLock: 'all
to prevent insertion between its inner blocks. It could usetemplateLock: contentOnly
instead to achieve the same thing.Furthermore, there's a hard-coded check in the block inspector that ensures the pattern block shows the contentOnly quick navigation in the block inspector. This is actually not needed if the pattern block is set to
templateLock: contentOnly
so can be removedWhy?
It allows deletion of one line of code while achieving the same thing.
Testing Instructions
Everything should be the same as in
trunk