You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix tooltip positioning when containerPadding is set (#6577)
* Fix missing divider in Toast
* Rough fix for tooltip positioning
testing against chromatic, ideally calling updatePosition multiple times shouldnt break the positiong though...
* alternative fix without relying on initial render
* simplify fix for now
<Tooltip>Long tooltip message that just goes on and on again. But it just keeps going and going and going and going.</Tooltip>
79
79
]
80
80
},
81
-
// padding is 231 so that it flips, this is because the tooltip has a width of 180px with the tip + 3px margin on the tooltip + 50px of container padding from this story
82
-
// anything less than 232px padding on the div will result in a flip, so this is how we can visually test container padding
83
-
// this uses slightly less than the required padding so that we account for any rounding and have a stable test
81
+
82
+
// Padding is 223 + 8px from the story margin itself = 231px of space from edge to button.
83
+
// Size that the tooltip takes is 180 (tooltip width) + 3 (margin on overlay) + 50 (container padding) - 1 (offset applied via tooltiptrigger) = 232px
84
+
// Note the above size that is calculated is slightly off, will need to update calculatePosition
0 commit comments