Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Use tippy to show tooltips for top right compose icons.

Aman Agrawal1f812df0d248
diff --git a/static/js/tippyjs.js b/static/js/tippyjs.js
index dfd48e558a6..b2a1b3a6084 100644
--- a/static/js/tippyjs.js
+++ b/static/js/tippyjs.js
@@ -190,7 +190,11 @@ export function initialize() {
});
delegate("body", {
- target: [".rendered_markdown time", ".rendered_markdown .copy_codeblock"],
+ target: [
+ ".rendered_markdown time",
+ ".rendered_markdown .copy_codeblock",
+ "#compose_top_right [data-tippy-content]",
+ ],
allowHTML: true,
appendTo: () => document.body,
onHidden(instance) {
diff --git a/static/templates/compose.hbs b/static/templates/compose.hbs
index ff2c5e71247..b12aa2503c2 100644
--- a/static/templates/compose.hbs
+++ b/static/templates/compose.hbs
@@ -52,9 +52,9 @@
<div id="out-of-view-notification" class="notification-alert"></div>
<div class="composition-area">
<div id="compose_top_right">
- <button type="button" class="expand_composebox_button fa fa-angle-up" aria-label="{{t 'Expand compose' }}" tabindex=0 title="{{t 'Expand compose' }}"></button>
- <button type="button" class="collapse_composebox_button fa fa-angle-down" aria-label="{{t 'Collapse compose' }}" tabindex=0 title="{{t 'Collapse compose' }}"></button>
- <button type="button" class="close" id='compose_close' title="{{t 'Cancel compose' }} (Esc)">&times;</button>
+ <button type="button" class="expand_composebox_button fa fa-angle-up" aria-label="{{t 'Expand compose' }}" tabindex=0 data-tippy-content="{{t 'Expand compose' }}"></button>
+ <button type="button" class="collapse_composebox_button fa fa-angle-down" aria-label="{{t 'Collapse compose' }}" tabindex=0 data-tippy-content="{{t 'Collapse compose' }}"></button>
+ <button type="button" class="close" id='compose_close' data-tippy-content="{{t 'Cancel compose' }} <span class='hotkey-hint'>(Esc)</span>">&times;</button>
</div>
<form id="send_message_form" action="/json/messages" method="post">
{{ csrf_input }}