Add ellipsis for long contact names

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-02-26 19:37:54 -06:00 committed by GitHub
parent 5c22a6006b
commit 284df41648
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 5 deletions

View file

@ -8,6 +8,7 @@
justify-content: center; justify-content: center;
margin-top: 4px; margin-top: 4px;
margin-bottom: 24px; margin-bottom: 24px;
padding-inline: 24px;
&__name { &__name {
@include button-reset(); @include button-reset();
@ -16,12 +17,21 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: baseline; align-items: baseline;
max-width: 100%;
margin-top: 12px; margin-top: 12px;
cursor: pointer; cursor: pointer;
} }
&__name__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__name__chevron { &__name__chevron {
flex-shrink: 0;
display: inline-block; display: inline-block;
height: 20px; height: 20px;
width: 20px; width: 20px;
@ -64,7 +74,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding-block: 6px; padding-block: 6px;
padding-inline: 24px;
width: 100%; width: 100%;
&:last-child { &:last-child {
@ -263,8 +272,7 @@
} }
&__divider { &__divider {
// Full width minus margin width: 100%;
width: calc(100% - 48px);
border-style: solid; border-style: solid;
border-bottom: none; border-bottom: none;
@ -279,6 +287,5 @@
} }
margin-block: 8px 5px; margin-block: 8px 5px;
margin-inline: 24px;
} }
} }

View file

@ -247,7 +247,9 @@ export function ContactModal({
toggleAboutContactModal(contact.id); toggleAboutContactModal(contact.id);
}} }}
> >
<UserText text={contact.title} /> <div className="ContactModal__name__text">
<UserText text={contact.title} />
</div>
<i className="ContactModal__name__chevron" /> <i className="ContactModal__name__chevron" />
</button> </button>
{!contact.isMe && ( {!contact.isMe && (