Update advanced search suggestions (#11036)
This commit is contained in:
@@ -134,6 +134,7 @@ jobs:
|
||||
|
||||
- name: 📷 Check fingerprint and install dependencies
|
||||
id: fingerprint
|
||||
timeout-minutes: 5
|
||||
uses: bluesky-social/github-actions/fingerprint-native@b5556913e4aef3964cfd5936d0add3fc0d809bdb # v0.1.0
|
||||
with:
|
||||
profile: pull-request
|
||||
|
||||
@@ -10,7 +10,7 @@ Bluesky Social is a cross-platform social media application built with React Nat
|
||||
|
||||
- React 19.1
|
||||
- React Native 0.81 with Expo 54
|
||||
- TypeScript 6
|
||||
- TypeScript 7
|
||||
- React Navigation 7 for routing
|
||||
- TanStack Query (React Query) for data fetching
|
||||
- Lingui 5 for internationalization
|
||||
@@ -32,6 +32,7 @@ pnpm ios # Run on iOS
|
||||
pnpm test # Run Jest tests
|
||||
pnpm lint # Run ESLint
|
||||
pnpm typecheck # Run TypeScript type checking
|
||||
pnpm prettier # Run Prettier for code formatting
|
||||
|
||||
# Internationalization
|
||||
# DO NOT run these commands - extraction and compilation are handled by CI
|
||||
|
||||
@@ -154,6 +154,24 @@ function DialogInner({
|
||||
const scrollRef = useRef<ScrollView>(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() {
|
||||
if (filters.length >= MAX_FILTERS) return
|
||||
/*
|
||||
@@ -261,11 +279,7 @@ function DialogInner({
|
||||
<ClearableInput
|
||||
label={l`Search query`}
|
||||
defaultValue={query}
|
||||
placeholder={l({
|
||||
message: 'bluesky atproto',
|
||||
comment:
|
||||
'Advanced search: Example of an “all of these words” search',
|
||||
})}
|
||||
placeholder={suggestions[suggestion].all}
|
||||
onChangeText={setQuery}
|
||||
onSubmitEditing={handlePressSearch}
|
||||
/>
|
||||
@@ -295,11 +309,7 @@ function DialogInner({
|
||||
<ClearableInput
|
||||
label={l`None of these words`}
|
||||
defaultValue={negatedWords}
|
||||
placeholder={l({
|
||||
message: 'cows pigs',
|
||||
comment:
|
||||
'Advanced search: Example of an “none of these words” search',
|
||||
})}
|
||||
placeholder={suggestions[suggestion].none}
|
||||
onChangeText={setNegatedWords}
|
||||
onSubmitEditing={handlePressSearch}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user