Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Placeholder text and No results found message on Pronouns Search Page #16602

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default {
pronounsPage: {
pronouns: 'Pronouns',
isShownOnProfile: 'Your pronouns are shown on your profile.',
placeholderText: 'Search to see options',
},
contacts: {
contactMethod: 'Contact method',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export default {
pronounsPage: {
pronouns: 'Pronombres',
isShownOnProfile: 'Tus pronombres se muestran en tu perfil.',
placeholderText: 'Buscar para ver opciones',
},
contacts: {
contactMethod: 'Método de contacto',
Expand Down
3 changes: 3 additions & 0 deletions src/pages/settings/Profile/PronounsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class PronounsPage extends Component {

render() {
const filteredPronounsList = this.getFilteredPronouns();
const headerMessage = this.state.searchValue.trim() && !filteredPronounsList.length ? this.props.translate('common.noResultsFound') : '';

return (
<ScreenWrapper includeSafeAreaPaddingBottom={false}>
Expand All @@ -122,6 +123,8 @@ class PronounsPage extends Component {
</Text>
<OptionsSelector
textInputLabel={this.props.translate('pronounsPage.pronouns')}
placeholderText={this.props.translate('pronounsPage.placeholderText')}
headerMessage={headerMessage}
sections={[{data: filteredPronounsList}]}
value={this.state.searchValue}
onSelectRow={this.updatePronouns}
Expand Down