[MM-50324]: Increased nickname length from 22 to 64 (#22670)

Этот коммит содержится в:
Colton Shaw
2023-06-17 16:01:26 -04:00
коммит произвёл GitHub
родитель 86f0877799
Коммит 79288440ef
10 изменённых файлов: 65 добавлений и 28 удалений

Просмотреть файл

@@ -248,15 +248,12 @@ exports[`components/channel_invite_modal should match snapshot for channel_invit
<div <div
className="more-modal__name" className="more-modal__name"
> >
<span> <span
className="d-flex"
>
<span />
<span <span
className="light" className="ml-2 light flex-auto"
style={
Object {
"position": "absolute",
"right": 20,
}
}
/> />
</span> </span>
</div> </div>

Просмотреть файл

@@ -271,22 +271,20 @@ export default class ChannelInviteModal extends React.PureComponent<Props, State
/> />
<div className='more-modal__details'> <div className='more-modal__details'>
<div className='more-modal__name'> <div className='more-modal__name'>
<span> <span className='d-flex'>
{displayName} <span>{displayName}</span>
{option.is_bot && <BotTag/>} {option.is_bot && <BotTag/>}
{isGuest(option.roles) && <GuestTag className='popoverlist'/>} {isGuest(option.roles) && <GuestTag className='popoverlist'/>}
{displayName === option.username ? {displayName === option.username ?
null : null :
<span <span
className='ml-2 light' className='ml-2 light flex-auto'
style={{fontSize: '12px'}}
> >
{'@'}{option.username} {'@'}{option.username}
</span> </span>
} }
<span <span
style={{position: 'absolute', right: 20}} className='ml-2 light flex-auto'
className='light'
> >
{userMapping[option.id]} {userMapping[option.id]}
</span> </span>

Просмотреть файл

@@ -33,43 +33,49 @@ const Avatar = styled.div`
`; `;
const UserInfo = styled.div` const UserInfo = styled.div`
display: flex;
flex: 1; flex: 1;
cursor: pointer;
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
cursor: pointer;
`; `;
const DisplayName = styled.span` const DisplayName = styled.span`
display: inline-flex; display: inline;
gap: 8px; overflow: hidden;
margin-left: 8px; margin-left: 8px;
font-size: 14px;
line-height: 20px;
color: var(--center-channel-color); color: var(--center-channel-color);
font-size: 14px;
gap: 8px;
line-height: 20px;
text-overflow: ellipsis;
`; `;
const Username = styled.span` const Username = styled.span`
margin-left: 8px; margin-left: 4px;
color: rgba(var(--center-channel-color-rgb), 0.56);
font-size: 12px; font-size: 12px;
line-height: 18px; line-height: 18px;
color: rgba(var(--center-channel-color-rgb), 0.56);
`; `;
const SendMessage = styled.button` const SendMessage = styled.button`
display: none; display: none;
border: 0;
background-color: transparent;
padding: 0;
width: 24px; width: 24px;
height: 24px; height: 24px;
padding: 0;
border: 0;
margin-left: 8px;
background-color: transparent;
border-radius: 4px; border-radius: 4px;
&:hover { &:hover {
background-color: rgba(var(--center-channel-color-rgb), 0.12); background-color: rgba(var(--center-channel-color-rgb), 0.12);
} }
.icon { .icon {
font-size: 14.4px;
color: rgba(var(--center-channel-color-rgb), 0.56); color: rgba(var(--center-channel-color-rgb), 0.56);
font-size: 14.4px;
}; };
`; `;
@@ -123,6 +129,7 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions
return ( return (
<div <div
className={className} className={className}
style={{height: '48px'}}
data-testid={`memberline-${member.user.id}`} data-testid={`memberline-${member.user.id}`}
> >
@@ -167,8 +174,14 @@ const Member = ({className, channel, member, index, totalUsers, editing, actions
userID={member.user.id} userID={member.user.id}
showTooltip={true} showTooltip={true}
emojiSize={16} emojiSize={16}
spanStyle={{
display: 'flex',
flex: '0 0 auto',
alignItems: 'center',
}}
emojiStyle={{ emojiStyle={{
marginLeft: '8px', marginLeft: '8px',
alignItems: 'center',
}} }}
/> />
</UserInfo> </UserInfo>
@@ -242,18 +255,23 @@ export default styled(Member)`
${SendMessage} { ${SendMessage} {
display: block; display: block;
flex: 0 0 auto;
} }
} }
.ProfileSpan { .ProfileSpan {
display: flex; display: flex;
overflow: hidden;
width: 100%;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
// This padding is to make sure the status icon doesnt get clipped off because of the overflow
padding: 4px 0;
margin-right: auto; margin-right: auto;
} }
.MenuWrapper { .MenuWrapper {
font-weight: 600;
font-size: 11px; font-size: 11px;
font-weight: 600;
} }
`; `;

Просмотреть файл

@@ -76,6 +76,11 @@ export default function UserDetails(props: Props): JSX.Element {
userID={option.id} userID={option.id}
showTooltip={true} showTooltip={true}
emojiSize={15} emojiSize={15}
spanStyle={{
display: 'flex',
flex: '0 0 auto',
alignItems: 'center',
}}
/> />
</div> </div>
{!isBot && ( {!isBot && (

Просмотреть файл

@@ -153,6 +153,11 @@ const UserListRow = ({user, status, extraInfo = [], actions = [], actionProps, a
userID={user.id} userID={user.id}
emojiSize={16} emojiSize={16}
showTooltip={true} showTooltip={true}
spanStyle={{
display: 'flex',
flex: '0 0 auto',
alignItems: 'center',
}}
/> />
</CustomStatus> </CustomStatus>

Просмотреть файл

@@ -160,7 +160,9 @@
} }
.fullname { .fullname {
overflow: hidden;
opacity: 0.5; opacity: 0.5;
text-overflow: ellipsis;
&::before { &::before {
padding: 5px; padding: 5px;
@@ -169,7 +171,9 @@
} }
.nickname { .nickname {
overflow: hidden;
opacity: 0.5; opacity: 0.5;
text-overflow: ellipsis;
&::before { &::before {
content: "("; content: "(";

Просмотреть файл

@@ -204,6 +204,7 @@
white-space: nowrap; white-space: nowrap;
.suggestion-list__main { .suggestion-list__main {
display: flex;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
color: rgba(var(--center-channel-color-rgb), 1); color: rgba(var(--center-channel-color-rgb), 1);
@@ -225,7 +226,11 @@
.suggestion-list__main { .suggestion-list__main {
width: unset; width: unset;
max-width: 70%;
> span:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
} }
.badge { .badge {

Просмотреть файл

@@ -555,6 +555,7 @@
padding: 10px 15px; padding: 10px 15px;
background: $bg--gray; background: $bg--gray;
border-radius: 3px; border-radius: 3px;
word-break: break-word;
} }
} }

Просмотреть файл

@@ -18,6 +18,10 @@
-ms-flex-preferred-size: 0; -ms-flex-preferred-size: 0;
} }
.flex-auto {
flex: 0 0 auto;
}
.flex-wrap { .flex-wrap {
flex-wrap: wrap; flex-wrap: wrap;
} }

Просмотреть файл

@@ -1923,7 +1923,7 @@ export const Constants = {
MAX_EMAIL_LENGTH: 128, MAX_EMAIL_LENGTH: 128,
MIN_USERNAME_LENGTH: 3, MIN_USERNAME_LENGTH: 3,
MAX_USERNAME_LENGTH: 22, MAX_USERNAME_LENGTH: 22,
MAX_NICKNAME_LENGTH: 22, MAX_NICKNAME_LENGTH: 64,
MIN_PASSWORD_LENGTH: 5, MIN_PASSWORD_LENGTH: 5,
MAX_PASSWORD_LENGTH: 64, MAX_PASSWORD_LENGTH: 64,
MAX_POSITION_LENGTH: 128, MAX_POSITION_LENGTH: 128,