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 Comment Count: Block Enhancement Ideas #24953

Open
alaczek opened this issue Aug 31, 2020 · 11 comments
Open

Post Comment Count: Block Enhancement Ideas #24953

alaczek opened this issue Aug 31, 2020 · 11 comments
Assignees
Labels
[Block] Post Comments Count Affects the Post Comments Count Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@alaczek
Copy link

alaczek commented Aug 31, 2020

Is your feature request related to a problem? Please describe.
The Comment Count block displays a number only. This is kind of useless without some context :) I'm wondering if it would make sense to include some text along with the number. Even though it's possible to insert a paragraph before/after the number of comments, there are two problems with that:

  1. The only way to put this block next to a paragraph is by putting both in columns block, which feels like an overkill.
  2. Manually inserted text won't take into account the number itself - for example, it would always be "X Comments", while the number might be 0 or 1. This would also need to work with different languages that might use different patterns (for example in Polish it's four different variants - 0 komentarzy, 1 komenatrz, 2,3,4 komentarze, 5 and up komentarzy).
    But maybe it's all the more reason to include this in the block (as an option), as users would never achieve the same thing manually. Or maybe it would be enough to add placeholder text textfield in block options with the ability to specify the number(s) of comments it applies to, and the ability to add as many brackets as possible?

Other enhancement ideas:

  • have an option to hide the count if there are no comments (or display something like "Add a comment" instead of the number in that case)
  • include an optional icon - this would provide some context if we don't end up adding text to the block (although oftentimes both are used)
@aristath aristath added [Block] Post Comments Count Affects the Post Comments Count Block [Type] Enhancement A suggestion for improvement. labels Sep 1, 2020
@alaczek
Copy link
Author

alaczek commented Sep 8, 2020

Let me expand a little on this and add some visuals. Here's how comment count would typically be used in post meta:

post_meta

(example from TwentyTwenty)

image
(more elaborate example from Independent Publisher 2 theme)

Aside from the icons, putting together this pattern with blocks would require wrapping everything in a columns block, since each block is HTML block-level element. This feels overly complicated, especially if we had to insert the icon as a separate block too.

So, would it make sense to have the option to make this block (and a bunch of others, like Post Categories / Tags, Post Date, Post Author) to behave like an HTML inline element? This is exactly what we did all the time in themes in order to create the designs above. I'm not sure how exactly it would be implemented, the naming of it would have to be less technical for sure, but I'm interested in hearing what others think.

@ianstewart
Copy link
Contributor

Aside from the icons, putting together this pattern with blocks would require wrapping everything in a columns block, since each block is HTML block-level element. This feels overly complicated, especially if we had to insert the icon as a separate block too.

Potentially related issue:

#24473

@annezazu
Copy link
Contributor

annezazu commented May 6, 2021

Related feedback came up in the fifth call for testing for the FSE outreach program:

Comments count and post publish date are without labels? What I mean are post meta labels such as “Posted on:”, “Written by:” and “Comments count:”. It would be also great to hide these accessibly if possible (or maybe ability to set CSS class for them?).

To me, this touches on wider feedback around improving placeholders. To me, it makes sense to have text in place that people can then remove/customize as they see fit.

@sagarnasit
Copy link

It would be nice to have a comment count as a class something like comment-count-1, comment-count-2...

This will help to add CSS based on singular and plural comment count.

@aksthelion
Copy link

So what is that status of this issue? Is it going to be implemented? I've been looking a block to display comment count but it is not available even in some of the top block plugins. Does anyone know how to do it right now in 2022 theme?

@carolinan
Copy link
Contributor

The post comments count block is available in the Site Editor when Gutenberg is active. As far as I am aware it is still experimental and there are no plans to include it in WordPress in 6.1.

@aksthelion
Copy link

I've 6.0.6 version. I can't find it from search, I searched for comment and count.

@flipflap
Copy link

flipflap commented Dec 6, 2022

I can't find it too... is there another way to show how many comments there are?

@annezazu
Copy link
Contributor

annezazu commented Dec 6, 2022

@flipflap @aksthelion not without using Gutenberg, where, as Carolina stated above, this block is available as an experiment.

@carolinan
Copy link
Contributor

I think that with the comments block already being placeable in the block editor, it makes sense to make this block available in the block editor too in 6.2?

@carolinan carolinan self-assigned this Dec 5, 2024
@carolinan
Copy link
Contributor

carolinan commented Dec 5, 2024

After searching on wpdirectory.net I found that there are only about 10 themes in the WordPress.org theme directory that style this block in CSS or JSON or adds it to a template or pattern.
The block is not very useable as it is, it could be enhanced with more block supports and prefix + suffix options.
The other alternative is to deprecate this block and create a binding, usable with the heading and paragraph block?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Comments Count Affects the Post Comments Count Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

10 participants