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

feat(tooltip): adds tooltip support for restMs and delay properties #1200

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

Conversation

DavidSeptimus-Klotho
Copy link

implements #589

This change adds support for floating-ui's useHover restMs and delay props to the Tooltip component to enable delayed opening/closing of tooltips.

Copy link

vercel bot commented Dec 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2024 0:49am

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7461173) 99.54% compared to head (76132ab) 97.37%.
Report is 186 commits behind head on main.

❗ Current head 76132ab differs from pull request most recent head b379544. Consider uploading reports for the commit b379544 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1200      +/-   ##
==========================================
- Coverage   99.54%   97.37%   -2.18%     
==========================================
  Files         163      214      +51     
  Lines        6621     9093    +2472     
  Branches      401      530     +129     
==========================================
+ Hits         6591     8854    +2263     
- Misses         30      239     +209     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tulup-conner
Copy link
Collaborator

I understand the practical appeal, but this functionality isn't available in the upstream library at flowbite.com, so I'm not sure if we should add it here.

@zoltanszogyenyi I defer to you on this one - it seems like this would be a useful feature, and it's also pretty difficult to create a wrapper of our component to achieve this. You would probably be forced to patch flowbite-react to do so.

@DavidSeptimus-Klotho
Copy link
Author

It looks like the upstream has support for trigger="none" and exposes show(), hide(), and toggle() functions for custom triggers. It just seems kind of wasteful to have to reimplement delay when it's supported by the underlying floating-ui implementation.

@SutuSebastian
Copy link
Collaborator

Nice one! It only needs re-build since we now have new monorepo structure (see #1264).

If u feel like u don't have the time, I can take it from here, just let me know! 🤝

@DavidSeptimus-Klotho
Copy link
Author

@SutuSebastian I doubt I'll have time for this in the near-term. Feel free to pick it up if you'd like.

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.

3 participants