-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Comments Block: Implementation Notes #24101
Comments
Unless I am mistaken this doesn't need design, so for now going to remove the label. It can always be added back in though. |
If we intend to mimic the behaviour of the Query block (I agree we should) then I am wondering what purpose the "Post Comment" block serves in this context? There isn't an equivalent block for queries/posts.
In addition to these, we may also need:
These new blocks will need design for their placeholders/previews, descriptions, and icons. I created a Figma file here for us to explore this. |
I shared designs for the new blocks we need in separate issues. Links in the OP :) |
I think the post comment block has a different purpose because it only shows one specific comment and this comment can be unrelated to the current post/page/view. |
Yes, I think that block has more utility in the post editor. But even there it feels kind of niche. |
We also have to consider the different settings that are available in the admin area under Settings > Discussion such as the nested comments and the comment pagination. |
That is true, we may also need new blocks for the pagination. Hopefully we can lean on the query pagination blocks there, seeing as they serve (roughly) the same purpose, and will have crossed a similar hurdle when accounting for the posts_per_page setting. |
Hi there! Really nice work done here 👏 I'd like to retake it and create a Post Comments Loop block, similar to the current Query Loop block, to display all the comments of a specific posts. I've created this tracking issue with a detailed explanation and all the steps needed for anyone interested. I've also created this project to keep track of all the relevant issues. |
Great, let's consolidate in #34994! |
The Post Comments Block is currently implemented to be rendered by
comments_template()
on the frontend (which can be fairly complex, containing e.g. the comment author name and gravatar, date, and content).In the editor, it is a loop over paragraphs containing individual comments.
We need match what is editable in the editor with the output produced by the frontend. Furthermore, before making any edits, both needs to be determined by the theme. To that end, we need to apply a similar paradigm to Post Comments that we're already applying to the rest of a theme in FSE. Specifically, we need to:
comments_template
hook to use a block-based system rather than a PHP one (akin to how we replace the PHP-based templating system with a block-based one in Gutenberg'slib/template-loader.php
and 'redirect' tolib/template-canvas.php
).The text was updated successfully, but these errors were encountered: