-
Notifications
You must be signed in to change notification settings - Fork 273
feat(framework): make icons RTL aware #1833
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
@@ -14,9 +14,9 @@ const calcKey = (name, collection) => { | |||
return `${collection}:${name}`; | |||
}; | |||
|
|||
const registerIcon = (name, { pathData, accData, collection } = {}) => { | |||
const registerIcon = (name, { pathData, ltr, accData, collection } = {}) => { // eslint-disable-line |
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.
Why is the eslint ignore?
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.
I am getting these (although I am adding one additional key):
17:29 error Expected a line break after this opening brace object-curly-newline
17:66 error Expected a line break before this closing brace object-curly-newline
Currently all icons are mirrored in RTL, but some of the icons should not be mirrored in RTL. The best example is the "accept" icon (checkmark) which does not make sense when mirrored. Now we keep info as "ltr" field in the SAP-Icons.json, which means an icon should remain as it is in RTL, or in other words it is always LTR. We can call the field differently in the SVGRegistry if we want - suppressMirroring, noMirror. I named it "ltr" everywhere for now.
FIXES: #1831