diff --git a/src/__fixtures__/intlMessages.json b/src/__fixtures__/intlMessages.json index 30ce6f35c..4b8a45bdf 100644 --- a/src/__fixtures__/intlMessages.json +++ b/src/__fixtures__/intlMessages.json @@ -448,7 +448,7 @@ "tabs_bar.news": "News", "tabs_bar.notifications": "Alerts", "tabs_bar.post": "Post", - "tabs_bar.search": "Search", + "tabs_bar.search": "Discover", "time_remaining.days": "{number, plural, one {# day} other {# days}} left", "time_remaining.hours": "{number, plural, one {# hour} other {# hours}} left", "time_remaining.minutes": "{number, plural, one {# minute} other {# minutes}} left", @@ -929,7 +929,7 @@ "tabs_bar.news": "News", "tabs_bar.notifications": "Alerts", "tabs_bar.post": "Post", - "tabs_bar.search": "Search", + "tabs_bar.search": "Discover", "time_remaining.days": "{number, plural, one {# day} other {# days}} left", "time_remaining.hours": "{number, plural, one {# hour} other {# hours}} left", "time_remaining.minutes": "{number, plural, one {# minute} other {# minutes}} left", diff --git a/src/actions/search.ts b/src/actions/search.ts index 7031173c4..8810605eb 100644 --- a/src/actions/search.ts +++ b/src/actions/search.ts @@ -52,7 +52,7 @@ const clearSearchResults = () => ({ const submitSearch = (filter?: SearchFilter) => (dispatch: AppDispatch, getState: () => RootState) => { const value = getState().search.value; - const type = filter || getState().search.filter || 'accounts'; + const type = filter || getState().search.filter || 'statuses'; const accountId = getState().search.accountId; // An empty search doesn't return any results diff --git a/src/components/sidebar-navigation.tsx b/src/components/sidebar-navigation.tsx index 3c68ee892..e46aa38c5 100644 --- a/src/components/sidebar-navigation.tsx +++ b/src/components/sidebar-navigation.tsx @@ -125,7 +125,7 @@ const SidebarNavigation = () => { } + text={} /> {account && ( diff --git a/src/features/aliases/components/search.tsx b/src/features/aliases/components/search.tsx index 5b654a777..a859a93a6 100644 --- a/src/features/aliases/components/search.tsx +++ b/src/features/aliases/components/search.tsx @@ -9,7 +9,7 @@ import { useAppDispatch, useAppSelector } from 'soapbox/hooks'; const messages = defineMessages({ search: { id: 'aliases.search', defaultMessage: 'Search your old account' }, - searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Search' }, + searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Discover' }, }); const Search: React.FC = () => { diff --git a/src/features/compose/components/search-results.tsx b/src/features/compose/components/search-results.tsx index 362e4abe7..c2beaf547 100644 --- a/src/features/compose/components/search-results.tsx +++ b/src/features/compose/components/search-results.tsx @@ -51,18 +51,18 @@ const SearchResults = () => { const renderFilterBar = () => { const items = []; items.push( - { - text: intl.formatMessage(messages.accounts), - action: () => selectFilter('accounts'), - name: 'accounts', - }, { text: intl.formatMessage(messages.statuses), action: () => selectFilter('statuses'), name: 'statuses', }, + { + text: intl.formatMessage(messages.accounts), + action: () => selectFilter('accounts'), + name: 'accounts', + }, ); - + items.push( { text: intl.formatMessage(messages.hashtags), @@ -70,7 +70,7 @@ const SearchResults = () => { name: 'hashtags', }, ); - + return ; }; diff --git a/src/features/list-editor/components/search.tsx b/src/features/list-editor/components/search.tsx index e3c3812c7..71f136247 100644 --- a/src/features/list-editor/components/search.tsx +++ b/src/features/list-editor/components/search.tsx @@ -9,7 +9,7 @@ import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; const messages = defineMessages({ search: { id: 'lists.search', defaultMessage: 'Search among people you follow' }, - searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Search' }, + searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Discover' }, }); const Search = () => { diff --git a/src/features/search/index.tsx b/src/features/search/index.tsx index a61700b2b..beee52773 100644 --- a/src/features/search/index.tsx +++ b/src/features/search/index.tsx @@ -6,7 +6,7 @@ import Search from 'soapbox/features/compose/components/search'; import SearchResults from 'soapbox/features/compose/components/search-results'; const messages = defineMessages({ - heading: { id: 'column.search', defaultMessage: 'Search' }, + heading: { id: 'column.search', defaultMessage: 'Discover' }, }); const SearchPage = () => { diff --git a/src/locales/en.json b/src/locales/en.json index 023664e54..453a94626 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -431,7 +431,7 @@ "column.reblogs": "Reposts", "column.registration": "Sign Up", "column.scheduled_statuses": "Scheduled Posts", - "column.search": "Search", + "column.search": "Discover", "column.settings_store": "Settings store", "column.soapbox_config": "Soapbox config", "column.test": "Test timeline", @@ -1579,7 +1579,7 @@ "tabs_bar.more": "More", "tabs_bar.notifications": "Notifications", "tabs_bar.profile": "Profile", - "tabs_bar.search": "Search", + "tabs_bar.search": "Discover", "tabs_bar.settings": "Settings", "textarea.counter.label": "{count} characters remaining", "theme_editor.colors.accent": "Accent", diff --git a/src/reducers/search.ts b/src/reducers/search.ts index f4e299290..06869cd89 100644 --- a/src/reducers/search.ts +++ b/src/reducers/search.ts @@ -45,14 +45,14 @@ const ReducerRecord = ImmutableRecord({ submittedValue: '', hidden: false, results: ResultsRecord(), - filter: 'accounts' as SearchFilter, + filter: 'statuses' as SearchFilter, accountId: null as string | null, next: null as string | null, }); type State = ReturnType; type APIEntities = Array; -export type SearchFilter = 'accounts' | 'statuses' | 'groups' | 'hashtags'; +export type SearchFilter = 'statuses' | 'accounts' | 'groups' | 'hashtags'; const toIds = (items: APIEntities = []) => { return ImmutableOrderedSet(items.map(item => item.id)); @@ -62,8 +62,8 @@ const importResults = (state: State, results: APIEntity, searchTerm: string, sea return state.withMutations(state => { if (state.value === searchTerm && state.filter === searchType) { state.set('results', ResultsRecord({ - accounts: toIds(results.accounts), statuses: toIds(results.statuses), + accounts: toIds(results.accounts), groups: toIds(results.groups), hashtags: ImmutableOrderedSet(results.hashtags.map(normalizeTag)), // it's a list of records accountsHasMore: results.accounts.length >= 20, @@ -144,7 +144,7 @@ export default function search(state = ReducerRecord(), action: AnyAction) { results: ResultsRecord(), submitted: false, submittedValue: '', - filter: 'accounts', + filter: 'statuses', accountId: null, }); return ReducerRecord({ accountId: action.accountId, filter: 'statuses' });