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

Fine-tune delays in Tooltip and associated components #2368

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

r100-stack
Copy link
Member

@r100-stack r100-stack commented Dec 11, 2024

Changes

After we fixed the default Tooltip delay in #2263, a couple of components had the problem of lingering tooltips. To fix it, this PR wraps some of the parts of the affected components within Floating UI's FloatingDelayGroup.

Components where FloatingDelayGroup wrapper is added:

  • SideNavigation
  • Slider
  • Stepper

While this PR fixes the lingering tooltip problem within the items of the component itself, it doesn't fix the problem between two components. To fix the latter part also, I had considered moving FloatingDelayGroup to the ThemeProvider but then didn't go that route based on our internal discussion. One of the reasons to not go that route was to prevent unintended issues.

According to our discussion, I also changed the default tooltip delay from { open: 50, close: 250 } to { open: 100, close: 200 }. If we later find research regarding the best delay values, we can further fine-tune this default delay.

Testing

CI passing after small updates to the tests.

Before and After
Component Before After
Stepper
Before.mov
After.mov
SideNavigation
Before.mov
After.mov
Slider
Before.mov
After.mov

Docs

Added a changeset.

@r100-stack r100-stack self-assigned this Dec 11, 2024
@r100-stack r100-stack marked this pull request as ready for review December 11, 2024 22:32
@r100-stack r100-stack requested a review from a team as a code owner December 11, 2024 22:32
@r100-stack r100-stack requested review from mayank99 and smmr-dn and removed request for a team December 11, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant