feat: Split tooltip for adjacent traces in two#104150
Conversation
| } | ||
| )} | ||
| > | ||
| <div> |
There was a problem hiding this comment.
nit: Is this div needed, or would a Fragment be an alright replacement here?
There was a problem hiding this comment.
Great question. The div, or any other element is needed since the ButtonBar is centered by default (and the parent container is a little higher).
There are two solutions:
- Either wrap it inside a
div(or any other element) - Or update the style of
ButtonBarand use aStyledButtonBarfor this component. And "undo" thealign-items: center
I went for the first, since there is a Omit<..., 'className'> on the ButtonBar - which is maybe there for a reason.
There was a problem hiding this comment.
Hrrm, alrighty sounds all good to leave as is to me 👍
| size="xs" | ||
| icon={<IconChevron direction={iconDirection} />} | ||
| aria-label={ariaLabel} | ||
| tooltipProps={tooltipProps} |
There was a problem hiding this comment.
l (feel free to ignore): Should we inline the toolTipProps here and just adjust message based on direction? based from what I can tell the other props are the same in both cases.
There was a problem hiding this comment.
totally right. I like that actually more - since it reduces a lot of duplication 🤤. I'll update real quick
1330cc7 to
f2236aa
Compare
The adjacent traces did have one tooltip for both buttons. To increase UX, they were split now into two: