Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a delay to tooltip #15716

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Add a delay to tooltip #15716

merged 1 commit into from
Jan 12, 2023

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Jan 12, 2023

Description

Currently our <Tooltip/> component will show as soon as a user hovers over the content, which can be disruptive, and not expected default behavior of a tooltip. This becomes pretty evident on the Workspaces list where you get flashes of tooltip overlays as you move your cursor across items. These changes adjust it so it waits for the user to pause for 500 milliseconds before showing the tooltip, otherwise it won't show.

How to test

Hover over a tooltip and ensure it doesn't show right away, but after ~ 500ms.

An easy to access tooltips can be found if you create a team, and navigate to the Members view. Clicking invite Members will open a modal w/ an input that has the invite link and a copy to clipboard icon. The clipboard icon is a tooltip you can hover over.

Another place to test is when creating a personal access token, which has the same copy to clipboard input to test the tooltip on.

Fixes #8686

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-bmh-tooltip-hover-delay.2 because the annotations in the pull request description changed
(with .werft/ from main)

@selfcontained selfcontained marked this pull request as ready for review January 12, 2023 15:52
@selfcontained selfcontained requested a review from a team January 12, 2023 15:52
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jan 12, 2023
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it and works ✅

/hold for

@gtsiolis to have a look as well

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 12, 2023

Looking at this now! 👀

I will also be at the company social call (internal) if anyone wants to stop by! 🍷

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On spot, @selfcontained! 🔮

Having a default delay of 500ms helps with 🅰️ not accidentally hover an element with a tooltip and 🅱️ not showing constantly tooltips in the UI when a user is moving their mouse over the page. ✨

Thanks for making this change—this has been proposed a few times over the last months but we never opened a concrete issue to make this change, see relevant discussions[1][2][3] (internal). Cc @mbrevoort who also mentioned this issue with the tooltip overlapping in the linked discussions above.

This will also resolve #8686. I've updated the PR description to include that as the issue mentioned about timestamps in #8686 is already being tracked in #13764.

Thanks for the ping, @geropl! 🏓

@gtsiolis
Copy link
Contributor

/unhold

@roboquat roboquat merged commit 770815b into main Jan 12, 2023
@roboquat roboquat deleted the bmh/tooltip-hover-delay branch January 12, 2023 16:39
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workspace list tooltip annoyances
5 participants