diff options
author | Eric Bailey <git@esb.lol> | 2025-04-04 10:30:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-04 08:30:12 -0700 |
commit | 94bc677ef5ffdf69fd952de41a59d8b5aac9a360 (patch) | |
tree | b2482a3ad719a1d5dac7e2f3b03673ff12da57d1 | |
parent | 148bfa803d3116dfaf6513ca947e585d8d3bfc78 (diff) | |
download | voidsky-94bc677ef5ffdf69fd952de41a59d8b5aac9a360.tar.zst |
Rename search to explore in titles and links (#8116)
* Rename search to explore in titles and links * Conditionally use Explore
-rw-r--r-- | src/Navigation.tsx | 2 | ||||
-rw-r--r-- | src/screens/Search/Shell.tsx | 4 | ||||
-rw-r--r-- | src/screens/Search/index.tsx | 8 | ||||
-rw-r--r-- | src/view/shell/Drawer.tsx | 10 | ||||
-rw-r--r-- | src/view/shell/desktop/LeftNav.tsx | 10 |
5 files changed, 21 insertions, 13 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx index d89d45919..277ffb07e 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -637,7 +637,7 @@ const FlatNavigator = () => { <Flat.Screen name="Search" getComponent={() => SearchScreen} - options={{title: title(msg`Search`)}} + options={{title: title(msg`Explore`)}} /> <Flat.Screen name="Notifications" diff --git a/src/screens/Search/Shell.tsx b/src/screens/Search/Shell.tsx index e930b8289..e48f3d455 100644 --- a/src/screens/Search/Shell.tsx +++ b/src/screens/Search/Shell.tsx @@ -55,12 +55,14 @@ export function SearchScreenShell({ fixedParams, navButton = 'menu', inputPlaceholder, + isExplore, }: { queryParam: string testID: string fixedParams?: Params navButton?: 'back' | 'menu' inputPlaceholder?: string + isExplore?: boolean }) { const t = useTheme() const {gtMobile} = useBreakpoints() @@ -302,7 +304,7 @@ export function SearchScreenShell({ )} <Layout.Header.Content align="left"> <Layout.Header.TitleText> - <Trans>Search</Trans> + {isExplore ? <Trans>Explore</Trans> : <Trans>Search</Trans>} </Layout.Header.TitleText> </Layout.Header.Content> {showFilters ? ( diff --git a/src/screens/Search/index.tsx b/src/screens/Search/index.tsx index 429f1e5c7..ba04ebb20 100644 --- a/src/screens/Search/index.tsx +++ b/src/screens/Search/index.tsx @@ -9,5 +9,11 @@ export function SearchScreen( ) { const queryParam = props.route?.params?.q ?? '' - return <SearchScreenShell queryParam={queryParam} testID="searchScreen" /> + return ( + <SearchScreenShell + queryParam={queryParam} + testID="searchScreen" + isExplore + /> + ) } diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index da98b2643..e38cb217c 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -1,4 +1,4 @@ -import React, {ComponentProps} from 'react' +import React, {type ComponentProps} from 'react' import {Linking, ScrollView, TouchableOpacity, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {msg, Plural, plural, Trans} from '@lingui/macro' @@ -6,10 +6,10 @@ import {useLingui} from '@lingui/react' import {StackActions, useNavigation} from '@react-navigation/native' import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' -import {PressableScale} from '#/lib/custom-animations/PressableScale' +import {type PressableScale} from '#/lib/custom-animations/PressableScale' import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState' import {getTabState, TabState} from '#/lib/routes/helpers' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {sanitizeHandle} from '#/lib/strings/handles' import {colors} from '#/lib/styles' import {isWeb} from '#/platform/detection' @@ -17,7 +17,7 @@ import {emitSoftReset} from '#/state/events' import {useKawaiiMode} from '#/state/preferences/kawaii' import {useUnreadNotifications} from '#/state/queries/notifications/unread' import {useProfileQuery} from '#/state/queries/profile' -import {SessionAccount, useSession} from '#/state/session' +import {type SessionAccount, useSession} from '#/state/session' import {useSetDrawerOpen} from '#/state/shell' import {formatCount} from '#/view/com/util/numeric/format' import {UserAvatar} from '#/view/com/util/UserAvatar' @@ -367,7 +367,7 @@ let SearchMenuItem = ({ <MagnifyingGlass style={[t.atoms.text]} width={iconWidth} /> ) } - label={_(msg`Search`)} + label={_(msg`Explore`)} bold={isActive} onPress={onPress} /> diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 06a9b05c3..5cef18ebf 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -1,6 +1,6 @@ import React from 'react' import {StyleSheet, View} from 'react-native' -import {AppBskyActorDefs} from '@atproto/api' +import {type AppBskyActorDefs} from '@atproto/api' import {msg, plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import { @@ -14,7 +14,7 @@ import {usePalette} from '#/lib/hooks/usePalette' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {getCurrentRoute, isTab} from '#/lib/routes/helpers' import {makeProfileLink} from '#/lib/routes/links' -import {CommonNavigatorParams} from '#/lib/routes/types' +import {type CommonNavigatorParams} from '#/lib/routes/types' import {useGate} from '#/lib/statsig/statsig' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' @@ -24,7 +24,7 @@ import {useFetchHandle} from '#/state/queries/handle' import {useUnreadMessageCount} from '#/state/queries/messages/list-conversations' import {useUnreadNotifications} from '#/state/queries/notifications/unread' import {useProfilesQuery} from '#/state/queries/profile' -import {SessionAccount, useSession, useSessionApi} from '#/state/session' +import {type SessionAccount, useSession, useSessionApi} from '#/state/session' import {useComposerControls} from '#/state/shell/composer' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import {useCloseAllActiveElements} from '#/state/util' @@ -34,7 +34,7 @@ import {UserAvatar} from '#/view/com/util/UserAvatar' import {NavSignupCard} from '#/view/shell/NavSignupCard' import {atoms as a, tokens, useLayoutBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import {ArrowBoxLeft_Stroke2_Corner0_Rounded as LeaveIcon} from '#/components/icons/ArrowBoxLeft' import { Bell_Filled_Corner0_Rounded as BellFilled, @@ -614,7 +614,7 @@ export function DesktopLeftNav() { width={NAV_ICON_WIDTH} /> } - label={_(msg`Search`)} + label={_(msg`Explore`)} /> <NavItem href="/notifications" |