Skip to content

Commit

Permalink
change icons and improved title
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadelrio committed Jun 26, 2020
1 parent d259b58 commit bec6210
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export function DiscoverFieldBucket({ field, bucket, onAddFilter }: Props) {
<EuiFlexGroup justifyContent="spaceBetween" gutterSize="xs" responsive={false}>
<EuiFlexItem grow={1} className="eui-textTruncate">
<EuiText
title={bucket.display === '' ? emptyTxt : bucket.display}
title={
bucket.display === ''
? emptyTxt
: `${bucket.display}: ${bucket.count} (${bucket.percent}%)`
}
size="xs"
className="eui-textTruncate"
>
Expand All @@ -77,7 +81,7 @@ export function DiscoverFieldBucket({ field, bucket, onAddFilter }: Props) {
<div>
<EuiButtonIcon
iconSize="s"
iconType="magnifyWithPlus"
iconType="plusInCircle"
onClick={() => onAddFilter(field, bucket.value, '+')}
aria-label={addLabel}
data-test-subj={`plus-${field.name}-${bucket.value}`}
Expand All @@ -92,7 +96,7 @@ export function DiscoverFieldBucket({ field, bucket, onAddFilter }: Props) {
/>
<EuiButtonIcon
iconSize="s"
iconType="magnifyWithMinus"
iconType="minusInCircle"
onClick={() => onAddFilter(field, bucket.value, '-')}
aria-label={removeLabel}
data-test-subj={`minus-${field.name}-${bucket.value}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ interface Props {
}

export function StringFieldProgressBar({ value, percent, count }: Props) {
const tooltipContent = `${value}: ${count} (${percent}%)`;
const ariaLabel = `${value}: ${count} (${percent}%)`;

return (
<EuiProgress value={percent} max={100} color="secondary" aria-label={tooltipContent} size="s" />
<EuiProgress value={percent} max={100} color="secondary" aria-label={ariaLabel} size="s" />
);
}

0 comments on commit bec6210

Please sign in to comment.