-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
4db1320
to
d142bd1
Compare
✔️ Deploy Preview ready! |
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.
✔️ Deploy Preview ready! |
7ad2e97
to
ff912bb
Compare
✔️ Deploy Preview ready! |
ff912bb
to
9ae6ea1
Compare
recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue
Show resolved
Hide resolved
✔️ Deploy Preview ready! |
9ae6ea1
to
3288cb9
Compare
✔️ Deploy Preview ready! |
<dt-recipe-callbar-button> | ||
No tooltip | ||
<template #icon> | ||
<icon-dialpad-glyph /> | ||
</template> | ||
</dt-recipe-callbar-button> |
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.
New button look and states for the redesigned call bar buttons from the call workflow revamp project
2d94ea7
to
1316569
Compare
✔️ Deploy Preview ready! |
1316569
to
dbfff30
Compare
✔️ Deploy Preview ready! |
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.
w/ one comment, good work!
defaultSlotIsEmpty () { | ||
const defaultSlotContents = this.$slots?.default(); | ||
const slotItemCount = defaultSlotContents?.length; | ||
|
||
const slotIsEmpty = slotItemCount === 1 && | ||
(defaultSlotContents[0].type.toString() === 'Symbol(Comment)' || | ||
( | ||
defaultSlotContents[0].type.toString() === 'Symbol(Fragment)' && | ||
defaultSlotContents[0].children.length === 0) | ||
); | ||
|
||
return !slotItemCount || slotIsEmpty; | ||
}, |
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'm not sure we need this rigorous validation. Maybe leaving this as in the vue 2 implementation (validate that something has been passed to the slot) is enough?
defaultSlotIsEmpty () {
const defaultSlotContents = this.$slots?.default();
const slotItemCount = defaultSlotContents?.length;
return !slotItemCount;
},
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.
It does not work as straightforward as in vue2. default() returns a list of nodes, and if, for example, you pass an empty <slot>
or a <template v-if="...">
it will still return a component (empty fragment or comment).
I tried several use cases and this is the one that worked for all of them (I don't say I tested all usecases though, maybe I missed something).
Tested the proposed solution, as well as the inherited vue2 implementation, and it does not work.
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.
Yeah I was trying to get a simpler solution but it seems that how you did is the simpler one 👍
.d-tab--selected::after, .d-tab--selected:hover::after { | ||
--tab--bgc: var(--black-900); | ||
} |
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.
Guessing this is the issue
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.
Ohh sorry! I missed some vue basics here. Forgot this is not encapsulated. Will add more specificity.
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.
@matiasg-dialpad Hm we need to apply the same fix for the vue2 version.
Wondering in which cases we want to use these classes (.tab-group
, .tab-content
) and the override in the .d-tab--selected
as there aren't usages in the stories and in the design there aren't examples using the tab component?
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.
Approved since your last change fixed the visual regression, but yeah I'm also curious why we are using tab classes here.
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.
Ibased on this one, check the popover section
but there has been some changes in the code, let me chef if those classes are still needed
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 think we can just remove those tab color styles. Since any content could go in the slots for this component I don't think it makes sense for this component to dictate tab color.
What I can do though is add a "muted" styling option to the tab component, I think that's what we're looking for here.
✔️ Deploy Preview ready! |
@braddialpad @josedialpad ready for another review! (hope this is the last one... 😬) |
Merging this in because someone needs to use it |
* feat: DP-46328 call bar buttons New button look and states for the redesigned call bar buttons from the call workflow revamp project * Added callbar-button-with-popover component. Cleaned up some of the callbar-button. * Migrated to Vue3 and fixed tests * Changed event handling in the component to keep up with Vue3 best practices * Fix tooltip to not show when there's no content. Fix round callbar buttons * Add more specificity to the css selectors Co-authored-by: Felipe Gomes <[email protected]>
* feat: DP-46328 call bar buttons New button look and states for the redesigned call bar buttons from the call workflow revamp project * Added callbar-button-with-popover component. Cleaned up some of the callbar-button. * Migrated to Vue3 and fixed tests * Changed event handling in the component to keep up with Vue3 best practices * Fix tooltip to not show when there's no content. Fix round callbar buttons * Add more specificity to the css selectors Co-authored-by: Felipe Gomes <[email protected]> Co-authored-by: Matias Gea <[email protected]> Co-authored-by: Felipe Gomes <[email protected]>
# [3.19.0](v3.18.0...v3.19.0) (2022-10-11) ### Bug Fixes * dt-631 remove primary-color from dialtone vue ([#520](#520)) ([6f58dcf](6f58dcf)) * update dialtone peer dependency ([c9f53ef](c9f53ef)) ### Features * (card) vue-3 ([#494](#494)) ([#500](#500)) ([82a5d18](82a5d18)) * dp-46328 callbar buttons Vue3 ([#471](#471)) ([#521](#521)) ([39d9f62](39d9f62)) * dp-57068 Adding independent control for showing the arrow ([#523](#523)) ([104bf0f](104bf0f)) * dp-57068 Adding independent control for showing the arrow ([#524](#524)) ([66c082b](66c082b)) * dp-57757 add `buttonClass` prop to Call Bar Button component (Vue3) ([#538](#538)) ([b36e5c6](b36e5c6)) * dp-57757 add `buttonClass` prop to Call Bar Button component (Vue3) ([#538](#538)) ([#542](#542)) ([d512461](d512461)) * dt-recipe-ivr-node vue3 ([#515](#515)) ([#517](#517)) ([cc56623](cc56623)) * migrate to dialtone 7 ([#507](#507)) ([ab00cd2](ab00cd2)), closes [#504](#504) [#511](#511) [#509](#509) * migration to dialtone 7 - vue3 ([#440](#440)) ([acdf7e9](acdf7e9)) * **popover:** add sr-only close button - vue3 ([#540](#540)) ([5177cdd](5177cdd)) * **popover:** add sr-only close button - vue3 ([#540](#540)) ([#544](#544)) ([7519248](7519248))
PR Title
VUE3 PR for this Vue2 PR: #436
🛠️ Type Of Change
📖 Description
💡 Context
📝 Checklist
🔮 Next Steps
📷 Screenshots / GIFs
🔗 Sources