Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')}>
{' '}
iso9000t marked this conversation as resolved.
Show resolved Hide resolved
{/* Just added this wrapper */}
iso9000t marked this conversation as resolved.
Show resolved Hide resolved
<div className={cx('full-name')}>{user.fullName}</div>
<div className={cx('badges')}>
iso9000t marked this conversation as resolved.
Show resolved Hide resolved
{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
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,19 @@
}
}

.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;
min-width: 0;
iso9000t marked this conversation as resolved.
Show resolved Hide resolved
}

.badges {
Expand Down
Loading