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

[CORL-2984]: Add ability to select rejection reason for Reject all comments when DSA enabled #4455

Merged
merged 8 commits into from
Jan 11, 2024

Conversation

kabeaty
Copy link
Contributor

@kabeaty kabeaty commented Dec 12, 2023

What does this PR do?

These changes add the ability to select a rejection reason when banning a user and rejecting all of their comments when DSA is enabled.

They also ensure that reason of SPAM is what is sent through when using spam ban in-stream moderation.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

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

rejectionReason info is added to the input for banning a user and updating a user ban so that it can be used for the reason for rejected existing comments

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?

Go into the admin and enable DSA. Go to the Community tab and find a user to ban (you'll want them to have a few comments that you can reject too). Ban them on

  1. all sites with Reject all comments selected. See that once you select Reject all comments, the Save button is disabled until you choose a reason for rejection. It should be enabled when you choose a reason. You should be able to add a detailed explanation as well. If you choose the Other reason, you will need to add a custom reason as well to be able to save and submit the ban. Submit and then see that all comments for the user are rejected with the given reason/explanation/custom reason combo.
  2. specific sites with Reject all comments selected. Use same testing instructions as for all sites, as should see same options.

Now disable DSA. See that the flow is as before; you can select Reject all comments but there is no required rejection reason, etc.

With DSA enabled, also go to the stream as an admin and spam ban a user with multiple comments. See that when you check those comments' rejection reason, it says SPAM. If DSA is disabled, you shouldn't see this SPAM reason added.

Were any tests migrated to React Testing Library?

How do we deploy this PR?

@kabeaty kabeaty requested a review from nick-funk December 12, 2023 19:07
Copy link

netlify bot commented Dec 12, 2023

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit 7b253e2
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/6578af6358c7ba0008871082

Copy link
Contributor

@nick-funk nick-funk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@nick-funk nick-funk added this pull request to the merge queue Jan 11, 2024
Merged via the queue into develop with commit 7a2bccb Jan 11, 2024
6 checks passed
@nick-funk nick-funk deleted the feat/CORL-2984-reject-all-comments-dsa branch January 11, 2024 20:49
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.

2 participants