-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat(aside): add optional tooltip on header #1015
Conversation
if(!search || !using(search)) { | ||
if(title) { | ||
@class = klass('ts-toolbar-title', null, !hasactions); | ||
<li id="${id}-title" @class> | ||
<label>${title}</label> | ||
if(tooltip) { | ||
<label data-ts="Tooltip" data-ts.title="${tooltip}" data-ts.offset="true">${title}</label> |
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.
Maybe consider adding data-ts.position="bottom"
for a cleaner look
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.
Not sure if I understand. The position of the tooltip is based on coordinates (x, y)
, link to implementation here:
tradeshift-ui/src/runtime/js/ts.ui/core/[email protected]/spirits/tooltip/ts.ui.TooltipSpirit.js
Line 55 in f7a30e0
var x = parseInt(this.left); |
left
and top
so it aligns to "bottom", documentation for tooltip here: https://ui.tradeshift.com/v12/#components/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.
@nguyenlam123 I mean to add this position
param https://tradeshift.github.io/elements/?path=/story/ts-tooltip--default
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.
Different repo 🤔 ? IIRC, this tooltip https://ui.tradeshift.com/v12/#components/tooltip doesn't support position.
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 didn't think that they were that different, as features
data-ts.tooltip
property, for example:, provided that the user has previously added an aside component with the id called
myAside
.Tooltip appearance can be displayed in the gif below