Comments: show your own comment right after posting, without a reload #2923
marcusbellamyshaw-cell
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to the reactions RFC (#1497). Per the request in #1903, splitting the next small piece into its own discussion instead of stacking it under the reactions thread, and writing it in plain language this time instead of RFC format.
The problem: right now, submitting a comment clears the form, but the comment itself doesn't show up until you reload the page. Most people read that as "did this even work" and either resubmit or give up. It's worse under
commentsModeration: "none"(auto-approve), where the comment is already live in the database and the author still can't see it without reloading.Proposed fix: an opt-in
liveprop on<CommentForm>and<Comments>. When it's set:Leave the prop off and nothing changes: no extra script, no behavior difference.
There's already a draft PR for this (#1903) with tests and a Playwright e2e check, so the idea isn't just theoretical. Working on it also turned up a real bug: comments flagged as spam were rendering as "pending" instead of being hidden, which is fixed there too.
Why this needs to be core and can't be a plugin: a plugin has no way to touch what
<Comments>/<CommentForm>render, or to change what the comment POST route returns.One open question: is returning the full comment object in the POST response fine, or is there a reason to keep that response minimal that I'm not seeing?
(Drafted with Claude's help, same as the reactions proposal — flagging that up front rather than after the fact.)
All reactions