Skip to content

Conversation

@yashjawale
Copy link
Contributor

@yashjawale yashjawale commented Aug 20, 2025

What?

Closes #71243

This PR adds comment indicators on block toolbar
Indicator shows avatar of users participating in the thread
Also shows an orange dot indicating resolution status of the thread

I also intend to work on adding indicators to block list view after approach in this is finalized for consistency

Why?

Having enhanced indicators was one of the first suggestions on block comments features
An initial design for the same on Block Toolbar was provided in #66377 (comment)

How?

The comment icon button in toolbar is replaced with the new indicator, the indicator shows avatars of max 3 users participating in the thread, should there be more participants, another circle with "+1", etc text is added

The comments with trash status are ignored so that deleted comments don't appear in the indicator

Follows mockup from #66377 (comment)

Testing Instructions

  1. Create/Open a post [currently block comments on published posts aren't supported]
  2. From a block's context menu, add a comment
  3. Notice the new indicator in the block's toolbar
  4. Add interactions by more participants in the comment thread & notice the indicator changes [esp. the cases of 1,2,3 & 3+ participants]
  5. Delete comments from thread & observe the updates in indicator

Screenshots or screencast

Before

image

After

With one user

image

With two users

image

With three users

image

With 3+ users

image

3 users with resolved status

image

@yashjawale yashjawale marked this pull request as ready for review August 21, 2025 10:48
@github-actions
Copy link

github-actions bot commented Aug 21, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yashjawale <yashjawale@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: adamsilverstein <adamsilverstein@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: joemcgill <joemcgill@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@adamsilverstein adamsilverstein added [Type] Enhancement A suggestion for improvement. Collaborative Workflows Phase 3 of the Gutenberg roadmap around all-things related to collaborative workflows labels Aug 28, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@WordPress/gutenberg-design, We'd appreciate your design feedback

yashjawale and others added 7 commits September 11, 2025 19:02
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

We should monitor REST API queries closely, as the collab sidebar is being introduced. It would also be nice to test on comment-heavy setups.

@yashjawale
Copy link
Contributor Author

Updated ✅

@t-hamano
Copy link
Contributor

I've looked into it a bit more, but would simply specifying all as the status solve the problem? The WP_Comment_Query class allows all as the status, and adds a condition for comments with a status of approved or hold. all might also be available in the REST API.

https://github.com/WordPress/wordpress-develop/blob/7289643a4d6a901a04f13b0359c95a1df5af63d3/src/wp-includes/class-wp-comment-query.php#L571-L574

@yashjawale
Copy link
Contributor Author

Woah! I wasn't aware of this, might just do the trick 🚀

Perhaps the status values should be specified in documentation, currently it just says that the query's default value is approve

@yashjawale
Copy link
Contributor Author

all status value appears to work, Thanks!
Updated ✅

@adamsilverstein
Copy link
Member

I've looked into it a bit more, but would simply specifying all as the status solve the problem? The WP_Comment_Query class allows all as the status

Yes! Good point - 'all' will work for now. That said, I still feel we should add the multi-status support to the end point. The underlying comments class already supports arrays for the status field so the REST API lacking support is probably a bug/oversight. We may need more fine grained views of comments later where this could be useful.

@t-hamano
Copy link
Contributor

I still feel we should add the multi-status support to the end point.

I agree, the block commenting might require additional comment status in the feature. That said, can we merge this PR for now?

@adamsilverstein
Copy link
Member

That said, can we merge this PR for now?

Sure. This isn't a blocker.

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

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

Looks good! left some tiny style feedback items.

t-hamano and others added 3 commits September 16, 2025 11:03
…r-toolbar.js

Co-authored-by: Adam Silverstein <adamsilverstein@earthboundhosting.com>
…r-toolbar.js

Co-authored-by: Adam Silverstein <adamsilverstein@earthboundhosting.com>
…r-toolbar.js

Co-authored-by: Adam Silverstein <adamsilverstein@earthboundhosting.com>
@t-hamano
Copy link
Contributor

OK, it seems to be ready to ship.

@WordPress/gutenberg-design, I believe this PR accurately implements the design proposed here, but if you have any design feedback, please leave a comment and we'll address it in a follow-up.

@t-hamano t-hamano merged commit b71b6a8 into WordPress:trunk Sep 16, 2025
67 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.9 Editor Tasks Sep 16, 2025
@github-actions github-actions bot added this to the Gutenberg 21.7 milestone Sep 16, 2025
@t-hamano t-hamano added [Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting and removed Collaborative Workflows Phase 3 of the Gutenberg roadmap around all-things related to collaborative workflows labels Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Projects

Development

Successfully merging this pull request may close these issues.

Block comments: Add comment indicators in the block toolbar and block list

4 participants