Skip to content

Commit

Permalink
Improve messaging for Interactive Search
Browse files Browse the repository at this point in the history
(cherry picked from commit 7893fdde104959c4f3c32d9e1000e2479f7a5b12)

Closes #2752
  • Loading branch information
mynameisbogdan committed Aug 18, 2023
1 parent b84e83b commit 99c17d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
17 changes: 9 additions & 8 deletions frontend/src/InteractiveSearch/InteractiveSearch.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import PropTypes from 'prop-types';
import React from 'react';
import Alert from 'Components/Alert';
import Icon from 'Components/Icon';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { icons, sortDirections } from 'Helpers/Props';
import { icons, kinds, sortDirections } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
import InteractiveSearchRow from './InteractiveSearchRow';
import styles from './InteractiveSearch.css';
Expand Down Expand Up @@ -112,17 +113,17 @@ function InteractiveSearch(props) {

{
!isFetching && isPopulated && !totalReleasesCount ?
<div className={styles.blankpad}>
No results found
</div> :
<Alert kind={kinds.INFO}>
{translate('NoResultsFound')}
</Alert> :
null
}

{
!!totalReleasesCount && isPopulated && !items.length ?
<div className={styles.blankpad}>
All results are hidden by the applied filter
</div> :
<Alert kind={kinds.WARNING}>
{translate('AllResultsAreHiddenByTheAppliedFilter')}
</Alert> :
null
}

Expand Down Expand Up @@ -157,7 +158,7 @@ function InteractiveSearch(props) {
{
totalReleasesCount !== items.length && !!items.length ?
<div className={styles.filteredMessage}>
Some results are hidden by the applied filter
{translate('SomeResultsAreHiddenByTheAppliedFilter')}
</div> :
null
}
Expand Down
3 changes: 3 additions & 0 deletions src/NzbDrone.Core/Localization/Core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"AllBooks": "All Books",
"AllExpandedCollapseAll": "Collapse All",
"AllExpandedExpandAll": "Expand All",
"AllResultsAreHiddenByTheAppliedFilter": "All results are hidden by the applied filter",
"AllowAuthorChangeClickToChangeAuthor": "Click to change author",
"AllowFingerprinting": "Allow Fingerprinting",
"AllowFingerprintingHelpText": "Use fingerprinting to improve accuracy of book matching",
Expand Down Expand Up @@ -571,6 +572,7 @@
"NoMinimumForAnyRuntime": "No minimum for any runtime",
"NoMissingItems": "No missing items",
"NoName": "Do not show name",
"NoResultsFound": "No results found",
"NoTagsHaveBeenAddedYet": "No tags have been added yet. Add tags to link authors with delay profiles, restrictions, or notifications. Click {0} to find out more about tags in Readarr.",
"NoUpdatesAreAvailable": "No updates are available",
"None": "None",
Expand Down Expand Up @@ -846,6 +848,7 @@
"SkipSecondarySeriesBooks": "Skip secondary series books",
"Small": "Small",
"SmartReplace": "Smart Replace",
"SomeResultsAreHiddenByTheAppliedFilter": "Some results are hidden by the applied filter",
"SorryThatAuthorCannotBeFound": "Sorry, that author cannot be found.",
"SorryThatBookCannotBeFound": "Sorry, that book cannot be found.",
"Source": "Source",
Expand Down

0 comments on commit 99c17d7

Please sign in to comment.