-
Notifications
You must be signed in to change notification settings - Fork 96
fix(tooltips): renders correct arrow dimensions based on tooltip size #1882
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
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.
Arrows for both Menu
and legacy Menu
are appearing too large compared to v8.
const SIZE = ['2px', '4px', '6px', '8px', '10px', '1em']; | ||
|
||
SIZE.forEach(size => { | ||
console.log('size:', size); |
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.
Remove console.log
. Please check eslint config – no-console should be getting flagged for spec
files.
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.
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.
🙌
Description
This PR refines the
arrowStyles
logic to output deterministic arrow dimensions.Detail
inset
size
argumentFor this example,
ArrowStylesStory
was modified to display a box-shadow matching the arrowsize
input.This preview shows the impact of changing the
size
andinset
inputs. The arrow was recolored to better show its dimensions.Notice that the tip of the arrow ends where the drop shadow ends.
As a result, tooltip arrow rendered sizes match with V8:
Arrows checklist
Tooltips
correctlyLegacy Menu
correctlyMenu
correctlyChecklist
👌 design updates will be Garden Designer approved (add the designer as a reviewer)npm start
)⬅️ renders as expected with reversed (RTL) direction🤘 renders as expected with Bedrock CSS (?bedrock
)♿ tested for WCAG 2.1 AA accessibility compliance