Skip to content

Commit 222759d

Browse files
Merge pull request #793 from RedisInsight/feature/bugfix
#RI-3098 - Tooltip for channel name
2 parents 1ccaa20 + 475aba5 commit 222759d

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

redisinsight/ui/src/pages/pubSub/components/messages-list/MessagesList/MessagesList.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback, useEffect, useRef, useState } from 'react'
22
import { ListChildComponentProps, ListOnScrollProps, VariableSizeList as List } from 'react-window'
33
import { useParams } from 'react-router-dom'
4-
import { EuiButtonIcon } from '@elastic/eui'
4+
import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'
55

66
import { getFormatDateTime } from 'uiSrc/utils'
77
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
@@ -131,7 +131,15 @@ const MessagesList = (props: Props) => {
131131
return (
132132
<div style={style} className={styles.item} data-testid={`row-${index}`}>
133133
<div className={styles.time}>{getFormatDateTime(time)}</div>
134-
<div className={styles.channel}>{channel}</div>
134+
<div className={styles.channel}>
135+
<EuiToolTip
136+
content={channel}
137+
position="bottom"
138+
display="inlineBlock"
139+
>
140+
<div className={styles.channelAnchor}>{channel}</div>
141+
</EuiToolTip>
142+
</div>
135143
<div className={styles.message} ref={rowRef}>{message}</div>
136144
</div>
137145
)

redisinsight/ui/src/pages/pubSub/components/messages-list/MessagesList/styles.module.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@
2020

2121
.channel {
2222
color: var(--euiColorMediumShade);
23-
padding-right: 12px;
2423
width: 220px;
2524
overflow: hidden;
2625
white-space: nowrap;
2726
text-overflow: ellipsis;
2827
}
2928

29+
.channelAnchor {
30+
max-width: 220px;
31+
padding-right: 12px;
32+
overflow: hidden;
33+
white-space: nowrap;
34+
text-overflow: ellipsis;
35+
}
36+
3037
.message {
3138
width: calc(100% - 372px);
3239
color: var(--htmlColor);

0 commit comments

Comments
 (0)