Skip to content

Commit 57e87a7

Browse files
Merge pull request #4295 from RedisInsight/fe/bugfix/RI-6547-table-result-tooltip-text-ellipsis
RI-6547 Apply multiline ellipsis to the table tooltip
2 parents 5110c8d + f30f7be commit 57e87a7

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const TableResult = React.memo((props: Props) => {
7777
<EuiToolTip
7878
position="bottom"
7979
title={title}
80+
className="text-multiline-ellipsis"
8081
anchorClassName={cx('tooltip')}
8182
content={formatLongName(value.toString())}
8283
>

redisinsight/ui/src/packages/redisearch/src/styles/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ html {
8585
display: inline-block !important;
8686
}
8787

88+
// The style applies to the last div element in the tooltip,
89+
// which is the one containing the text
90+
.euiToolTipPopover.text-multiline-ellipsis > div:last-child {
91+
@include eui.multiline-ellipsis($line-count: 7, $line-height: 1.5rem);
92+
}
93+
8894
.cell {
8995
position: relative;
9096
}

redisinsight/ui/src/styles/mixins/_eui.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,12 @@ $euiBreakpointKeys: map-keys($euiBreakpoints);
8686
$alpha: 1 - $factor;
8787
color: rgba($color, $alpha);
8888
}
89+
90+
@mixin multiline-ellipsis($line-count, $line-height) {
91+
display: -webkit-box;
92+
-webkit-box-orient: vertical;
93+
-webkit-line-clamp: $line-count;
94+
line-height: $line-height;
95+
text-overflow: ellipsis;
96+
overflow: hidden;
97+
}

0 commit comments

Comments
 (0)