Skip to content

Add edit support to Comments v2 - #25958

Draft
crazytonyli wants to merge 7 commits into
task/comments-v2-m3-replyfrom
task/comments-v2-m3-edit
Draft

Add edit support to Comments v2#25958
crazytonyli wants to merge 7 commits into
task/comments-v2-m3-replyfrom
task/comments-v2-m3-edit

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

This PR lets moderators edit approved, pending, spam, and trashed comments from the detail screen. CommentComposerView reuses the reply composer with edit-specific labels, validation, errors, and discard handling.

Successful edits update the open detail screen and loaded list rows through CommentChangeEvent.contentChanged. CommentsModerationCoordinator serializes edits with other mutations on the same comment.

A timeout after the server saves an edit can still show an error. Retrying sends the latest text again because WordPress treats comment edits as last-writer-wins updates.

Testing instructions

  • Enable Comments v2 and sign in to a self-hosted site with an application password.
  • Open an approved or pending comment, tap More, then Edit. Verify the editor contains the original content and Save stays disabled until the text changes.
  • Save a change. Verify the detail screen updates, then return to the list and verify its snippet updates.
  • Change the content again, then cancel. Verify you can keep editing or discard the changes.
  • Verify Spam and Trash comments can be edited.
  • Disconnect the network before saving. Verify the editor stays open with an error, then reconnect and retry.
  • Verify replying and saving or deleting reply drafts still work.

@dangermattic

Copy link
Copy Markdown
Collaborator
2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number34341
VersionPR #25958
Bundle IDorg.wordpress.alpha
Commita968261
Installation URL2qn12v7c2ob10
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number34341
VersionPR #25958
Bundle IDcom.jetpack.alpha
Commita968261
Installation URL5ikdgkv5sdni8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from ebf3ba2 to e02c669 Compare August 31, 2026 21:51
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from e02c669 to 7c276b0 Compare August 31, 2026 22:24
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from 7c276b0 to cfdeac9 Compare August 31, 2026 22:35
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch 2 times, most recently from 2a4eae3 to 8122a16 Compare September 1, 2026 08:16
@wpmobilebot

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from 8122a16 to ddcebcb Compare September 1, 2026 09:00
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from ddcebcb to ef78be5 Compare September 1, 2026 09:36
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from ef78be5 to 9d77554 Compare September 1, 2026 23:06
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from 9d77554 to 51e3d17 Compare September 2, 2026 09:25
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from 51e3d17 to e3f60a1 Compare September 2, 2026 21:32
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from e3f60a1 to 903750f Compare September 2, 2026 22:09
@crazytonyli
crazytonyli force-pushed the task/comments-v2-m3-edit branch from 903750f to a968261 Compare September 3, 2026 00:29
@crazytonyli crazytonyli changed the title task/comments v2 m3 edit Add edit support to Comments v2 Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants