Skip to content

Conversation

@dhruvikpatel18
Copy link
Contributor

What?

Closes #49842
Shows placeholder content for Comment Template blocks when editing posts or pages that have no comments, making child blocks visible and selectable in the editor.

Why?

Currently, when adding a Comment Template block to a post or page with no comments, the child blocks (comment author, content, date, etc.) are not visible on the canvas. This makes it impossible to select and configure these blocks in the Block Inspector, creating a poor editing experience when designing comment layouts.

The Comment Template block already shows placeholders correctly in template contexts, but not when editing individual posts/pages with no comments.

Testing Instructions

  1. Create a new post or page
  2. Insert a Comments block (which includes the Comment Template)
  3. Verify that placeholder content is now visible on the canvas
  4. Select child blocks (comment author name, comment content, etc.) from the List View
  5. Confirm that the selected blocks are highlighted on the canvas and their settings appear in the Block Inspector
  6. Test the same in a templates to ensure placeholders still work there

Screenshots or screencast

Before

Comment.template.before.mov

After

Comment.template.after.mov

@dhruvikpatel18 dhruvikpatel18 marked this pull request as ready for review June 23, 2025 09:32
@github-actions
Copy link

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: dhruvikpatel18 <dhruvik18@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@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 [Block] Comment Template Affects the Comment Template Block [Type] Bug An existing feature does not function as intended labels Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Comment Template Affects the Comment Template Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Working with Comment Template child blocks is confusing when no comments are visible

2 participants