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

Tooltip Directive: Programatically control tooltips individually and as a group to show/hide #6943

Open
redfox05 opened this issue Dec 9, 2024 · 2 comments
Labels
Resolution: Needs Upvote 👍 Support this idea or feature by adding an upvote. Community feedback helps with prioritization.

Comments

@redfox05
Copy link

redfox05 commented Dec 9, 2024

Describe the bug

A few issues:

  1. Using the Tooltip directive, it does not allow you to how hide it programmatically. The show/hide functions exist within the component, but are not exposed higher up to allow use.
  2. When the tooltip is triggered, if the tooltip is already showing on the component, it will generate a tooltip in the top left of the screen, and then does not go away.
  3. If the tooltip is showing, and the user changes tabs or views, the tooltip still remains.

Sadly it seems above issues are side effects from a workaround we have had to do to show/hide the tooltips. Using mouseenter/mouseleave events triggered on the related form field components.
The reason this is needed is because when form elements trigger validation issues, we show a tooltip on the error fields, and they have to display once the validation is triggered.

If you can suggest a better way to do this, please let me know.

Or if you can point me to your developer guidelines on how to extend your components, I will happily look into this and create a PR to submit. I have tried to look into the sourcecode but without documentation on how you do your dev, its taking a long time to figure out.

Reproducer

n/a

PrimeVue version

latest

Vue version

4.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@redfox05 redfox05 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 9, 2024
@redfox05 redfox05 changed the title Tooltip Directive: A few issues Tooltip Directive: Programatically control tooltips individually and as a group to show/hide Dec 9, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Needs Upvote 👍 Support this idea or feature by adding an upvote. Community feedback helps with prioritization. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 10, 2024
Copy link

Thanks a lot for this issue! PrimeVue team's roadmap is busy, but community feedback is crucial in prioritization. The more upvotes help ensure this fix can be addressed quickly or the related PR can be merged soon.

@fkdp06
Copy link

fkdp06 commented Dec 13, 2024

I have looked at the tooltip and I have one small issue, which I assume could be related to this topic.

Having hints as icons like that:

<fa-icon icon="fa-solid fa-circle-info" v-tooltip="'This is a hint.'"></fa-icon>

image

On mobile I would like to show tooltip on icon click (touch) as there is no mouse hover.
Is it possible?
So far I have tested the page on mobile and it is not working.
Is there any function I can use to show the tooltip?

For example:

<fa-icon icon="fa-solid fa-circle-info" v-tooltip="'This is a hint.'" @click="$tooltip.show()"></fa-icon>

or (similar to focus)

<fa-icon icon="fa-solid fa-circle-info" v-tooltip.click.top="'This is a hint.'"></fa-icon>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Needs Upvote 👍 Support this idea or feature by adding an upvote. Community feedback helps with prioritization.
Projects
None yet
Development

No branches or pull requests

3 participants