midudev / codi.link

HTML, CSS, JS sandbox.

Home Page:https://codi.link

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add timeout to tooltip after few seconds to remove it

diegogb-08 opened this issue · comments

When you hover the sidebar buttons, the tooltip stays there as long as you have the mouse over, but I think it would be better if the tooltip disappear after 5 seconds

I have opened a PR to fix this issue: #104 I hope you like it. This is actually my first PR ever in an open source project :)

When you hover the sidebar buttons, the tooltip stays there as long as you have the mouse over, but I think it would be better if the tooltip disappear after 5 seconds

Hi @diegogb-08 , why do you think that is wrong? I think it is the normal behavior of tooltips. In fact, in visual studio, it does not disappear until the cursor leaves the element.
vscode

I have opened a PR to fix this issue: #104 I hope you like it. This is actually my first PR ever in an open source project :)

It's also my first time collaborating on open source projects. Congrats!!

Actually you are right, even though my vscode does not act the same way you show on the video. However, I still think that it is a bit annoying to have the tooltip there forever and I think the fact that it disappears or appears after few seconds gives a better UX because it is not covering forever part of text from the menu. It might be me with my OCD :).

It's not a critical requested feature, but it helps to the experience anyway. Let's see if it got accepted!

In my opinion we shouldn't remove tooltips, as @dartilesm pointed, vscode doesn't remove them till element isn't hovered. They copy title attribute behaviour and in terms of user experience is better to leave it like that. (Just my point of view)

I would recommend to hide the tooltip actually when the user click in the section and enters. Some changes to the PR would be needed, as now the tooltip is being hidden even when you're only hovering the button.

This way, we mimic the VSCode functionality as well. :)