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

Comments: Make it possible to create a "X replies to post title" heading #40264

Closed
jameskoster opened this issue Apr 12, 2022 · 2 comments · Fixed by #40419
Closed

Comments: Make it possible to create a "X replies to post title" heading #40264

jameskoster opened this issue Apr 12, 2022 · 2 comments · Fixed by #40419
Assignees
Labels
[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Apr 12, 2022

You can kind of hack it with a Row containing Paragraphs, Post Comments Count, and Post Title blocks:

Screenshot 2022-04-12 at 11 00 25

There are a couple of issues with this approach:

  1. Typography controls across blocks are inconsistent, so it's difficult to create a harmonious appearance
  2. It's not possible to conditionally pluralise reply/replies in order to avoid the awkward "There are 1 comments" / "There are 32 comment".

It would seem relatively simple to address these issues. For example we could update the Post Comments Count block to include an option to also display a label so that the pluralisation logic is built into that block.

Alternatively we might consider a dedicated Comments Heading block.

@jameskoster jameskoster added the [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop label Apr 12, 2022
@justintadlock
Copy link
Contributor

I put together a rough block plugin for this: https://github.com/x3p0-dev/x3p0-comments-title

It needs an icon. I'd be happy to test out variations on it.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 18, 2022
@cbravobernal
Copy link
Contributor

cbravobernal commented Apr 18, 2022

Hi @justintadlock

I added a PR to add the block in Core. I will take some code from your plugin. Feel free to edit or add comments to the PR!

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants