Skip to content

Conversation

@vipul0425
Copy link
Contributor

What?

Part of #64288

Why?

For compact containers the placeholder of query block looks broken.

How?

This PR follows the design provided in #64288 to fix the issue for Query Block. It adds the block controls to choose patterns and an observer to change the placeholder content if used in compact containers.

Testing Instructions

  1. Add a columns block or grid block. Choose 6+ columns or grid in a row and add a Query loop block.
  2. Now check the placeholder, also there will be block controls on placeholder as well.

Screenshots or screencast

Screen.Recording.2025-07-22.at.5.14.34.PM.mov

@github-actions
Copy link

github-actions bot commented Jul 22, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: vipul0425 <vipulgupta003@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Query Loop Affects the Query Loop Block labels Jul 22, 2025
@t-hamano t-hamano changed the title [Type] Enhancement - Fix broken placeholder issue for query block. Query Loop Block: Fix broken placeholder Jul 23, 2025
@jasmussen jasmussen self-requested a review August 4, 2025 10:50
Copy link
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a pure behavioral perspective, this is a move in the right direction, and good to go:
loop

Here's the trunk behavior:
before

Noting that while the trunk behavior barely works in the above, there are also translations to worry about, which is why the new approach is better.

This could use a code review.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. I've left some feedback, but it almost looks good!

@vipul0425 vipul0425 requested a review from t-hamano August 27, 2025 05:49
@vipul0425
Copy link
Contributor Author

Thanks @t-hamano 🙇. I have updated the PR.

@vipul0425 vipul0425 requested a review from t-hamano August 27, 2025 07:39
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for your work!

@t-hamano t-hamano merged commit 78b1abb into WordPress:trunk Aug 27, 2025
88 of 106 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.6 milestone Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants