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] Complete API #231
Conversation
* [Accordion]feat: 2/3 * Added useSingleOrMultipleValue * [Accordion]fix: Check if item is disabled onClick * [useSingleOrMultipleValue] fix: use defaultValue from props * [AccordionStory] fix: Use collapsible for single type * [Accordion] fix: Remove unnecessary type in inject
* fix avatar rendering issue * add nuxt playground to demo ssr * fix requestAnimationFrame throwing error * fix element selected even though undefined * fix navigation menu not updating position for indicator correctly
…nnecessary question mark (#237)
* Fix : Alert Dialog handle click outside * Fix : remove event handler
<slot /> | ||
<ScreenReaderOnly :id="injectedValue?.contentId" :ariaLabel="ariaLabel" /> |
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.
We already have VisuallyHidden
component, I think it's the same as this.
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.
Just updated the code, I had to update VisuallyHidden
component with a new slot.
In NavigationMenuTrigger
, we have the following code:
<template v-if="open">
<VisuallyHidden
aria-hidden
:tabIndex="0"
:ref="setFocusProxyRef"
@focus="handleVisuallyHiddenFocus"
>
</VisuallyHidden>
<span :aria-owns="contentId" v-if="context?.viewport"></span>
</template>
But I don't fully understand this code. I would appreciate any feedback of my current implementation, which imitates Radix implementation.
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.
lgtm!
* [Tooltip] feat: Added props to TooltipArrow * useHoverDelay accept callbacks and options * Updated useHover * Updated PopperContent * [Tooltip] Finished API * [Accordion]feat: 2/3 (radix-vue#211) * [Accordion]feat: 2/3 * Added useSingleOrMultipleValue * [Accordion]fix: Check if item is disabled onClick * [useSingleOrMultipleValue] fix: use defaultValue from props * [AccordionStory] fix: Use collapsible for single type * [Accordion] fix: Remove unnecessary type in inject * [Bug] ssg/ssr not rendering correctly (radix-vue#233) * fix avatar rendering issue * add nuxt playground to demo ssr * fix requestAnimationFrame throwing error * fix element selected even though undefined * fix navigation menu not updating position for indicator correctly * chore: release v0.1.10 * [Tooltip]fix : tooltip open on keyboard focus (radix-vue#238) * [Tooltip]fix: bind props values to data-side and data-align, remove unnecessary question mark (radix-vue#237) * [Alert Dialog]fix : Alert Dialog handle click outside (radix-vue#236) * Fix : Alert Dialog handle click outside * Fix : remove event handler * chore: release 0.1.11 * [Tooltip] feat: Removed TooltipPortal in favor of Teleport * [Tooltip] feat: Use flg disable on hover * Tooltip: Define emits event in TooltipContent * Tooltip: Create stories folder * Tooltip: Fixed content story * Revert HoverCard changes * Use VisuallyHidden component * run lint * fix triggerElement missing, test some story props --------- Co-authored-by: zernonia <59365435+zernonia@users.noreply.github.com> Co-authored-by: khairulhaaziq <rhycoz@yahoo.com> Co-authored-by: Misbah Ansori <misbah.ansori24@gmail.com> Co-authored-by: Artem Melnyk <51422045+MellKam@users.noreply.github.com> Co-authored-by: zernonia <zernonia@gmail.com>
Description
Complete the Tooltip API.
Relevant changes:
Tooltip*
components with commentsScreenReaderOnly
componentuseHoverDelay
->useHover
TooltipPortal
in favor ofTeleport
PopperContentProps
onEscapeKeyDown
andonPointerDownOutside
callback functions as props inTooltipContent
. I think we decided that we instead we would emit events.Regarding @Focus
At some point I think we have to update the Tooltip focus event. We don't really want to open it for every event, just for events triggered by keyboard.
I opened this vueuse/vueuse#3254 so we can use that composable or we just copy and paste that function into our project, as we want.
In Radix, for example, they just check if the event was triggered by a PointerDown, see Radix Code
Related Issue
#149
Motivation and Context
How Has This Been Tested?
Visually and I created some stories. Not sure how to do propper stories, that's why I did the minimum to test the props
Screenshots (if appropriate):