UX: Chat channel title overflow ellipsis fixes (#20956)

* UX: add correct class

* UX: prioritise name over user messages when truncating

* UX: add missing overflows to enable ellipsis
This commit is contained in:
chapoi 2023-04-04 12:44:36 +02:00 committed by GitHub
parent e014635a12
commit 6e2fd7a451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 1 deletions

View File

@ -28,6 +28,7 @@
<span class="chat-channel-title__name">{{user.username}}</span>
{{#if this.showUserStatus}}
<UserStatusMessage
@class="chat-channel-title__user-status-message"
@status={{this.channel.chatable.users.firstObject.status}}
@showDescription={{if this.site.mobileView "true"}}
/>

View File

@ -262,6 +262,7 @@ $float-height: 530px;
width: 100%;
min-height: 1px;
position: relative;
overflow: hidden;
.open-drawer-btn {
color: var(--primary-low-mid);
@ -479,6 +480,7 @@ body.has-full-page-chat {
display: flex;
align-items: stretch;
flex: 1;
max-width: 100%;
.chat-channel-archive-status {
text-align: right;
@ -616,6 +618,7 @@ html.has-full-page-chat {
.main-chat-outlet {
min-height: 0;
overflow: hidden;
}
}
}

View File

@ -1,6 +1,7 @@
.chat-channel-title-wrapper {
display: flex;
align-items: center;
overflow: hidden;
}
.chat-channel-title {
@ -8,10 +9,19 @@
align-items: center;
@include ellipsis;
&__user-info {
overflow: hidden;
}
.user-status-message {
display: none; // we only show when in channels list
}
&__user-status-message {
flex-shrink: 3;
overflow: hidden;
}
.chat-name,
.category-chat-name,
&__usernames,

View File

@ -153,6 +153,10 @@ html.rtl {
font-weight: 700;
width: 100%;
&__user-info {
overflow: hidden;
}
.chat-name,
.chat-drawer-name,
.category-chat-name,

View File

@ -5,4 +5,10 @@
background: var(--primary-very-low);
border-radius: 5px;
}
.chat-channel-title {
&__user-info {
overflow: hidden;
}
}
}

View File

@ -61,7 +61,6 @@
}
&__name {
flex-shrink: 0;
margin-left: 0.75em;
font-size: var(--font-up-1);
}
@ -71,6 +70,7 @@
}
&__user-status-message {
flex-shrink: 3;
overflow: hidden;
text-overflow: ellipsis;
}