-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(tooltip): DLT-1757 round button alignment #314
Conversation
@francisrupert the shape of the arrow changed slightly since it's now just using the built in tippy arrow. Should we make a custom SVG to make it look like the previously used arrow? For reference this is the svg for the default tippy arrow.
|
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
@import 'tippy.js/dist/svg-arrow.css'; | ||
|
||
.tippy-box[data-popper-reference-hidden] { | ||
.d-tooltip { | ||
visibility: hidden; | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.tippy-box > .tippy-svg-arrow { | ||
fill: var(--dt-color-surface-contrast); | ||
} | ||
|
||
.tippy-box[data-animation='fade'][data-state='hidden'] { | ||
opacity: 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.
Could we move this to dialpad css?, since this is not an scoped style, we will be importing @import 'tippy.js/dist/svg-arrow.css';
globally when this component is being initialized.
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.
The problem is tippy.js is not a dependency of dialtone-css, so it won't be able to import it. Scoping it also won't work because the tooltip renders outside of the component at the document body. I think it's probably okay just to leave global 🤷
Seems like there is some issues in the test.
This one seems like it is not necessary anymore since we are not handling the classes anymore. Then there is some issues related to |
✔️ Deploy previews ready! |
1 similar comment
✔️ Deploy previews ready! |
✔️ Deploy previews 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.
Cool and useful improvement, thanks.
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
Fixed svg shape, merging. |
🎉 This PR is included in version 9.36.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [8.31.2](dialtone-css/v8.31.1...dialtone-css/v8.31.2) (2024-05-16) ### Bug Fixes * **Tooltip:** DLT-1757 round button alignment ([#314](#314)) ([eabd110](eabd110))
🎉 This PR is included in version 8.31.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.132.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.125.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
fix(tooltip): round button alignment
Obligatory GIF (super important!)
🛠️ Type Of Change
These types will increment the version number on release:
📖 Jira Ticket
📖 Description
💡 Context
Noticed this issue in my prior PR #311
The tooltip arrow was not rendering correctly on circle buttons because we were using custom css from who knows how long ago, and it was rendering the arrow in a fixed position. Tippy renders it's arrow dynamically to be in the center so I changed it to that instead. In order to do this I had to get rid of our custom override of the tippy render function, which seemed to have no real purpose, and it disabled a ton of default tippy functionality and options that we could have been taking advantage of.
There are a ton of other things we can improve in this component and the popover one now, but I'm trying to keep the scope of this somewhat reasonable.
BEFORE
AFTER
📝 Checklist
For all PRs:
For all Vue changes:
./scripts/dialtone-vue-sync.sh
script. Read docs here: Dialtone Vue Sync ScriptFor all CSS changes:
🔮 Next Steps
check usage of offset in product.
📷 Screenshots / GIFs
See Context
🔗 Sources
https://atomiks.github.io/tippyjs/v6/all-props