Skip to content

Conversation

@yashjawale
Copy link
Contributor

@yashjawale yashjawale commented Aug 19, 2025

What?

Closes #71242

This PR adds the ability to reopen the resolved block comments

Why?

Currently in the experimental block level commenting feature does not allow a resolved comment to be reopened once it is marked as resolved, nor can any additional comments be added to that block.

How?

Now instead of showing a unclickable checkmark icon, resolved comments show a "Undo" icon button instead for reopening the comment

Testing Instructions

  1. Open a post [currently block comments on published posts aren't supported]
  2. From a block's context menu, add a comment
  3. Resolve the comment
  4. Reopen the comment using the "Undo" icon

Screenshots or screencast

Before

Screen.Recording.2025-08-20.at.1.12.11.PM.mov

After

Screen.Recording.2025-08-20.at.1.13.16.PM.mov

@yashjawale yashjawale marked this pull request as ready for review August 20, 2025 08:11
@github-actions
Copy link

github-actions bot commented Aug 20, 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 <[email protected]>
Co-authored-by: joemcgill <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: t-hamano <[email protected]>

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

@yashjawale yashjawale changed the title [WIP] Block comments: Add the ability to reopen resolved comments Block comments: Add the ability to reopen resolved comments Aug 20, 2025
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Collaborative Workflows Phase 3 of the Gutenberg roadmap around all-things related to collaborative workflows labels Aug 20, 2025
Copy link
Member

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

Thanks @yashjawale, this is functionally working great! I'm curious if the use of the undo icon was taken from any designs for this feature that you were referencing or if it was just an implementation decision?

I'd be interested in moving the UI to reopen the comments to the DropdownMenu rather than showing a button to reopen closed comments.

@yashjawale
Copy link
Contributor Author

@joemcgill the undo icon was just an implementation decision

Yeah moving the UI to DropdownMenu would make more sense, as its more of a secondary action.
I also had a look at other similar UIs & it aligns with approach used by Google Docs

image

@yashjawale
Copy link
Contributor Author

Updated to move Reopen option inside DropdownMenu component instead

Options displayed:
For Unresolved comments -> Edit & Delete
For Resolved comments -> Delete & Reopen

Screen.Recording.2025-08-21.at.11.39.14.AM.mov

@github-actions
Copy link

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 <[email protected]>
Co-authored-by: joemcgill <[email protected]>

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

@adamsilverstein
Copy link
Member

adamsilverstein commented Aug 22, 2025

This is looking good @yashjawale - thanks for working on this and posting the screencasts. Some feedback (see also my comment on the issue):

  • The "resolve comment" button should probably go away for resolved comments.
  • How about adding a comment field that also re-opens the comment similar to Google Docs? this seems like a very natural flow for users.
  • What do you think about removing the confirmation Dialog for resolving a comment? Now that comments can be un-resolved, it feels excessive and a bit disruptive.

@yashjawale
Copy link
Contributor Author

Updates to the PR...

  • Changed "Comment reopened successfully" to "Comment reopened" for snackbar content
  • Removed confirmation dialogs for comment resolve/approve flow
  • Shows a InputControl beneath resolved comment which helps user to reply & reopen a thread in one action
Screen.Recording.2025-08-25.at.6.30.06.PM.mov

@adamsilverstein
Copy link
Member

Thanks for the screencast @yashjawale - functionally that looks great! I will give it a test and a code review soon.

I noticed in your screencast and in my testing that it is possible to leave a comment on an empty block. This behavior feels a little buggy to me, I will open a separate issue to discuss this with the wider group.

One other odd behavior worth discussing more that I saw was splitting a text block with a comment (by hitting enter) makes that comment apply to both blocks. It should probably only apply to the first block. This issue could still happen text fragment commenting - by hitting enter in the middle of a commented string.

@yashjawale
Copy link
Contributor Author

Yes I'm able to replicate the behavior of splitting the text block on my side too
The ideal behavior in this case will probably need more discussion, as some might expect the comment to apply to both as the text in new line was part of the same content which was commented on. While others may favor to keep comment attached to initial block.

imo keeping the comment to just first block makes more sense

@adamsilverstein
Copy link
Member

imo keeping the comment to just first block makes more sense

I agree, but could be swayed either way. I left a comment on the parent issue to start.

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.

Is it possible to move forward with this PR ahead of #71563? #71563 is mainly about internal logic changes rather than UI changes, so it should be possible to consider it separately from this PR.

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.

Looks good!

After resolving conflicts, I think we can also remove these styles, as we added a size prop to the button.

@yashjawale
Copy link
Contributor Author

Updated ✅

@t-hamano t-hamano added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Sep 15, 2025
@github-actions github-actions bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Sep 15, 2025
@t-hamano t-hamano merged commit 74b92fe into WordPress:trunk Sep 15, 2025
70 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.9 Editor Tasks Sep 15, 2025
@github-actions github-actions bot added this to the Gutenberg 21.7 milestone Sep 15, 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 [Type] Enhancement A suggestion for improvement.

Projects

Development

Successfully merging this pull request may close these issues.

Block comments: Add the ability to reopen resolved comments

4 participants