Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Change Post Comments to Query Comments #192

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions block-template-parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:comments-query-loop -->
<div class="wp-block-comments-query-loop"><!-- wp:comment-template -->
<!-- wp:post-comment-author {"isLink":true} /-->
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm able to place it in manually via the site editor, and that generally seems to work?

I'm confused about how this is expected to work in 5.9.

The post-comment-author, post-comment-date, post-comment-content, and post-comments-form are all currently marked as experimental.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use blocks that are marked as experimental, they just don't show up in the inserter?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, that doesn't sound right.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Left a comment here to get some clarification: WordPress/gutenberg#35979 (comment)

<!-- wp:post-comment-date {"format":"F j, Y g:i a","isLink":true,"fontSize":"small"} /-->
<!-- wp:post-comment-content /-->

<!-- /wp:comment-template -->
</div>
<!-- /wp:comments-query-loop -->
4 changes: 2 additions & 2 deletions block-templates/page-no-separators.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:post-comments {"style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--medium, 6rem)"}}}} /--></div>
<!-- wp:template-part {"slug":"comments","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--medium, 6rem)"}}}} /--></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
4 changes: 2 additions & 2 deletions block-templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-content {"layout":{"inherit":true}} /-->
<!-- wp:template-part {"slug":"comments"} /-->

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group">
<!-- wp:post-comments {"style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--medium, 6rem)"}}}} /--></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
6 changes: 4 additions & 2 deletions block-templates/single-no-separators.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-comments /--></div>
<!-- wp:template-part {"slug":"comments"} /-->

</div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
6 changes: 4 additions & 2 deletions block-templates/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:post-comments /--></div>
<!-- wp:template-part {"slug":"comments"} /-->

</div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->
<!-- wp:template-part {"slug":"footer","tagName":"footer","style":{"spacing":{"padding":{"right":"var(--wp--custom--spacing--small, 1.25rem)","left":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} /-->