-
Notifications
You must be signed in to change notification settings - Fork 246
fix: Add RTL icon support to ExternalHyperlink component in v13 #3694
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
base: support
Are you sure you want to change the base?
fix: Add RTL icon support to ExternalHyperlink component in v13 #3694
Conversation
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
aislinn/external-hyperlink-icons
|
| Run status |
|
| Run duration | 09m 13s |
| Commit |
|
| Committer | Aislinn Hayes |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
1
|
|
|
21
|
|
|
0
|
|
|
936
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
20.54%
|
|
|---|---|
|
|
1441
|
|
|
370
|
Accessibility
99.28%
|
|
|---|---|
|
|
6 critical
5 serious
0 moderate
2 minor
|
|
|
98
|
| export const ExternalLinkRTL = () => ( | ||
| <CanvasProvider theme={{canvas: {direction: ContentDirection.RTL}}}> | ||
| <ExternalHyperlink href="https://workday.com" iconLabel="Opens link in new window" shouldMirror> | ||
| השועל החום המהיר קופץ מעל הכלב העצל |
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.
Might be worth getting a Hebrew expert to validate this one but according to google it's an almost direct translation of "The quick brown fox jumps over the lazy dog" 😂
|
Ah i think the nvmrc is lying to you, we recently updated things to 22.x apologies |
| * If set to `true`, transform the SVG's x-axis to mirror the graphic. | ||
| * @default false | ||
| */ | ||
| shouldMirror?: boolean; |
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.
instead of adding a new prop, I think we can just update the style object below to add:
':dir(rtl)': {
transform: 'rotate(270deg)',
},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.
d'oh - i swear i did try this originally but turns out I just put it in the wrong place! 😂 thank you, much better!
Summary
Fixes: #3693
While this issue is fixed in v14, ideally we would have a fix for it in v13 too for teams that are still transitioning!
Release Category
Components
Checklist
ready for reviewhas been added to PRFor the Reviewer
Where Should the Reviewer Start?
modules/react/button/lib/ExternalHyperlink.tsxis the entry point!Areas for Feedback? (optional)
Testing Manually
I'm having trouble even getting the
supportbranch working locally - when I'm definitely on the node version in the nvmrc and runyarn, I see this error (usednpm install -g yarn):Do other folks see that?
In any case, I got around it and got storybook running (had to do
yarn cleanto shake off a few cobwebs) and the icon is flipped now.Screenshots or GIFs (if applicable)
Thank You Gif (optional)