Skip to content

Commit

Permalink
fix: use chip for indicator, add tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Mar 13, 2024
1 parent ca23131 commit c647259
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 10 additions & 4 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-03-05T14:54:55.437Z\n"
"PO-Revision-Date: 2024-03-05T14:54:55.437Z\n"
"POT-Creation-Date: 2024-03-13T13:19:06.504Z\n"
"PO-Revision-Date: 2024-03-13T13:19:06.504Z\n"

msgid "Something went wrong"
msgstr "Something went wrong"
Expand Down Expand Up @@ -57,15 +57,21 @@ msgstr "Something went wrong whilst fetching options"
msgid "Checks to run"
msgstr "Checks to run"

msgid "Run all available checks"
msgstr "Run all available checks"
msgid "Run all standard checks"
msgstr "Run all standard checks"

msgid "Only run selected checks"
msgstr "Only run selected checks"

msgid "Severity"
msgstr "Severity"

msgid "Slow checks are resource intensive and should be run with caution"
msgstr "Slow checks are resource intensive and should be run with caution"

msgid "Slow"
msgstr "Slow"

msgid "Select checks to run."
msgstr "Select checks to run."

Expand Down
8 changes: 5 additions & 3 deletions src/components/FormFields/Custom/DataIntegrityChecksField.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import {
Radio,
Transfer,
TransferOption,
Tooltip,
ReactFinalForm,
InputFieldFF,
Help,
Chip,
} from '@dhis2/ui'
import cx from 'classnames'
import { useParameterOption } from '../../../hooks/parameter-options'
Expand Down Expand Up @@ -123,9 +125,9 @@ const LabelComponent = ({ label, severity, highlighted, disabled, isSlow }) => (
})}
>{`${i18n.t('Severity')}: ${severity}`}</span>
{isSlow && (
<span className={styles.optionSlowIndicator}>
{i18n.t('Resource intensive')}
</span>
<Tooltip content={i18n.t('Slow checks are resource intensive and should be run with caution')}>
<Chip dense>{i18n.t('Slow')}</Chip>
</Tooltip>
)}
</div>
</div>
Expand Down

0 comments on commit c647259

Please sign in to comment.