From f5974c665bd8a181b5420e0fc8269ead3de389d7 Mon Sep 17 00:00:00 2001 From: scanash00 Date: Fri, 12 Jun 2026 07:24:18 -0800 Subject: [PATCH] Remove Bluesky support/feedback links (Zendesk PII egress) --- src/Navigation.tsx | 6 --- src/lib/constants.ts | 20 --------- src/lib/hooks/useCreateSupportLink.ts | 40 ----------------- src/lib/routes/types.ts | 1 - src/routes.ts | 1 - src/screens/Settings/Settings.tsx | 14 +----- src/screens/Signup/index.tsx | 16 ------- src/view/screens/Support.tsx | 44 ------------------ src/view/shell/Drawer.tsx | 64 +++------------------------ src/view/shell/desktop/RightNav.tsx | 24 +--------- 10 files changed, 7 insertions(+), 223 deletions(-) delete mode 100644 src/lib/hooks/useCreateSupportLink.ts delete mode 100644 src/view/screens/Support.tsx diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 1dbec9c..eedeea0 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -70,7 +70,6 @@ import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy' import {ProfileScreen} from '#/view/screens/Profile' import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy' import {StorybookScreen} from '#/view/screens/Storybook' -import {SupportScreen} from '#/view/screens/Support' import {TermsOfServiceScreen} from '#/view/screens/TermsOfService' import {BottomBar} from '#/view/shell/bottom-bar/BottomBar' import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth' @@ -323,11 +322,6 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { getComponent={() => LogScreen} options={{title: title(msg`Log`), requireAuth: true}} /> - SupportScreen} - options={{title: title(msg`Support`)}} - /> PrivacyPolicyScreen} diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 91d1319..adc51c5 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -11,8 +11,6 @@ export const BSKY_SERVICE = 'https://bsky.social' export const BSKY_SERVICE_DID = 'did:web:bsky.social' export const PUBLIC_BSKY_SERVICE = 'https://public.api.bsky.app' export const DEFAULT_SERVICE = BSKY_SERVICE -const HELP_DESK_LANG = 'en-us' -export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}` export const CHAT_SERVICE = 'https://api.bsky.chat' export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` @@ -40,24 +38,6 @@ export const DISCOVER_DEBUG_DIDS: Record = { 'did:plc:2dzyut5lxna5ljiaasgeuffz': true, // darrin.bsky.team } -const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new` -export function FEEDBACK_FORM_URL({ - email, - handle, -}: { - email?: string - handle?: string -}): string { - let str = BASE_FEEDBACK_FORM_URL - if (email) { - str += `?tf_anonymous_requester_email=${encodeURIComponent(email)}` - if (handle) { - str += `&tf_17205412673421=${encodeURIComponent(handle)}` - } - } - return str -} - export const MAX_DISPLAY_NAME = 64 export const MAX_DESCRIPTION = 256 diff --git a/src/lib/hooks/useCreateSupportLink.ts b/src/lib/hooks/useCreateSupportLink.ts deleted file mode 100644 index 5f5bfd5..0000000 --- a/src/lib/hooks/useCreateSupportLink.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {useCallback} from 'react' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' - -import {useSession} from '#/state/session' - -export const ZENDESK_SUPPORT_URL = - 'https://blueskyweb.zendesk.com/hc/requests/new' - -export enum SupportCode { - AA_DID = 'AA_DID', - AA_BIRTHDATE = 'AA_BIRTHDATE', -} - -/** - * {@link https://support.zendesk.com/hc/en-us/articles/4408839114522-Creating-pre-filled-ticket-forms} - */ -export function useCreateSupportLink() { - const {_} = useLingui() - const {currentAccount} = useSession() - - return useCallback( - ({code, email}: {code: SupportCode; email?: string}) => { - const url = new URL(ZENDESK_SUPPORT_URL) - if (currentAccount) { - url.search = new URLSearchParams({ - tf_anonymous_requester_email: email || currentAccount.email || '', // email will be defined - tf_description: - `[Code: ${code}] — ` + _(msg`Please write your message below:`), - /** - * Custom field specific to {@link ZENDESK_SUPPORT_URL} form - */ - tf_17205412673421: currentAccount.handle + ` (${currentAccount.did})`, - }).toString() - } - return url.toString() - }, - [_, currentAccount], - ) -} diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts index 8996d2f..4b46f0a 100644 --- a/src/lib/routes/types.ts +++ b/src/lib/routes/types.ts @@ -36,7 +36,6 @@ export type CommonNavigatorParams = { DebugMod: undefined SharedPreferencesTester: undefined Log: undefined - Support: undefined PrivacyPolicy: undefined TermsOfService: undefined CommunityGuidelines: undefined diff --git a/src/routes.ts b/src/routes.ts index 87b58e0..dcb3554 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -62,7 +62,6 @@ export const router = new Router({ NotificationSettings: '/settings/notifications', FindContactsSettings: '/settings/find-contacts', // support - Support: '/support', PrivacyPolicy: '/support/privacy', TermsOfService: '/support/tos', CommunityGuidelines: '/support/community-guidelines', diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index 44a6719..ff6f468 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -1,12 +1,11 @@ import {useState} from 'react' -import {Alert, LayoutAnimation, Linking, Pressable, View} from 'react-native' +import {Alert, LayoutAnimation, Pressable, View} from 'react-native' import {useReducedMotion} from 'react-native-reanimated' import {type AppBskyActorDefs, moderateProfile} from '@atproto/api' import {Trans, useLingui} from '@lingui/react/macro' import {useNavigation} from '@react-navigation/native' import {type NativeStackScreenProps} from '@react-navigation/native-stack' -import {HELP_DESK_URL} from '#/lib/constants' import {useAccountSwitcher} from '#/lib/hooks/useAccountSwitcher' import {useApplyPullRequestOTAUpdate} from '#/lib/hooks/useOTAUpdates' import { @@ -38,7 +37,6 @@ import {Accessibility_Stroke2_Corner2_Rounded as AccessibilityIcon} from '#/comp import {Bell_Stroke2_Corner0_Rounded as NotificationIcon} from '#/components/icons/Bell' import {BubbleInfo_Stroke2_Corner2_Rounded as BubbleInfoIcon} from '#/components/icons/BubbleInfo' import {ChevronTop_Stroke2_Corner0_Rounded as ChevronUpIcon} from '#/components/icons/Chevron' -import {CircleQuestion_Stroke2_Corner2_Rounded as CircleQuestionIcon} from '#/components/icons/CircleQuestion' import {CodeBrackets_Stroke2_Corner2_Rounded as CodeBracketsIcon} from '#/components/icons/CodeBrackets' import {Contacts_Stroke2_Corner2_Rounded as ContactsIcon} from '#/components/icons/Contacts' import {DotGrid3x1_Stroke2_Corner0_Rounded as DotsHorizontal} from '#/components/icons/DotGrid' @@ -235,16 +233,6 @@ export function SettingsScreen({}: Props) { Languages - void Linking.openURL(HELP_DESK_URL)} - label={l`Help`} - accessibilityHint={l`Opens helpdesk in browser`}> - - - Help - - - diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx index da400aa..47c80fc 100644 --- a/src/screens/Signup/index.tsx +++ b/src/screens/Signup/index.tsx @@ -5,7 +5,6 @@ import Animated, {FadeIn, LayoutAnimationConfig} from 'react-native-reanimated' import {AppBskyGraphStarterpack} from '@atproto/api' import {Trans, useLingui} from '@lingui/react/macro' -import {FEEDBACK_FORM_URL} from '#/lib/constants' import {logger} from '#/logger' import {useServiceQuery} from '#/state/queries/service' import {useStarterPackQuery} from '#/state/queries/starter-packs' @@ -25,7 +24,6 @@ import {atoms as a, native, useBreakpoints, useTheme} from '#/alf' import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {Divider} from '#/components/Divider' import {LinearGradientBackground} from '#/components/LinearGradientBackground' -import {InlineLinkText} from '#/components/Link' import {ScreenTransition} from '#/components/ScreenTransition' import {Text} from '#/components/Typography' import {GCP_PROJECT_ID, IS_ANDROID} from '#/env' @@ -210,20 +208,6 @@ export function Signup({onPressBack}: {onPressBack: () => void}) { a.align_center, ]}> - - Having trouble?{' '} - - Contact support - - diff --git a/src/view/screens/Support.tsx b/src/view/screens/Support.tsx deleted file mode 100644 index 3fbad73..0000000 --- a/src/view/screens/Support.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' -import {Trans} from '@lingui/react/macro' - -import {HELP_DESK_URL} from '#/lib/constants' -import {usePalette} from '#/lib/hooks/usePalette' -import { - type CommonNavigatorParams, - type NativeStackScreenProps, -} from '#/lib/routes/types' -import {s} from '#/lib/styles' -import {TextLink} from '#/view/com/util/Link' -import {Text} from '#/view/com/util/text/Text' -import {ViewHeader} from '#/view/com/util/ViewHeader' -import {CenteredView} from '#/view/com/util/Views' -import * as Layout from '#/components/Layout' - -type Props = NativeStackScreenProps -export const SupportScreen = (_props: Props) => { - const pal = usePalette('default') - const {_} = useLingui() - - return ( - - - - - Support - - - - The support form has been moved. If you need help, please{' '} - {' '} - or visit {HELP_DESK_URL} to get in touch with us. - - - - - ) -} diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 2b194ad..902240d 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -1,6 +1,5 @@ import {type ComponentProps, type JSX, memo, useCallback} from 'react' import { - Linking, Pressable, ScrollView, TouchableOpacity, @@ -12,7 +11,6 @@ import {useLingui} from '@lingui/react' import {Plural, Trans} from '@lingui/react/macro' import {StackActions, useNavigation} from '@react-navigation/native' -import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' import {type PressableScale} from '#/lib/custom-animations/PressableScale' import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState' import {getTabState, TabState} from '#/lib/routes/helpers' @@ -30,7 +28,7 @@ import {formatCount} from '#/view/com/util/numeric/format' import {UserAvatar} from '#/view/com/util/UserAvatar' import {NavSignupCard} from '#/view/shell/NavSignupCard' import {atoms as a, tokens, useTheme, web} from '#/alf' -import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {Button} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import {Divider} from '#/components/Divider' import {ArrowShareRight_Stroke2_Corner2_Rounded as ArrowShareRight} from '#/components/icons/ArrowShareRight' @@ -282,19 +280,6 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { setDrawerOpen(false) }, [navigation, setDrawerOpen]) - const onPressFeedback = useCallback(() => { - Linking.openURL( - FEEDBACK_FORM_URL({ - email: currentAccount?.email, - handle: currentAccount?.handle, - }), - ) - }, [currentAccount]) - - const onPressHelp = useCallback(() => { - Linking.openURL(HELP_DESK_URL) - }, []) - // rendering // = @@ -370,10 +355,7 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { - + ) @@ -381,55 +363,19 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { DrawerContent = memo(DrawerContent) export {DrawerContent} -let DrawerFooter = ({ - onPressFeedback, - onPressHelp, -}: { - onPressFeedback: () => void - onPressHelp: () => void -}): React.ReactNode => { - const {_} = useLingui() +let DrawerFooter = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { const insets = useSafeAreaInsets() return ( - - - + ]} + /> ) } DrawerFooter = memo(DrawerFooter) diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index 405386a..fa05581 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -5,7 +5,6 @@ import {useLingui} from '@lingui/react' import {Trans} from '@lingui/react/macro' import {useNavigation} from '@react-navigation/native' -import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' import {useKawaiiMode} from '#/state/preferences/kawaii' import {useSession} from '#/state/session' import {DesktopFeeds} from '#/view/shell/desktop/Feeds' @@ -45,7 +44,7 @@ function useWebQueryParams() { export function DesktopRightNav({routeName}: {routeName: string}) { const t = useTheme() const {_} = useLingui() - const {hasSession, currentAccount} = useSession() + const {hasSession} = useSession() const kawaii = useKawaiiMode() const gutters = useGutters(['base', 0, 'base', 'wide']) const isSearchScreen = routeName === 'Search' @@ -98,20 +97,6 @@ export function DesktopRightNav({routeName}: {routeName: string}) { {showExploreScreenDuplicatedContent && } - {hasSession && ( - <> - - {_(msg`Feedback`)} - - {' ∙ '} - - )} {_(msg`Terms`)} - {' ∙ '} - - {_(msg`Help`)} - {kawaii && ( -- 2.51.2