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

Update Tooltip.vue #97

Open
wants to merge 5 commits into
base: v3
Choose a base branch
from

Conversation

RytisTarasevicius
Copy link

Added option to set tooltip label with clickable html elements, added delay

Added option to set tooltip label with clickable html elements, added delay
},
delay: {
type: Number,
default: 0,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say to go with the default 300ms, as in Atlassian Design System, but I see the props of this component don't actually match the ADS 🤷‍♂️ so imo go with whatever you want.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should change the default behaviour

@mouseleave="onMouseLeave">
<slot name="label"></slot>
</span>
<span v-if=label ref="label" class="label no-click" :disabled="disabled">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two tooltips, one being empty.

On Storybook (http://localhost:9001/?path=/story/tooltip--tooltip):
image
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
this.mouseEntered = true;
setTimeout(() => {
if (!this.mouseEntered) return;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a problem only for bigger delays so maybe we can ignore it.
You can for example for 5s delay:

  1. hover over the button
  2. wait 1s
  3. hover away
  4. wait 3s
  5. hover back on
  6. wait 1s
    Result: tooltip opens up after 1s from hovering on.
    You can get similar effects for closing the tooltip.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@szknopp
Copy link

szknopp commented Jun 21, 2024

New story in Storybook with the delay on tooltip would be nice.

@RytisTarasevicius
Copy link
Author

New story in Storybook with the delay on tooltip would be nice.

Added story to Storybook

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.

None yet

3 participants