[CORL-882] option to reject all a user's comments when banning (#2827)

* show comment counts for stories in story table

* remove debug code

* add rejector task

* connect comment rejection job to user banning

* localize strings

* remove debug code

* remove debug code

* resolve merge conflicts

* add documentation to rejectExistingComments

* clean up rejector task

* add TODO about broker

* make rejectExistingComments nullable
This commit is contained in:
Tessa Thornton
2020-02-21 12:38:40 -05:00
committed by GitHub
parent ca52cc3253
commit d6db287c55
24 changed files with 491 additions and 120 deletions
+39
View File
@@ -492,6 +492,19 @@ export const stories = createFixtures<GQLStory>([
title: "Finally a Cure for Cancer",
publishedAt: "2018-11-29T16:01:51.897Z",
},
commentCounts: {
totalPublished: 5,
},
moderationQueues: {
reported: {
id: "reported",
count: 3,
},
pending: {
id: "pending",
count: 2,
},
},
site: sites[0],
},
{
@@ -506,6 +519,19 @@ export const stories = createFixtures<GQLStory>([
title: "First Colony on Mars",
publishedAt: "2018-11-29T16:01:51.897Z",
},
commentCounts: {
totalPublished: 5,
},
moderationQueues: {
reported: {
id: "reported",
count: 3,
},
pending: {
id: "pending",
count: 2,
},
},
site: sites[1],
},
{
@@ -515,6 +541,19 @@ export const stories = createFixtures<GQLStory>([
isClosed: true,
status: GQLSTORY_STATUS.CLOSED,
url: "",
commentCounts: {
totalPublished: 5,
},
moderationQueues: {
reported: {
id: "reported",
count: 3,
},
pending: {
id: "pending",
count: 2,
},
},
metadata: {
author: undefined,
title: "World hunger has been defeated",
@@ -155,14 +155,19 @@ exports[`renders empty stories 1`] = `
</span>
</th>
<th
className="TableCell-root StoryTable-authorColumn TableCell-header"
className="TableCell-root StoryTable-reportedCountColumn TableCell-header"
>
Author
Reported
</th>
<th
className="TableCell-root StoryTable-publishDateColumn TableCell-header"
className="TableCell-root StoryTable-pendingCountColumn TableCell-header"
>
Publish Date
Pending
</th>
<th
className="TableCell-root StoryTable-totalCountColumn TableCell-header"
>
Total
</th>
<th
className="TableCell-root StoryTable-statusColumn TableCell-header"
@@ -180,23 +185,45 @@ exports[`renders empty stories 1`] = `
<td
className="TableCell-root StoryRow-titleColumn TableCell-body"
>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-1"
onClick={[Function]}
<div
className="Box-root HorizontalGutter-root HorizontalGutter-full"
>
Finally a Cure for Cancer
</a>
<p>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-1"
onClick={[Function]}
>
Finally a Cure for Cancer
</a>
</p>
<p
className="StoryRow-meta"
>
<span
className="StoryRow-authorName"
>
Vin Hoa
</span>
11/29/2018, 4:01 PM
</p>
</div>
</td>
<td
className="TableCell-root StoryRow-authorColumn TableCell-body"
className="TableCell-root StoryRow-reportedCountColumn StoryRow-boldColumn TableCell-body"
>
Vin Hoa
3
</td>
<td
className="TableCell-root StoryRow-publishDateColumn TableCell-body"
className="TableCell-root StoryRow-pendingCountColumn StoryRow-boldColumn TableCell-body"
>
11/29/2018, 4:01 PM
2
</td>
<td
className="TableCell-root StoryRow-totalCountColumn StoryRow-boldColumn TableCell-body"
>
5
</td>
<td
className="TableCell-root StoryRow-statusColumn TableCell-body"
@@ -251,23 +278,45 @@ exports[`renders empty stories 1`] = `
<td
className="TableCell-root StoryRow-titleColumn TableCell-body"
>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-2"
onClick={[Function]}
<div
className="Box-root HorizontalGutter-root HorizontalGutter-full"
>
First Colony on Mars
</a>
<p>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-2"
onClick={[Function]}
>
First Colony on Mars
</a>
</p>
<p
className="StoryRow-meta"
>
<span
className="StoryRow-authorName"
>
Linh Nguyen
</span>
11/29/2018, 4:01 PM
</p>
</div>
</td>
<td
className="TableCell-root StoryRow-authorColumn TableCell-body"
className="TableCell-root StoryRow-reportedCountColumn StoryRow-boldColumn TableCell-body"
>
Linh Nguyen
3
</td>
<td
className="TableCell-root StoryRow-publishDateColumn TableCell-body"
className="TableCell-root StoryRow-pendingCountColumn StoryRow-boldColumn TableCell-body"
>
11/29/2018, 4:01 PM
2
</td>
<td
className="TableCell-root StoryRow-totalCountColumn StoryRow-boldColumn TableCell-body"
>
5
</td>
<td
className="TableCell-root StoryRow-statusColumn TableCell-body"
@@ -478,14 +527,19 @@ exports[`renders stories 1`] = `
</span>
</th>
<th
className="TableCell-root StoryTable-authorColumn TableCell-header"
className="TableCell-root StoryTable-reportedCountColumn TableCell-header"
>
Author
Reported
</th>
<th
className="TableCell-root StoryTable-publishDateColumn TableCell-header"
className="TableCell-root StoryTable-pendingCountColumn TableCell-header"
>
Publish Date
Pending
</th>
<th
className="TableCell-root StoryTable-totalCountColumn TableCell-header"
>
Total
</th>
<th
className="TableCell-root StoryTable-statusColumn TableCell-header"
@@ -503,23 +557,45 @@ exports[`renders stories 1`] = `
<td
className="TableCell-root StoryRow-titleColumn TableCell-body"
>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-1"
onClick={[Function]}
<div
className="Box-root HorizontalGutter-root HorizontalGutter-full"
>
Finally a Cure for Cancer
</a>
<p>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-1"
onClick={[Function]}
>
Finally a Cure for Cancer
</a>
</p>
<p
className="StoryRow-meta"
>
<span
className="StoryRow-authorName"
>
Vin Hoa
</span>
11/29/2018, 4:01 PM
</p>
</div>
</td>
<td
className="TableCell-root StoryRow-authorColumn TableCell-body"
className="TableCell-root StoryRow-reportedCountColumn StoryRow-boldColumn TableCell-body"
>
Vin Hoa
3
</td>
<td
className="TableCell-root StoryRow-publishDateColumn TableCell-body"
className="TableCell-root StoryRow-pendingCountColumn StoryRow-boldColumn TableCell-body"
>
11/29/2018, 4:01 PM
2
</td>
<td
className="TableCell-root StoryRow-totalCountColumn StoryRow-boldColumn TableCell-body"
>
5
</td>
<td
className="TableCell-root StoryRow-statusColumn TableCell-body"
@@ -574,23 +650,45 @@ exports[`renders stories 1`] = `
<td
className="TableCell-root StoryRow-titleColumn TableCell-body"
>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-2"
onClick={[Function]}
<div
className="Box-root HorizontalGutter-root HorizontalGutter-full"
>
First Colony on Mars
</a>
<p>
<a
className="TextLink-root"
href="/admin/moderate/stories/story-2"
onClick={[Function]}
>
First Colony on Mars
</a>
</p>
<p
className="StoryRow-meta"
>
<span
className="StoryRow-authorName"
>
Linh Nguyen
</span>
11/29/2018, 4:01 PM
</p>
</div>
</td>
<td
className="TableCell-root StoryRow-authorColumn TableCell-body"
className="TableCell-root StoryRow-reportedCountColumn StoryRow-boldColumn TableCell-body"
>
Linh Nguyen
3
</td>
<td
className="TableCell-root StoryRow-publishDateColumn TableCell-body"
className="TableCell-root StoryRow-pendingCountColumn StoryRow-boldColumn TableCell-body"
>
11/29/2018, 4:01 PM
2
</td>
<td
className="TableCell-root StoryRow-totalCountColumn StoryRow-boldColumn TableCell-body"
>
5
</td>
<td
className="TableCell-root StoryRow-statusColumn TableCell-body"