mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
This commit introduces the use of createSingleton from the Tippy.js library to group the tooltips of compose box formatting buttons. The main benefit is that the hover delay only applies when you move the cursor into the group for the first time — after that, tooltips show up instantly as you move between buttons. It makes the whole experience feel a lot smoother. We store the singleton instance in a variable to avoid creating multiple instances unnecessarily. Before initializing a new singleton, we destroy the previous one to prevent memory leaks and ensure correct behavior. Previously, each formatting button had its own independent tooltip with separate delays, which made the experience feel sluggish and disjointed when hovering across buttons. Now, by sharing a delay timer across the grouped tooltips, the transition feels more natural. Fixes: #24825. Co-authored-by: Sayam Samal <sayam@zulip.com>
21 KiB
21 KiB