Skip to content

Commit

Permalink
Merge pull request online-go#2777 from GreenAsJade/add_ingore_in_help…
Browse files Browse the repository at this point in the history
…_for_cms

Tell CMs that they can Ignore reports.
  • Loading branch information
anoek authored Aug 12, 2024
2 parents 6c872aa + d92c831 commit 3368cbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/views/HelpFlows/CommunityModeratorIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ export function CommunityModeratorIntro(): JSX.Element {
<div>
{pgettext(
"A help message describing a community moderator voting option",
"Use this option if you think a full moderator needs to take a look - if the outcome is not clear to you. This will go straight to the moderator queue.",
"Use this option if you think a full moderator needs to take a look - serious or repeat offenders. This will go straight to the moderator queue.",
)}
</div>
</HelpItem>
<HelpItem target="ignore-button" position={"bottom-centre"}>
<div>
{pgettext(
"A help message describing the community moderator 'ignore' button",
"If you are unsure about a report, you can ignore it! It will stay in the queue for others to look at.",
)}
</div>
</HelpItem>
Expand Down
7 changes: 6 additions & 1 deletion src/views/ReportsCenter/ViewReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { openAnnulQueueModal, AnnulQueueModal } from "AnnulQueueModal";
import { ReportTypeSelector } from "./ReportTypeSelector";
import { alert } from "swal_config";
import { ErrorBoundary } from "ErrorBoundary";
import * as DynamicHelp from "react-dynamic-help";

// Used for saving updates to the report
let report_note_id = 0;
Expand Down Expand Up @@ -73,6 +74,9 @@ export function ViewReport({ report_id, reports, onChange }: ViewReportProps): J

const related = report_manager.getRelatedReports(report_id);

const { registerTargetItem } = React.useContext(DynamicHelp.Api);
const { ref: ignore_button } = registerTargetItem("ignore-button");

React.useEffect(() => {
if (report_id) {
// For some reason we have to capture the state of the report at the time that report_id goes valid
Expand Down Expand Up @@ -428,8 +432,9 @@ export function ViewReport({ report_id, reports, onChange }: ViewReportProps): J
{!claimed_by_me && (
<button
className="default"
ref={ignore_button}
onClick={() => {
void report_manager.ignore(report.id);
report_manager.ignore(report.id);
next();
}}
>
Expand Down

0 comments on commit 3368cbc

Please sign in to comment.