message_headers: Abbrevate direct message recipient names.

Abbrevated DM recipient names in message feeds, Drafts and Scheduled
messages overlays by wrapping recipient names in span with class
private_message_header_name and applying `overflow: hidden` and
`text-overflow: ellipsis` CSS to it.

Fixes #25353
This commit is contained in:
Hardik Dharmani
2023-05-02 21:23:32 +05:30
committed by Tim Abbott
parent 99a988e220
commit 697cdb31e5
4 changed files with 8 additions and 3 deletions

View File

@@ -1416,6 +1416,11 @@ td.pointer {
width: 16px;
height: 16px;
}
.private_message_header_name {
overflow: hidden;
text-overflow: ellipsis;
}
}
}

View File

@@ -24,7 +24,7 @@
<div class="message-header-contents">
<div class="message_label_clickable stream_label">
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
{{t "You and {recipients}" }}
<span class="private_message_header_name">{{t "You and {recipients}" }}</span>
</div>
<div class="recipient_row_date" title="{{t 'Last modified'}}">{{ time_stamp }}</div>
</div>

View File

@@ -76,7 +76,7 @@
href="{{pm_with_url}}"
data-tippy-content="{{t 'Go to direct messages with {display_reply_to}' }}">
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
{{t "You and {display_reply_to}" }}
<span class="private_message_header_name">{{t "You and {display_reply_to}" }}</span>
</a>
<span class="recipient_row_date {{#if date_unchanged}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
</div>

View File

@@ -25,7 +25,7 @@
<div class="message-header-contents">
<div class="message_label_clickable stream_label">
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
{{t "You and {recipients}" }}
<span class="private_message_header_name">{{t "You and {recipients}" }}</span>
</div>
<div class="recipient_row_date">{{ formatted_send_at_time }}</div>
</div>