-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: v3
Are you sure you want to change the base?
Conversation
Added option to set tooltip label with clickable html elements, added delay
}, | ||
delay: { | ||
type: Number, | ||
default: 0, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/components/Tooltip/Tooltip.vue
Outdated
} | ||
this.mouseEntered = true; | ||
setTimeout(() => { | ||
if (!this.mouseEntered) return; |
There was a problem hiding this comment.
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:
- hover over the button
- wait 1s
- hover away
- wait 3s
- hover back on
- wait 1s
Result: tooltip opens up after 1s from hovering on.
You can get similar effects for closing the tooltip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
New story in Storybook with the delay on tooltip would be nice. |
Added story to Storybook |
Added option to set tooltip label with clickable html elements, added delay