zulip/web
PALASH BADERIA 341f3a1ce2
tippy: Add message_list_tooltip helper to clear tooltips on rerender.
We've had a series of bugs where tooltips get leaked when a message list
is rerendered. For some tooltips, we used a 'mutation observer' to remove the tooltip
in this situation, but this was expensive and messy. We replace this with a Tippy
plugin to keep track of this class of tooltips, with a central hook to remove them
during rendering.

Message lists are rerendered in the background in a variety of situations;
a simple way to trigger it is clicking the mute/unmute topic/stream button in
the topic menu/stream menu and the clickable area overlaps with the
message list tooltips area. If a tooltip was visible at the time, the tooltip loses its
reference due to the re-rendering removing its DOM element, appearing at the top-left corner.

To prevent this behavior for all message list tooltips, we need to
store all instances of the message list tooltips and then destroy
them if the instances does refer to something else then document.body
using the 'destroy_all_message_list_instances' function just
before re-rendering.

Whenever the message list is rendered, all the message list tooltips
will be destroyed if they do not refer to document.body. This
prevents the double appearance of those tooltips if the reference
is removed from the DOM.

This plugin allows us to remove the mutation observers and net delete code
while hopefully fixing this bug for the whole app.
2023-04-30 22:33:14 -07:00
..
e2e-tests tooltips: Convert recipient row tooltips to tippy. 2023-04-28 15:34:59 -07:00
generated
html
images compose: Add DM icon to the recipient dropdown. 2023-04-27 17:04:19 -07:00
shared typeahead: Always show exact matches first for streams and users. 2023-04-27 12:45:26 -07:00
src tippy: Add message_list_tooltip helper to clear tooltips on rerender. 2023-04-30 22:33:14 -07:00
styles compose: Fix misaligment of compose top right icons. 2023-04-30 21:02:21 -07:00
templates tooltips: Remove keyboard shortcuts from View Scheduled Messages modal. 2023-04-30 20:34:53 -07:00
tests left_sidebar: Replace the presence dot with bot icon for bots. 2023-04-28 19:14:00 -07:00
third search: Fix display of suggestion box when search bar empty. 2023-04-24 21:45:06 -07:00
.browserslistrc webpack: Move webpack configuration to web. 2023-02-24 06:35:58 -08:00
.gitignore
babel.config.js dependencies: Upgrade JavaScript dependencies. 2023-04-25 22:18:48 -07:00
debug-require-webpack-plugin.ts
debug-require.js
postcss.config.js postcss: Enable postcss-preset-env. 2023-03-20 11:26:30 -07:00
webpack.assets.json webpack: Move webpack configuration to web. 2023-02-24 06:35:58 -08:00
webpack.config.ts eslint: Fix @typescript-eslint/prefer-nullish-coalescing. 2023-04-19 16:52:39 -07:00
webpack.dev-assets.json webpack: Move webpack configuration to web. 2023-02-24 06:35:58 -08:00