Add preview example for comments-count and comments-link#71016
Add preview example for comments-count and comments-link#71016Mamaduka merged 1 commit intoWordPress:trunkfrom
comments-count and comments-link#71016Conversation
|
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. |
The current behaviour occurs because the value is set asynchronously following an Ref: Typically, other blocks display a reasonable default while fetching data; for instance, the Ref: This can be addressed separately as a follow-up, so it doesn’t need to block this PR. I'll be requesting a confidence review to move this PR forward. |
Mamaduka
left a comment
There was a problem hiding this comment.
Looks good! Thanks, @Infinite-Null!
Part of #64707
What?
This PR adds example attributes to the Post Comments Count and Post Comments Link blocks to provide block previews in the inserter with optimized viewport width.
Testing Instructions
Screenshots
While working on this issue, I noticed a minor warning that appears briefly on reload:
Post Comments Link block: post not found.This is not issue for preview example but as per my understanding it is related to the fact that this:
takes a moment to load. As a result, the warning gets triggered by the code at the following locations:
gutenberg/packages/block-library/src/post-comments-link/edit.js
Line 104 in 94af11b
gutenberg/packages/block-library/src/post-comments-count/edit.js
Line 75 in 94af11b
Screencast:
Screen.Recording.2025-08-01.at.4.34.13.PM.mov