Skip to content
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

Closed
9 tasks
ockham opened this issue Jul 21, 2020 · 9 comments
Closed
9 tasks

Post Comments Block: Implementation Notes #24101

ockham opened this issue Jul 21, 2020 · 9 comments
Labels
[Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Feature] Blocks Overall functionality of blocks [Feature] Themes Questions or issues with incorporating or styling blocks in a theme.

Comments

@ockham
Copy link
Contributor

ockham commented Jul 21, 2020

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:

@karmatosed
Copy link
Member

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.

@karmatosed karmatosed removed the Needs Design Needs design efforts. label Nov 19, 2020
@carolinan carolinan added the [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop label Jan 5, 2021
@kjellr kjellr added the [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. label Jan 5, 2021
@jameskoster
Copy link
Contributor

jameskoster commented Apr 7, 2021

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.


Comment Author
Comment Date
Comment Content

In addition to these, we may also need:

  • Comment Author Gravatar
  • Comment Reply Link
  • Edit Comment link

These new blocks will need design for their placeholders/previews, descriptions, and icons. I created a Figma file here for us to explore this.

@jameskoster jameskoster added the Needs Design Needs design efforts. label Apr 7, 2021
@jameskoster
Copy link
Contributor

I shared designs for the new blocks we need in separate issues. Links in the OP :)

@jameskoster jameskoster removed the Needs Design Needs design efforts. label Apr 7, 2021
@carolinan
Copy link
Contributor

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.

Comment Author
Comment Date
Comment Content

In addition to these, we may also need:

  • Comment Author Gravatar
  • Comment Reply Link
  • Edit Comment link

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 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.

@jameskoster
Copy link
Contributor

Yes, I think that block has more utility in the post editor. But even there it feels kind of niche.

@carolinan
Copy link
Contributor

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.

@jameskoster
Copy link
Contributor

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.

@SantosGuillamot
Copy link
Contributor

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.

@mtias
Copy link
Member

mtias commented Sep 21, 2021

Great, let's consolidate in #34994!

@mtias mtias closed this as completed Sep 21, 2021
@gziolo gziolo added [Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) and removed [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Feature] Blocks Overall functionality of blocks [Feature] Themes Questions or issues with incorporating or styling blocks in a theme.
Projects
No open projects
Full site editing
  
Awaiting triage
Development

No branches or pull requests

8 participants