Skip to content

Commit f7838e4

Browse files
committed
RI-6547 apply multiline ellipsis to the table tooltip text that overflows, instead of the scroll
1 parent 1de9287 commit f7838e4

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ html {
8585
display: inline-block !important;
8686
}
8787

88+
.text-multiline-ellipsis>div:last-child{
89+
@include eui.multiline-ellipsis($line-count: 7, $line-height: 1.5rem);
90+
}
91+
8892
.cell {
8993
position: relative;
9094
}

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)