-
Notifications
You must be signed in to change notification settings - Fork 97
fix(tooltips): fix arrow position when using end-bottom
placement
#1902
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
Conversation
end-bottom
placementend-bottom
placement
arrowSize = margin; | ||
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) { | ||
arrowShift = '-4px'; | ||
} |
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.
arrowSize = margin; | |
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) { | |
arrowShift = '-4px'; | |
} | |
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) { | |
arrowShift = '-4px'; | |
} else { | |
arrowShift = margin; | |
} |
[nit] prefer clarifying assignment
if (size === 'small') { | ||
arrowSize = margin; | ||
if (['left-start', 'left-end', 'right-start', 'right-end'].includes(placement)) { | ||
arrowShift = '-4px'; |
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.
Would it be better to tie this to the theme with
arrowShift = `-${theme.borderRadii.md}`;
to better indicate the shifting rationale and respond to theming customizations that knock out the borders?
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.
Nice!
Description
Fixes a regression created in #1882
Detail
defaultInset
to better render on retina and regular monitorsFor example:
The arrow of a small tooltip using
end-bottom
placement will extend past the container's boundaries because of the border-radiusBefore
After
Checklist
npm start
)⚫ renders as expected in dark mode?bedrock
)~~