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

Open
wants to merge 2 commits into
base: feature/orgs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
45 changes: 24 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,31 @@ 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')}>
{' '}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this space is not needed

<div className={cx('full-name')}>{user.fullName}</div>
<div className={cx('badges')}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there are no badges then this block is not needed:
image

{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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this property does not affect anything.

}

.badges {
Expand Down
Loading