Create Mod Inbox action details screen (#11657)

This commit is contained in:
DS Boyce
2026-09-04 09:21:40 -07:00
committed by GitHub
parent 4296e4aafd
commit 2950ecf2b5
8 changed files with 112 additions and 7 deletions
+7 -1
View File
@@ -89,8 +89,9 @@ import {MessagesSettingsScreen} from '#/screens/Messages/Settings'
import {ModerationScreen} from '#/screens/Moderation' import {ModerationScreen} from '#/screens/Moderation'
import {Screen as ModerationVerificationSettings} from '#/screens/Moderation/VerificationSettings' import {Screen as ModerationVerificationSettings} from '#/screens/Moderation/VerificationSettings'
import {ModerationInboxScreen} from '#/screens/ModerationInbox' import {ModerationInboxScreen} from '#/screens/ModerationInbox'
import {ModerationInboxReportDetailsScreen} from '#/screens/ModerationInbox/Details' import {ModerationInboxReportDetailsScreen} from '#/screens/ModerationInbox/Report'
import {ModerationInboxSettingsScreen} from '#/screens/ModerationInbox/Settings' import {ModerationInboxSettingsScreen} from '#/screens/ModerationInbox/Settings'
import {ModerationInboxSubjectDetailsScreen} from '#/screens/ModerationInbox/Subject'
import {Screen as ModerationInteractionSettings} from '#/screens/ModerationInteractionSettings' import {Screen as ModerationInteractionSettings} from '#/screens/ModerationInteractionSettings'
import {NotificationsActivityListScreen} from '#/screens/Notifications/ActivityList' import {NotificationsActivityListScreen} from '#/screens/Notifications/ActivityList'
import {PostLikedByScreen} from '#/screens/Post/PostLikedBy' import {PostLikedByScreen} from '#/screens/Post/PostLikedBy'
@@ -196,6 +197,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
getComponent={() => ModerationInboxReportDetailsScreen} getComponent={() => ModerationInboxReportDetailsScreen}
options={{title: title(msg`Your report`), requireAuth: true}} options={{title: title(msg`Your report`), requireAuth: true}}
/> />
<Stack.Screen
name="ModerationInboxSubjectDetails"
getComponent={() => ModerationInboxSubjectDetailsScreen}
options={{title: title(msg`Notice`), requireAuth: true}}
/>
<Stack.Screen <Stack.Screen
name="ModerationModlists" name="ModerationModlists"
getComponent={() => ModerationModlistsScreen} getComponent={() => ModerationModlistsScreen}
+1
View File
@@ -26,6 +26,7 @@ export type CommonNavigatorParams = {
ModerationInbox: undefined ModerationInbox: undefined
ModerationInboxSettings: undefined ModerationInboxSettings: undefined
ModerationInboxReportDetails: undefined ModerationInboxReportDetails: undefined
ModerationInboxSubjectDetails: undefined
ModerationModlists: undefined ModerationModlists: undefined
ModerationMutedAccounts: undefined ModerationMutedAccounts: undefined
ModerationBlockedAccounts: undefined ModerationBlockedAccounts: undefined
+1
View File
@@ -20,6 +20,7 @@ export const router = new Router<AllNavigatableRoutes>({
ModerationInbox: '/moderation/inbox', ModerationInbox: '/moderation/inbox',
ModerationInboxSettings: '/moderation/inbox/settings', ModerationInboxSettings: '/moderation/inbox/settings',
ModerationInboxReportDetails: '/moderation/inbox/report/details', ModerationInboxReportDetails: '/moderation/inbox/report/details',
ModerationInboxSubjectDetails: '/moderation/inbox/subject/details',
ModerationModlists: '/moderation/modlists', ModerationModlists: '/moderation/modlists',
ModerationMutedAccounts: '/moderation/muted-accounts', ModerationMutedAccounts: '/moderation/muted-accounts',
ModerationBlockedAccounts: '/moderation/blocked-accounts', ModerationBlockedAccounts: '/moderation/blocked-accounts',
+94
View File
@@ -0,0 +1,94 @@
import {View} from 'react-native'
import {Trans, useLingui} from '@lingui/react/macro'
import {NotFoundScreen} from '#/view/screens/NotFound'
import {atoms as a, useTheme} from '#/alf'
import * as Layout from '#/components/Layout'
import {InlineLinkText} from '#/components/Link'
import {Text} from '#/components/Typography'
import {useAnalytics} from '#/analytics'
import {ActionSummaryText} from './components/ActionSummaryText'
import {ContentBlock} from './components/ContentBlock'
import {SubjectPreview} from './components/SubjectPreview'
import {Timeline} from './components/Timeline'
const ANTI_HARASSMENT =
'https://bsky.social/about/support/community-guidelines#:~:text=coordinated%20harassment%20campaigns.-,Anti%2DHarassment,-%3A%20We%20create%20space'
export function ModerationInboxSubjectDetailsScreen() {
const t = useTheme()
const {t: l} = useLingui()
const ax = useAnalytics()
const isEnabled = ax.features.enabled(ax.features.ModerationInboxEnable)
if (!isEnabled) {
return <NotFoundScreen />
}
return (
<Layout.Screen testID="moderationInboxSubjectDetailsScreen">
<Layout.Header.Outer>
<Layout.Header.BackButton />
<Layout.Header.Content align="left">
<Layout.Header.TitleText>
<Trans>Notice</Trans>
</Layout.Header.TitleText>
<Layout.Header.SubtitleText>
<Trans>Bluesky Moderation Service</Trans>
</Layout.Header.SubtitleText>
</Layout.Header.Content>
<Layout.Header.Slot />
</Layout.Header.Outer>
<Layout.Content>
<View style={[a.p_lg, a.gap_lg]}>
<ActionSummaryText
header={l`Appeal approved: Your post has been restored`}>
<Trans>
A moderator reviewed your appeal and reversed the original
decision. Your post has been restored and is visible again.
</Trans>
</ActionSummaryText>
<ContentBlock header={l`Restored post`}>
<SubjectPreview />
<View style={[a.gap_2xs]}>
<Text style={[a.text_sm, t.atoms.text_contrast_medium]}>
<Trans>Rule violated:</Trans>
</Text>
<Text style={[a.text_md]}>
<Trans>
<InlineLinkText
to={ANTI_HARASSMENT}
label={l`Community Guidelines: Harassment`}
style={[a.text_md]}>
Community Guidelines: Harassment
</InlineLinkText>
</Trans>
</Text>
</View>
</ContentBlock>
<Timeline
items={[
{
title: l`Post created`,
},
{
title: l`Post removed`,
},
{
title: l`Appeal submitted`,
},
{
title: l`Appeal approved, post restored`,
},
]}
/>
</View>
</Layout.Content>
</Layout.Screen>
)
}
@@ -13,7 +13,9 @@ export function ActionSummaryText({
// oxlint-disable-next-line bsky-internal/avoid-unwrapped-text // oxlint-disable-next-line bsky-internal/avoid-unwrapped-text
return ( return (
<View style={[a.gap_xs]}> <View style={[a.gap_xs]}>
<H1 accessibilityRole="header" style={[a.text_xl, a.font_semi_bold]}> <H1
accessibilityRole="header"
style={[a.text_xl, a.font_semi_bold, a.leading_tight]}>
{header} {header}
</H1> </H1>
<Text style={[a.text_md, t.atoms.text_contrast_high]}>{children}</Text> <Text style={[a.text_md, t.atoms.text_contrast_high]}>{children}</Text>
@@ -12,7 +12,8 @@ export function ContentBlock({
return ( return (
<View <View
style={[ style={[
a.p_md, a.py_md,
a.px_lg,
a.gap_md, a.gap_md,
a.rounded_md, a.rounded_md,
a.border, a.border,
+4 -4
View File
@@ -197,7 +197,7 @@ function YourAccount() {
})} })}
action={l`Violates community guideline: ${guideline}`} action={l`Violates community guideline: ${guideline}`}
date={new Date()} date={new Date()}
to="/moderation/inbox/report/details" to="/moderation/inbox/subject/details"
unread unread
/> />
<ReportRow <ReportRow
@@ -207,16 +207,16 @@ function YourAccount() {
})} })}
action={l`“${label}” – shown behind a warning`} action={l`“${label}” – shown behind a warning`}
date={new Date()} date={new Date()}
to="/moderation/inbox/report/details" to="/moderation/inbox/subject/details"
/> />
<ReportRow <ReportRow
subject={l({ subject={l({
context: 'moderation-report-action', context: 'moderation-report-action',
message: `A label was added to your post`, message: `Your account was suspended`,
})} })}
action={l`Ban evasion – ${duration}, now expired`} action={l`Ban evasion – ${duration}, now expired`}
date={new Date()} date={new Date()}
to="/moderation/inbox/report/details" to="/moderation/inbox/subject/details"
/> />
</Layout.Center> </Layout.Center>
) )