Skip to content

Commit

Permalink
Result counts (#2017)
Browse files Browse the repository at this point in the history
* Show results counts for mobile preprint/registry discover page

* Grammar for result counts
  • Loading branch information
futa-ikeda authored Oct 6, 2023
1 parent e573135 commit 7c3c58b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class SearchPage extends Component<SearchArgs> {
}

get showResultCountLeft() {
return this.totalResultCount && this.args.showResourceTypeFilter;
return this.totalResultCount && (this.args.showResourceTypeFilter || this.showSidePanelToggle);
}

get selectedSortOption() {
Expand Down
5 changes: 5 additions & 0 deletions lib/osf-components/addon/components/search-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
width: 195px;
}
}

.search-count {
// override RegistriesStyle
font-size: 1.5em;
}
}

.search-main-mobile {
Expand Down
2 changes: 1 addition & 1 deletion translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ search:
textbox-placeholder: 'Enter search term(s) here'
search-button-label: 'Search'
search-help-label: 'Help tutorial'
total-results: '{count} results'
total-results: '{count} {count, plural, one {result} other {results} }'
no-results: 'No results found'
resource-type:
search-by: 'Search by object type'
Expand Down

0 comments on commit 7c3c58b

Please sign in to comment.