Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
reactions: Set interactive hover delay on reaction Tippies.
Karl Stolleyb374b2117147
diff --git a/web/src/message_list_tooltips.js b/web/src/message_list_tooltips.jsindex 0644bb9de9e..80f6181ec29 100644--- a/web/src/message_list_tooltips.js+++ b/web/src/message_list_tooltips.js@@ -12,7 +12,7 @@ import {page_params} from "./page_params";import * as reactions from "./reactions";import * as rows from "./rows";import * as timerender from "./timerender";-import {LONG_HOVER_DELAY} from "./tippyjs";+import {INTERACTIVE_HOVER_DELAY, LONG_HOVER_DELAY} from "./tippyjs";import {parse_html} from "./ui_util";// We need to store all message list instances together to destroy them in case of re-rendering.@@ -105,6 +105,7 @@ export function initialize() {// message reaction tooltip showing who reacted.let observer;message_list_tooltip(".message_reaction, .message_reactions .reaction_button", {+ delay: INTERACTIVE_HOVER_DELAY,placement: "bottom",onShow(instance) {if (!document.body.contains(instance.reference)) {diff --git a/web/src/tippyjs.js b/web/src/tippyjs.jsindex 7d8c5e58f95..3071e90cda0 100644--- a/web/src/tippyjs.js+++ b/web/src/tippyjs.js@@ -18,12 +18,17 @@ function get_tooltip_content(reference) {return "";}-// We use three delay settings for tooltips. The default "instant"+// We use different delay settings for tooltips. The default "instant"// version has just a tiny bit of delay to create a natural feeling// transition, while the "long" version is intended for elements where// we want to avoid distracting the user with the tooltip// unnecessarily.const INSTANT_HOVER_DELAY = [100, 20];+// INTERACTIVE_HOVER_DELAY is for elements like the emoji reactions, where+// the tooltip includes useful information (who reacted?), but that+// needs a short delay for users who are just tapping a reaction+// element and not interested in the tooltip's contents.+export const INTERACTIVE_HOVER_DELAY = [425, 20];export const LONG_HOVER_DELAY = [750, 20];// EXTRA_LONG_HOVER_DELAY is for elements like the compose box send// button where the tooltip content is almost exactly the same as the