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

Don't automatically choose between popover / tooltip #3

Closed
nandorojo opened this issue Feb 17, 2023 · 4 comments · Fixed by #6
Closed

Don't automatically choose between popover / tooltip #3

nandorojo opened this issue Feb 17, 2023 · 4 comments · Fixed by #6

Comments

@nandorojo
Copy link

The current implementation breaks SSR hydration since it conditionally toggles tooltip vs popover based on the web device. Instead, it should be a flag to prevent hydration mismatches. This would also let users wrap buttons with tooltips without interrupting touches on mobile browsers. I think it could be a prop.

@alantoa
Copy link
Owner

alantoa commented Feb 17, 2023

yeah, that makes sense, I also don't want to use automatically choose between Popover / Tooltip.
I thought of just using the one of Tooltip components to toggle it on mobile, but I feel it's a little bit hack.
I have created an example on the mobile web before, do you mean something just like this?

@nandorojo
Copy link
Author

I think one good solution could be to pass popover as a prop for it to use on mobile Web

@nandorojo
Copy link
Author

If that prop is true, maybe it renders differently after a render in a layout effect…

@alantoa
Copy link
Owner

alantoa commented Feb 17, 2023

yeah, that's a good solution for now! I'll go to try it.

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 a pull request may close this issue.

2 participants