mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
message_feed: Modify tooltips to clarify draft saving.
Update the tooltips for the "Cancel" and "Spinner". Provide clear information about the draft saving behavior when a message fails to send successfully. Fixes part of #29100.
This commit is contained in:
@@ -8,7 +8,6 @@ import render_message_edit_notice_tooltip from "../templates/message_edit_notice
|
|||||||
import render_message_inline_image_tooltip from "../templates/message_inline_image_tooltip.hbs";
|
import render_message_inline_image_tooltip from "../templates/message_inline_image_tooltip.hbs";
|
||||||
import render_narrow_tooltip from "../templates/narrow_tooltip.hbs";
|
import render_narrow_tooltip from "../templates/narrow_tooltip.hbs";
|
||||||
|
|
||||||
import {$t} from "./i18n";
|
|
||||||
import * as message_lists from "./message_lists";
|
import * as message_lists from "./message_lists";
|
||||||
import * as popover_menus from "./popover_menus";
|
import * as popover_menus from "./popover_menus";
|
||||||
import * as reactions from "./reactions";
|
import * as reactions from "./reactions";
|
||||||
@@ -221,12 +220,6 @@ export function initialize(): void {
|
|||||||
|
|
||||||
message_list_tooltip(".slow-send-spinner", {
|
message_list_tooltip(".slow-send-spinner", {
|
||||||
onShow(instance) {
|
onShow(instance) {
|
||||||
instance.setContent(
|
|
||||||
$t({
|
|
||||||
defaultMessage:
|
|
||||||
"Your message is taking longer than expected to be sent. Sending…",
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
const $elem = $(instance.reference);
|
const $elem = $(instance.reference);
|
||||||
|
|
||||||
// We need to check for removal of local class from message_row since
|
// We need to check for removal of local class from message_row since
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{#if (and (not msg/failed_request) msg/locally_echoed)}}
|
{{#if (and (not msg/failed_request) msg/locally_echoed)}}
|
||||||
<span class="fa fa-circle-o-notch slow-send-spinner{{#unless msg/show_slow_send_spinner }} hidden{{/unless}}"></span>
|
<span data-tooltip-template-id="slow-send-spinner-tooltip-template" class="fa fa-circle-o-notch slow-send-spinner{{#unless msg/show_slow_send_spinner }} hidden{{/unless}}"></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{> message_controls}}
|
{{> message_controls}}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
<i class="fa fa-refresh refresh-failed-message" aria-label="{{t 'Retry' }}" role="button" tabindex="0"></i>
|
<i class="fa fa-refresh refresh-failed-message" aria-label="{{t 'Retry' }}" role="button" tabindex="0"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message_control_button failed_message_action" data-tippy-content="{{t 'Cancel' }}">
|
<div class="message_control_button failed_message_action" data-tooltip-template-id="dismiss-failed-send-button-tooltip-template">
|
||||||
<i class="fa fa-times-circle remove-failed-message" aria-label="{{t 'Cancel' }}" role="button" tabindex="0"></i>
|
<i class="fa fa-times-circle remove-failed-message" aria-label="{{t 'Dismiss' }}" role="button" tabindex="0"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -154,6 +154,22 @@
|
|||||||
{{t "Message actions" }}
|
{{t "Message actions" }}
|
||||||
{{tooltip_hotkey_hints "I"}}
|
{{tooltip_hotkey_hints "I"}}
|
||||||
</template>
|
</template>
|
||||||
|
<template id="dismiss-failed-send-button-tooltip-template">
|
||||||
|
<div>
|
||||||
|
<div>{{t "Dismiss failed message" }}</div>
|
||||||
|
<div class="italic tooltip-inner-content">
|
||||||
|
{{t "This content remains saved in your drafts." }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template id="slow-send-spinner-tooltip-template">
|
||||||
|
<div>
|
||||||
|
<div>{{t "Sending…" }}</div>
|
||||||
|
<div class="italic">
|
||||||
|
{{t "This message will remain saved in your drafts until it is successfully sent." }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template id="star-message-tooltip-template">
|
<template id="star-message-tooltip-template">
|
||||||
<div class="starred-status">{{t "Star this message" }}</div>
|
<div class="starred-status">{{t "Star this message" }}</div>
|
||||||
{{tooltip_hotkey_hints "Ctrl" "S"}}
|
{{tooltip_hotkey_hints "Ctrl" "S"}}
|
||||||
|
|||||||
Reference in New Issue
Block a user