coralproject / talk

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

[CORL-2993]: Top commenter backend work #4465

Closed kabeaty closed 8 months ago

kabeaty commented 9 months ago

What does this PR do?

These changes implement the backend to support the Top commenter badge feature.

These changes will impact:

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

These changes add lastFeaturedDate and featuredCommenter to users.

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 feature a comment, and then go check and see that the commenter for that comment has a lastFeaturedDate set to the time when that comment was featured. Feature another comment by that same commenter. See that there is a new lastFeaturedDate for that user. Unfeature one of the comments. The lastFeaturedDate should now be the date the other comment was featured. If you unfeature all comments for a commenter, lastFeaturedDate should be null.

Check that this works with and without the data cache.

Were any tests migrated to React Testing Library?

How do we deploy this PR?