discourse/plugins/chat/test/javascripts
Andrei Prigorshnev 9c0e50e1cc
FIX: hide tooltips when scrolling on mobile (#23098)
This fixes the problem reported in 
https://meta.discourse.org/t/custom-status-message-in-front-of-by-header-on-scroll/273320.

This problem can be reproduced with any tooltip created using the DTooltip 
component or the createDTooltip function.

The problem happens because the trigger for tooltip on mobile is click, and for tooltip 
to disappear the user has to click outside the tooltip. This is the default behavior 
of tippy.js – the library we use under the hood.

Note that this PR fixes the problem in topics, but not in chat. I'm going to investigate and 
address it in chat in a following PR.

To fix it for tooltips created with the createDTooltip function, I had to make a refactoring. 
We had a somewhat not ideal solution there, we were leaking an implementation detail 
by passing tippy instances to calling sides, so they could then destroy them. With this fix, 
I would have to make it more complex, because now we need to also remove onScrool 
handlers, and I would need to leak this implementation detail too. So, I firstly refactored 
the current solution in 5a4af05 and then added onScroll handlers in fb4aabe.

When refactoring this, I was running locally some temporarily skipped flaky tests. Turned out 
they got a bit outdated, so I fixed them. Note that I'm not unskipping them in this commit, 
we'll address them separately later.
2023-08-23 15:39:58 +04:00
..
acceptance FIX: hide tooltips when scrolling on mobile (#23098) 2023-08-23 15:39:58 +04:00
components FEATURE: Chat global mention warnings (pre-send & post-send) (#22764) 2023-08-22 15:54:35 -05:00
helpers DEV: various improvements to devex on chat (#21612) 2023-05-17 17:49:52 +02:00
integration/components/user-menu DEV: Modernize chat's component tests (#19577) 2022-12-22 14:35:18 +01:00
unit FEATURE: thread pagination (#22624) 2023-07-27 09:57:03 +02:00
widgets DEV: Pass messageId as a dynamic segment instead of a query param (#20013) 2023-02-01 12:39:23 -03:00
chat-fixtures.js DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00