coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.89k stars 355 forks source link

[CORL-2916]: DSA - Report illegal content #4367

Closed kabeaty closed 11 months ago

kabeaty commented 11 months ago

What does this PR do?

These changes add in the ability to submit an illegal content report per DSA. A DSA report is created when this is done.

Note that most copy and some design is still TBD.

TODO:

These changes will impact:

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

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

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

How do I test this PR?

Make sure you've run npm run build in common

Go to a comment in the stream. Click report. Click Report illegal content link. See the illegal content report form and fill it out. Test with/without the additional of additional comments. See that you can't submit until all required fields are completed (law broken, additional info, and bonafide belief checkbox). See that it correctly submits and creates a new DSAReport. You should see a confirmation screen with successes and errors after submit (still pending design input).

See that once you've submitted a comment as having illegal content, and return to the stream, the comment shows as Reported same as when a comment is reported for any other reason.

Where any tests migrated to React Testing Library?

Yes, reportComment.spec.tsx was migrated and a test around the illegal content report link added

How do we deploy this PR?