Add blockVisibility support to Synced Pattern and Template Part#72026
Add blockVisibility support to Synced Pattern and Template Part#72026
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. |
|
Flaky tests detected in c4827a5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18189006769
|
ramonjd
left a comment
There was a problem hiding this comment.
This is working well for me.
I tested both template parts and synced patterns in editor and frontend.
Not sure if this is worth worrying about, but I found an edge case that, when all blocks on a page are hidden, you can no longer interact with the canvas.
E.g., there's no empty paragraph block and you can only add new blocks using after/before in the list view.
|
@ramonjd Thanks for the review!
I'll try to think of a better solution 👀 |
What?
Add
blockVisibilitysupport to Synced Pattern and Template PartWhy?
When I initially implemented the Block Visibility feature, I disabled this feature for generic blocks just to be safe. However, this feature should work perfectly in such blocks.
Testing Instructions
Screenshots or screencast
bd7f56c09340efb48e1f3ee367a345d2.mp4