discourse/plugins/chat/test/javascripts/acceptance
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
..
chat-composer-test.js UX: chat composer buttons refactor + emoji (#21852) 2023-05-31 15:12:35 +02:00
chat-live-pane-collapse-test.js DEV: Remove lazy-yt and replace with lazy-videos (#20722) 2023-03-29 11:54:25 -04:00
chat-live-pane-test.js DEV: `/channel` -> `/c` chat route rename (#19782) 2023-01-27 09:58:12 -03:00
hashtag-css-generator-test.js UX: category hashtag colors order fix (#22758) 2023-07-24 14:36:56 +02:00
user-status-on-mentions-test.js FIX: hide tooltips when scrolling on mobile (#23098) 2023-08-23 15:39:58 +04:00