Skip to content

Commit f704b4b

Browse files
author
Maksym Mykhailenko
committed
fix: long email and handle in user tooltip
ref issue #3842
1 parent cd7c019 commit f704b4b

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/components/User/UserTooltip.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import _ from 'lodash'
22
import React from 'react'
33
import PropTypes from 'prop-types'
4+
import cn from 'classnames'
45
import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip'
56
import Avatar from 'appirio-tech-react-components/components/Avatar/Avatar'
67
import { DOMAIN } from '../../config/constants'
@@ -53,7 +54,7 @@ const UserTooltip = ({ usr, id, previewAvatar, size, invitedLabel, showEmailOnly
5354
</span>
5455
)}
5556
</div>
56-
<div className="tt-col-user-data">
57+
<div className={cn('tt-col-user-data', { 'with-invite-label': invitedLabel })}>
5758
{!showEmailOnly && <div className="user-name-container">
5859
<span>{userFullName}</span>
5960
</div>}

src/components/User/UserTooltip.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@
127127
display: flex;
128128
flex-wrap: wrap;
129129
align-content: flex-start;
130-
position: relative;
131-
width: 80%;
130+
overflow: hidden;
132131
}
133132

134133
.user-name-container {
135-
flex: 1 0 90%;
134+
flex: 1 1 100%;
135+
overflow: hidden;
136+
text-overflow: ellipsis;
137+
white-space: nowrap;
136138

137139
span {
138140
font-size: 15px;
@@ -143,8 +145,10 @@
143145
}
144146

145147
.user-handle-container {
146-
padding-right: 10px;
147148
height: 20px;
149+
overflow: hidden;
150+
text-overflow: ellipsis;
151+
white-space: nowrap;
148152

149153
&.with-email {
150154
border-right: 1px solid $tc-gray-50;
@@ -163,7 +167,6 @@
163167
overflow: hidden;
164168
text-overflow: ellipsis;
165169
white-space: nowrap;
166-
max-width: 80%;
167170

168171
a {
169172
font-size: 12px;
@@ -186,6 +189,11 @@
186189
}
187190
}
188191
}
192+
193+
.tt-col-user-data.with-invite-label .user-name-container,
194+
.tt-col-user-data.with-invite-label .user-email-container.text-dark {
195+
margin-right: 75px;
196+
}
189197
}
190198

191199
.sf-data-bottom-container {

0 commit comments

Comments
 (0)