Rename search to explore in titles and links (#8116)

* Rename search to explore in titles and links

* Conditionally use Explore
This commit is contained in:
Eric Bailey
2025-04-04 10:30:12 -05:00
committed by GitHub
parent 148bfa803d
commit 94bc677ef5
5 changed files with 21 additions and 13 deletions
+1 -1
View File
@@ -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"
+3 -1
View File
@@ -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 ? (
+7 -1
View File
@@ -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
/>
)
}
+5 -5
View File
@@ -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}
/>
+5 -5
View File
@@ -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"