Comment likes being "lost" after refresh in Reader #85276
Labels
[Feature Group] User Interaction & Engagement
Tools and features for site owners to share, promote, and manage engagement with their audiences.
[Feature] Reader
The reader site on Calypso.
[Pri] Normal
Schedule for the next available opportuinity.
[Product] WordPress.com
All features accessible on and related to WordPress.com.
Triaged
To be used when issues have been triaged.
[Type] Bug
Quick summary
As reported in p1702541010734839-slack-CBG1CP4EN, we have a user reporting an issue where liking a comment in the Reader and then refreshing the page causes the like to disappear.
The behaviour seems very similar to #84213, which was a very similar behaviour for posts in the Reader that we addressed a few weeks ago.
Steps to reproduce
You may need to throttle your network connection to make it easier to reproduce.
What you expected to happen
The comment should show as liked by the current user after the refresh.
What actually happened
The comment doesn't always show as liked after the refresh.
Impact
Some (< 50%)
Available workarounds?
Yes, easy to implement
Platform (Simple and/or Atomic)
No response
Logs or notes
I took a quick look at this as I worked on the previous issue with likes for Reader posts, and it looks like we have a related issue to do with client-side state.
When I took a look at https://github.com/Automattic/wp-calypso/blob/6c2c5f9e3bd92a81a4b926161ae7032e6e31064b/client/state/data-layer/wpcom/sites/comments/likes/new/index.js, it seems like we're only updating the client-side state after we get the response back from the server. If that's true, it would be more user-friendly to optimistically update the client-side state and roll the update back if there was an error.
The text was updated successfully, but these errors were encountered: