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): tooltip follow the trigger/anchor #244

Closed

Conversation

pawel-twardziak
Copy link
Contributor

@pawel-twardziak pawel-twardziak commented Dec 31, 2024

No description provided.

@pawel-twardziak pawel-twardziak self-assigned this Dec 31, 2024
@pawel-twardziak pawel-twardziak linked an issue Dec 31, 2024 that may be closed by this pull request
Copy link

vercel bot commented Dec 31, 2024

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

Name Status Preview Comments Updated (UTC)
blocks-showcase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 4:58pm
primitives ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 4:58pm
radix-astro-doc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 4:58pm
shadcn-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 4:58pm
taxonomy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 4:58pm

@pimenovoleg
Copy link
Contributor

pimenovoleg commented Jan 1, 2025

This is an interesting solution!

I think we should consider providing an out-of-the-box approach so that using the component doesn't require adding extra logic.

For example, here:
https://github.com/Rikarin/xui/blob/master/libs/xui/src/tooltip/tooltip.directive.ts#L34
https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts#L460

By using ComponentPortal, we achieve a behavior where the tooltip follows the trigger.

This approach could simplify usage and improve the developer experience. What do you think?

@pawel-twardziak
Copy link
Contributor Author

This is an interesting solution!

I think we should consider providing an out-of-the-box approach so that using the component doesn't require adding extra logic.

For example, here: https://github.com/Rikarin/xui/blob/master/libs/xui/src/tooltip/tooltip.directive.ts#L34 https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts#L460

By using ComponentPortal, we achieve a behavior where the tooltip follows the trigger.

This approach could simplify usage and improve the developer experience. What do you think?

yes @pimenovoleg great point! That coould be a good way, I will try the portal as I've never done it befre :)

@pawel-twardziak
Copy link
Contributor Author

pawel-twardziak commented Jan 1, 2025

@pimenovoleg can we go with this simple solution so far? I've investigated a bit the portal and I might need to apply a small redesing to tooltip , popover and hover-card. But that would be easier for me if I had the common parts extracted following that #241 - so that I can aplly to and test all of the pop-ups we have.

Thus my proposal is:

@pimenovoleg
Copy link
Contributor

@pimenovoleg can we go with this simple solution so far? I've investigated a bit the portal and I might need to apply a small redesing to tooltip , popover and hover-card. But that would be easier for me if I had the common parts extracted following that #241 - so that I can aplly to and test all of the pop-ups we have.

Thus my proposal is:

Great to see you've figured out Portal! In that case, I think it's better not to confuse users and postpone this PR.

Let's implement it right (better) away using Portal. 👍

@pawel-twardziak
Copy link
Contributor Author

Great :) so let's keep the issue #243 open, I will work back on than soon and now I am closing this PR without merging @pimenovoleg 👍

@pawel-twardziak
Copy link
Contributor Author

Closed with no merge - Portal will be implemented as a solution for #243 on another branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type: primitives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants