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

Improve tooltip appearance/disappearance timing #11091

Open
2 of 5 tasks
nCastle1 opened this issue Dec 17, 2024 · 2 comments
Open
2 of 5 tasks

Improve tooltip appearance/disappearance timing #11091

nCastle1 opened this issue Dec 17, 2024 · 2 comments
Labels
0 - new New issues that need assignment. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@nCastle1
Copy link

Check existing issues

Description

Currently, Calcite tooltip is quite slow to disappear (and sometimes will just not disappear), but is very quick to appear on hover. This is the opposite of typical browser behavior, where tooltips are slow to appear, but disappear instantly. It is also different from the tooltip behavior of other libraries (e.g. bootstrap) that use floating-ui/poppers-js.

Demo showing delays with Calcite tooltip, and failure to dismiss in some cases:

Screen.Recording.2024-12-17.at.2.17.52.PM.mov

Another issue is that there seems to be a delay between when the mouse event happens and when the tooltip is shown or hidden; but by the time the tooltip appears it is no longer needed. This can look bad when multiple elements with tooltips are shown side-by-side, e.g. in an action bar:

Screen.Recording.2024-12-17.at.2.20.49.PM.mov

Demo of another implementation:

Screen.Recording.2024-12-17.at.2.19.18.PM.mov

Browser built-in tooltip behavior:

Screen.Recording.2024-12-17.at.2.24.11.PM.mov

(tooltip is slow to appear at first, but disappears instantly. If a tooltip has been shown very recently, subsequent tooltips are faster to appear)

Acceptance Criteria

  • Tooltips do not start to appear after the mouse has already left the reference element
  • Tooltips disappear immediately after the mouse has left the reference element
  • Tooltips do not appear when the mouse is not on the reference element

Relevant Info

Behavior appears to be the same for 2.x and 3.x tooltips, so I don't believe the issues are caused by recent Stencil migration work.

Which Component

calcite-tooltip

Example Use Case

I would like to use calcite tooltips for elements in a calcite-action-pad, but performance/behavior was unacceptable, so I had to remove them and rely on built-in browser tooltips.

Priority impact

impact - p2 - want for an upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Maps SDK for JavaScript

@nCastle1 nCastle1 added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Dec 17, 2024
@github-actions github-actions bot added ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Dec 17, 2024
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed needs triage Planning workflow - pending design/dev review. labels Dec 18, 2024
@geospatialem
Copy link
Member

@nCastle1 Can you help our investigation on the above with a repro case of the current behavior?

@DitwanP
Copy link
Contributor

DitwanP commented Dec 18, 2024

To repro the case of tooltip not disappearing you have to quickly hover and remove the mouse from the tooltip and then do not move the mouse. ⚡️🛑

Screen.Recording.2024-12-18.at.11.17.26.AM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

3 participants