Skip to content

Commit

Permalink
EPMRPP-98469 || Fix truncation of User Full Name in Organizations (#4162
Browse files Browse the repository at this point in the history
)

* EPMRPP-98469 || Fix truncation of User Full Name in Organizations

* EPMRPP-98469 || Code review fixes - 1

* EPMRPP-98469 || Code review fixes - 2
  • Loading branch information
iso9000t authored Jan 17, 2025
1 parent 058ddf2 commit fb9e894
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
46 changes: 25 additions & 21 deletions app/src/pages/common/membersPage/userNameCell/userNameCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,32 @@ export const UserNameCell = ({ user, badges }) => {
return (
<div className={cx('user-name-cell')}>
<UserAvatar className={cx('user-avatar')} userId={user.id} thumbnail />
<div className={cx('full-name')}>{user.fullName}</div>
<div className={cx('badges')}>
{badges.map(({ title, type }) => {
const badgeContent = (
<div key={`${user.id}-${type}`} className={cx('badge', type)}>
{formatMessage(title)}
</div>
);
<div className={cx('name-badge-wrapper')}>
<div className={cx('full-name')}>{user.fullName}</div>
{badges.length > 0 && (
<div className={cx('badges')}>
{badges.map(({ title, type }) => {
const badgeContent = (
<div key={`${user.id}-${type}`} className={cx('badge', type)}>
{formatMessage(title)}
</div>
);

return type === ADMIN_TYPE ? (
<Tooltip
key={`${user.id}-${type}-tooltip`}
content={formatMessage(messages.adminAccessInfo)}
placement="top"
width={248}
>
{badgeContent}
</Tooltip>
) : (
badgeContent
);
})}
return type === ADMIN_TYPE ? (
<Tooltip
key={`${user.id}-${type}-tooltip`}
content={formatMessage(messages.adminAccessInfo)}
placement="top"
width={248}
>
{badgeContent}
</Tooltip>
) : (
badgeContent
);
})}
</div>
)}
</div>
</div>
);
Expand Down
12 changes: 11 additions & 1 deletion app/src/pages/common/membersPage/userNameCell/userNameCell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@
}
}

.full-name {
.name-badge-wrapper {
display: flex;
align-items: center;
margin-left: 16px;
min-width: 0;
flex: 1;
}

.full-name {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

.badges {
Expand Down

0 comments on commit fb9e894

Please sign in to comment.