talk icon indicating copy to clipboard operation
talk copied to clipboard

Fix/corl 2261 children of rejected comments

Open marcushaddon opened this issue 3 years ago • 1 comments

What does this PR do?

This PR makes disallows replies to comments that are themselves not rejected, but are descendants of rejected comments.

What changes to the GraphQL/Database Schema does this PR introduce?

This adds the optional boolean field canRespond to the Comment type, which currently just checks for the presence of a rejectedAncestor field on the comment document, but could be utilized for other reasons to disallow replies.

Does this PR introduce any new environment variables or feature flags?

No.

If any indexes were added, were they added to INDEXES.md?

n/a

How do I test this PR?

  1. create root comment
  2. create replies +2 levels deep from a couple of commenters
  3. report a middle child as commenter
  4. verify that middle child can be responded to
  5. reject middle child as admin
  6. verify that ancestor of rejected ancestor cannot be replied to in My Profile
  7. report and reject root comment
  8. verify that ancestors of root comment (so, all) cannot be replied to in My Profile tab as commenter
  9. unreject root comment as admin
  10. verify that ancestors of root comment (that are not also ancestors of rejected ancestor) can be replied to in Comment Stream AND My Profile tab as commenter
  11. verify that ancestors of rejected ancestor (from step 3) reply still cannot be replied to
  12. unreject rejected ancestor
  13. verify that ancestors of now un-rejected ancestor can be replied to

How do we deploy this PR?

No special considerations should be needed.

marcushaddon avatar Jul 14 '22 14:07 marcushaddon

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit 6921a2681692313d96e6c7351f3b36a53203cdd9
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/630f9dac5c7b100009c96fd1

netlify[bot] avatar Jul 14 '22 14:07 netlify[bot]

@kabeaty Test has been added!

marcushaddon avatar Aug 31 '22 18:08 marcushaddon