coralproject / talk

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

[CORL-3006]: Enable anonymous DSA reporting #4469

Closed kabeaty closed 8 months ago

kabeaty commented 9 months ago

What does this PR do?

These changes enable DSA reports to be made by users who are not signed in. If a user is not signed in, and DSA is enabled, then when they hit the Report button for a comment, they will go into a flow that allows them to report illegal content but provides the info that to report a comment in any other way, they must sign in.

If DSA is not enabled, the report flow remains as is.

These changes will impact:

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

userID is no longer required for a DSA report

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?

You can test this PR by enabling DSA and ensuring you are logged out. Click Report for a comment in the stream. See that it says "Report This Comment" and "You have to sign in to report a comment". You should also see a link to report the comment for illegal content. Click that link. Stay signed out and fill out the DSA report. Click Submit report. You should see a submission success screen. Now log in to the admin and go to the DSA Reports tab. Find the new report you just created. For Reported by in the overall reports table, it should say Anonymous user. Click through to that report's individual page. For Reporter, it should say Anonymous user. Download the report's CSV. In the User column, it should say "Anonymous user`.

Sign in and report a DSA report. All should still be as before, you should be able to create your report and see the reporter displayed.

Disable DSA. Try to report a comment signed in/out and see that the flow is still as it was. Signed out, you are prompted to sign in before reporting. Signed in, you go to the report form.

Archived comment report flow remains the same, as it doesn't require being signed in.

Were any tests migrated to React Testing Library?

How do we deploy this PR?

netlify[bot] commented 9 months ago

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
Latest commit 72fbdee86d39a7995a7334f93bb7e01824d472db
Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/6581f0b0289355000708041b