From d644e3cf253e6374e4cc59f7ae9529f13f9e5d8f Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 2 May 2022 09:59:42 -0400 Subject: [PATCH] Fix a few visual issues --- .../report-modal/steps/other-actions-step.tsx | 2 +- .../modals/report-modal/steps/reason-step.tsx | 121 +++++++++--------- 2 files changed, 63 insertions(+), 60 deletions(-) diff --git a/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx b/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx index a2231995a..bdba7bd4b 100644 --- a/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx +++ b/app/soapbox/features/ui/components/modals/report-modal/steps/other-actions-step.tsx @@ -95,7 +95,7 @@ const OtherActionsStep = ({ account }: IOtherActionsStep) => { {renderSelectedStatuses()} - {!features.reportMultipleStatuses && ( + {features.reportMultipleStatuses && ( Include other statuses? diff --git a/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx b/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx index 8bd5a4860..50956734b 100644 --- a/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx +++ b/app/soapbox/features/ui/components/modals/report-modal/steps/reason-step.tsx @@ -68,6 +68,7 @@ const ReasonStep = (_props: IReasonStep) => { const comment = useAppSelector((state) => state.reports.getIn(['new', 'comment']) as string); const rules = useAppSelector((state) => state.rules.items); const ruleId = useAppSelector((state) => state.reports.getIn(['new', 'rule_id']) as boolean); + const shouldRequireRule = rules.length > 0; const renderSelectedStatuses = useCallback(() => { switch (selectedStatusIds.size) { @@ -112,69 +113,71 @@ const ReasonStep = (_props: IReasonStep) => { {renderSelectedStatuses()} - - Reason for reporting + {shouldRequireRule && ( + + Reason for reporting -
-
- {rules.map((rule, idx) => { - const isSelected = String(ruleId) === rule.id; +
+
+ {rules.map((rule, idx) => { + const isSelected = String(ruleId) === rule.id; - return ( - - ); - })} + + + ); + })} +
+ +
+
- -
-
-
- + + )}