Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader comments are misplaced after moderation #18081

Closed
dvdchr opened this issue Mar 3, 2022 · 0 comments · Fixed by #18094
Closed

Reader comments are misplaced after moderation #18081

dvdchr opened this issue Mar 3, 2022 · 0 comments · Fixed by #18094

Comments

@dvdchr
Copy link
Contributor

dvdchr commented Mar 3, 2022

Refs #17869 (review)

Expected behavior

When a comment is moderated (to either unapproved, spam, or trash), its replies should also be hidden from the thread.

Actual behavior

Replies of moderated comments are misplaced in the thread. Some more details quoted from @frosty 's pull review comment:

[...] I had a post with 5 comments:

A
B
\__ C
     \__ D
E

If I unapprove B from the moderation screen, here's what happens in various places:

Reader comments view in the app:

Continues to show A, C, D, and E.
C and D are now shown as replies to B, which I think is probably a bug.
The app shows a count of 4 comments – the total number of approved comments, even though two of them are replies to a comment that is no longer visible.

Reader on the web:

Only shows the top level comments, A and E. The replies to the unapproved comment are not visible.
Shows a comment count of 2 to match the visible comments.

Frontend of the website:

Only shows the top level comments, A and E. The replies to the unapproved comment are not visible.
Shows a comment count of 4 – the total number of approved comments, even though two of them aren't visible. [...]

Steps to reproduce the behavior

  • Create a post with comments similar to the structure described above.
  • Moderate comment B (the second top-level comment that has nested replies). Some ways to do this:
    • From the Calypso dashboard.
    • From My Sites > Comments.
    • From the comment threads > tap on the ellipsis menu
  • Observe that the reply comments from B are now "attached" to comment A.
Tested on iPhone 8 Simulator, iOS 15.2, WPiOS 19.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant