From 15a15240da6feb2909b61d601be6d93ae39d8e8a Mon Sep 17 00:00:00 2001 From: Hardik Dharmani Date: Sun, 9 Apr 2023 02:27:06 +0530 Subject: [PATCH] tooltips: Add tippy tooltips in manage stream settings. Added tippy tooltips for create_stream_plus_button and preview-stream-button in manage stream settings by adding class `.tippy-zulip-delayed-tooltip` which add tooltips with LONG_HOVER_DELAY. Added data-tippy-placement="bottom" to match with 'Archive stream' tooltip. Created a new tooltip for sub_unsub_button in tippyjs with class .toggle-subscription-tooltip that has EXTRA_LONG_HOVER_DELAY, placement equals to bottom and appended to body. Fixes part of #24311. --- web/src/tippyjs.js | 7 +++++++ web/templates/stream_settings/stream_settings.hbs | 12 ++++++++++-- .../stream_settings/stream_settings_overlay.hbs | 6 +++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/web/src/tippyjs.js b/web/src/tippyjs.js index f83bdc0837..388668d5d9 100644 --- a/web/src/tippyjs.js +++ b/web/src/tippyjs.js @@ -137,6 +137,13 @@ export function initialize() { }, }); + delegate("body", { + target: ".toggle-subscription-tooltip", + delay: EXTRA_LONG_HOVER_DELAY, + appendTo: () => document.body, + placement: "bottom", + }); + delegate("body", { target: ".tippy-left-sidebar-tooltip", placement: "right", diff --git a/web/templates/stream_settings/stream_settings.hbs b/web/templates/stream_settings/stream_settings.hbs index 0bd44817a5..8c5e2eb02b 100644 --- a/web/templates/stream_settings/stream_settings.hbs +++ b/web/templates/stream_settings/stream_settings.hbs @@ -3,7 +3,7 @@ {{#with sub}}
-
- + + {{#if is_realm_admin}} {{/if}}
+ {{/with}}
diff --git a/web/templates/stream_settings/stream_settings_overlay.hbs b/web/templates/stream_settings/stream_settings_overlay.hbs index dca2ef33d6..1fbe1e2f0e 100644 --- a/web/templates/stream_settings/stream_settings_overlay.hbs +++ b/web/templates/stream_settings/stream_settings_overlay.hbs @@ -12,9 +12,13 @@
{{#if can_create_streams}} - + {{/if}}