messagebox: Add title-text for user profile on sender name and avatar.

A separate outer span with the title text needs to be added because:

(1) The default bootstrap popover behavior takes the title as the
popover title, if provided.
(2) We need to avoid having the title area be too big in the
me_message template.

Fixes #12769.

Co-Author-By: Vaibhav <vrongmeal@gmail.com>
This commit is contained in:
Gillian Pantaleon 2020-04-15 21:25:07 -04:00 committed by Tim Abbott
parent 734d651b45
commit 7a943601bc
2 changed files with 10 additions and 5 deletions

View File

@ -1,10 +1,16 @@
<span class="message_sender no-select"> <span class="message_sender no-select">
<span class="sender_info_hover"> <span class="sender_info_hover">
{{> message_avatar}} <span title="{{t 'View user profile' }} (u)">
{{> message_avatar}}
</span>
</span> </span>
<span class="sender-status"> <span class="sender-status">
<span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">
<span title="{{t 'View user profile' }} (u)" >
{{msg/sender_full_name}}
</span>
</span>
{{#if sender_is_bot}} {{#if sender_is_bot}}
<i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i>
{{/if}} {{/if}}

View File

@ -2,14 +2,13 @@
{{#unless status_message}} {{#unless status_message}}
<span class="message_sender sender_info_hover no-select"> <span class="message_sender sender_info_hover no-select">
{{#if include_sender}} {{#if include_sender}}
<span title="{{t 'View user profile' }} (u)">
{{> message_avatar}} {{> message_avatar}}
<span class="sender_name auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> <span class="sender_name auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span>
{{#if sender_is_bot}} {{#if sender_is_bot}}
<i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i>
{{/if}} {{/if}}
</span>
{{/if}} {{/if}}
</span> </span>
{{/unless}} {{/unless}}