Update advanced search suggestions (#11036)

This commit is contained in:
DS Boyce
2026-06-30 14:26:50 -07:00
committed by GitHub
parent 0adf500edf
commit 133476e0cd
3 changed files with 23 additions and 11 deletions
@@ -134,6 +134,7 @@ jobs:
- name: 📷 Check fingerprint and install dependencies - name: 📷 Check fingerprint and install dependencies
id: fingerprint id: fingerprint
timeout-minutes: 5
uses: bluesky-social/github-actions/fingerprint-native@b5556913e4aef3964cfd5936d0add3fc0d809bdb # v0.1.0 uses: bluesky-social/github-actions/fingerprint-native@b5556913e4aef3964cfd5936d0add3fc0d809bdb # v0.1.0
with: with:
profile: pull-request profile: pull-request
+2 -1
View File
@@ -10,7 +10,7 @@ Bluesky Social is a cross-platform social media application built with React Nat
- React 19.1 - React 19.1
- React Native 0.81 with Expo 54 - React Native 0.81 with Expo 54
- TypeScript 6 - TypeScript 7
- React Navigation 7 for routing - React Navigation 7 for routing
- TanStack Query (React Query) for data fetching - TanStack Query (React Query) for data fetching
- Lingui 5 for internationalization - Lingui 5 for internationalization
@@ -32,6 +32,7 @@ pnpm ios # Run on iOS
pnpm test # Run Jest tests pnpm test # Run Jest tests
pnpm lint # Run ESLint pnpm lint # Run ESLint
pnpm typecheck # Run TypeScript type checking pnpm typecheck # Run TypeScript type checking
pnpm prettier # Run Prettier for code formatting
# Internationalization # Internationalization
# DO NOT run these commands - extraction and compilation are handled by CI # DO NOT run these commands - extraction and compilation are handled by CI
@@ -154,6 +154,24 @@ function DialogInner({
const scrollRef = useRef<ScrollView>(null) const scrollRef = useRef<ScrollView>(null)
const filtersSectionRef = useRef<View>(null) const filtersSectionRef = useRef<View>(null)
const suggestions = [
{
all: l({
message: 'cats dogs',
comment: 'Advanced search: Example of an “all of these words” search',
}),
none: l({
message: 'cows pigs',
comment: 'Advanced search: Example of a “none of these words” search',
}),
},
]
// eslint-disable-next-line react/hook-use-state
const [suggestion] = useState(() =>
Math.floor(Math.random() * suggestions.length),
)
function addFilter() { function addFilter() {
if (filters.length >= MAX_FILTERS) return if (filters.length >= MAX_FILTERS) return
/* /*
@@ -261,11 +279,7 @@ function DialogInner({
<ClearableInput <ClearableInput
label={l`Search query`} label={l`Search query`}
defaultValue={query} defaultValue={query}
placeholder={l({ placeholder={suggestions[suggestion].all}
message: 'bluesky atproto',
comment:
'Advanced search: Example of an “all of these words” search',
})}
onChangeText={setQuery} onChangeText={setQuery}
onSubmitEditing={handlePressSearch} onSubmitEditing={handlePressSearch}
/> />
@@ -295,11 +309,7 @@ function DialogInner({
<ClearableInput <ClearableInput
label={l`None of these words`} label={l`None of these words`}
defaultValue={negatedWords} defaultValue={negatedWords}
placeholder={l({ placeholder={suggestions[suggestion].none}
message: 'cows pigs',
comment:
'Advanced search: Example of an “none of these words” search',
})}
onChangeText={setNegatedWords} onChangeText={setNegatedWords}
onSubmitEditing={handlePressSearch} onSubmitEditing={handlePressSearch}
/> />