-
Notifications
You must be signed in to change notification settings - Fork 1
feat: components tooltip and popover. absolute positioning (dt 40) #194
feat: components tooltip and popover. absolute positioning (dt 40) #194
Conversation
* DT 40 Absolute positioning for popovers & tooltips * updates * updates * update tooltip * update tooltip * clean up * refactoring, clean up * resolve comments * resolve comments refactor first iteration stories * update comments
* add documentation for Tippy tooltip * update reactive "show" * resolve comments, update eslint config because of an error * update esplint json
* add documentation for Tippy tooltip * update reactive "show" * update tests * update tests * resolve comments * resolve comments
* DT 40 Absolute positioning for popovers & tooltips * updates * updates * update tooltip * update tooltip * clean up * refactoring, clean up * resolve comments * popover implementation, decomposition tippy, clean up * add animation, clean up * clean up popover * clean tooltip folder * add import * clean up, updates * DT-40 popover component, refactoring after tooltip implementation * resolve comments * clean up * resolve comments * fix eslint * leftover after merge * leftover after merge
Update components DtLazyShow, popover, tooltip;
there're some updates after merge implementation PRs to the branch:
Could you please confirm now that previous popover and tooltip implementation should be completely removed now? |
components/popover/popover.vue
Outdated
<div | ||
v-if="open && modal" | ||
class="d-modal" | ||
aria-hidden="false" |
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.
usage d-modal
will not show overlay with aria-hidden="true"
. is it need to update dialtone with some styles for popover with modal
prop?
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.
Discussed on slack, we decided to create a new class specifically for popover modal
โฆ-positioning # Conflicts: # components/popover/popover.stories.js # components/popover/popover_default.story.vue
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 made a bunch of adjustments to our storybook prop/slot organization recently, which of course was not included in this tooltip since it was not in staging. Most of my comments are related to this.
components/popover/popover.vue
Outdated
<div | ||
v-if="open && modal" | ||
class="d-modal" | ||
aria-hidden="false" |
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.
Discussed on slack, we decided to create a new class specifically for popover modal
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.
Looks good, just a couple small things
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.
Thanks!
โฆ-absolute-positioning' into components-Tooltip-Popover-DT-40-absolute-positioning
โฆ-positioning # Conflicts: # package-lock.json
add new constant to popover update default story
# [1.6.0](v1.5.0...v1.6.0) (2021-11-25) ### Bug Fixes * add our alpha sort to list-item. Change slot types to VNode for consistiency ([#202](#202)) ([686b2b9](686b2b9)) ### Features * components tooltip and popover. absolute positioning (dt 40) ([#194](#194)) ([dd9e44d](dd9e44d)), closes [#131](#131) [#177](#177) [#178](#178) [#135](#135)
๐ This PR is included in version 1.6.0 ๐ The release is available on GitHub release Your semantic-release bot ๐ฆ๐ |
class="d-ps-relative dt-popover" | ||
> | ||
<component :is="elementType"> | ||
<dt-lazy-show |
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.
@braddialpad @nikitadialpad couple suggestions from testing this with the emoji popover in the feed list (which was one of the drivers for doing this):
- The popover overlay should be at the end of the DOM as well, as a sibling of the popover itself. This way it properly overlays the content (see video example, where the feed actions disappear on hover and take the overlay with it)
- The overlay should have the option of being transparent. Arguably, this should be the default (every popover has a "transparent" overlay preventing you from interacting with the page behind it). In the case of the feed list, this is so you can't scroll the feed while the popover is open.
components tooltip and popover. absolute positioning using tippy js (dt 40)
๐ ๏ธ Type Of Change
๐ Description
The PR contains implementation of a tooltip using tippy headless,
dialtone
style anddialtone-vue
components.This implementation covers such drawbacks like rendering tooltip at the end of the body, dynamic positioning/"flipping" feature for tooltip and popover, hide on escape,
modal
prop was added to popover component interface.As was investigated and discussed
tippy headless
is chosen as popover and tooltip engine library, because of thatv-click-outside
is removed, that part now covers by tippy.๐ Checklist
๐ฎ Next Steps
๐ท Screenshots / GIFs