tooltips: Add tippy tooltip for message expander/condenser.

Added tippy tootip for '.message_expander' and
'.messsage_condenser' by adding '.tippy-zulip-delayed-tooltip' class,
and creating 2 <template> with id equal to crresponding
data-tooltip-template-id of the elements.

Fixes part of #24311
This commit is contained in:
Hardik Dharmani 2023-04-09 02:27:58 +05:30 committed by Tim Abbott
parent 15a15240da
commit 9c866f9be1
1 changed files with 10 additions and 2 deletions

View File

@ -60,9 +60,17 @@
<div class="message_edit">
<div class="message_edit_form"></div>
</div>
<div class="message_expander message_length_controller" title="{{t 'Expand message (-)' }}">{{t "[More…]" }}</div>
<div class="message_condenser message_length_controller" title="{{t 'Show less' }} (-)">[{{t "Show less" }}]</div>
<div class="message_expander message_length_controller tippy-zulip-delayed-tooltip" data-tooltip-template-id="message-expander-tooltip-template">{{t "[More…]" }}</div>
<div class="message_condenser message_length_controller tippy-zulip-delayed-tooltip" data-tooltip-template-id="message-condenser-tooltip-template">[{{t "Show less" }}]</div>
<template id="message-expander-tooltip-template">
{{t 'Show more' }}
{{tooltip_hotkey_hints "-"}}
</template>
<template id="message-condenser-tooltip-template">
{{t 'Show less' }}
{{tooltip_hotkey_hints "-"}}
</template>
{{#unless is_hidden}}
<div class="message_reactions">{{> message_reactions }}</div>
{{/unless}}