-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(item): RTL fix for item #11329
fix(item): RTL fix for item #11329
Conversation
RTL fix (scss changes) for list-header for wp, ios and android platform
RTL fix (scss changes) for item including item-detail-push, item, item-devider, icons avatars and thumbnails on items and item-inner fix for wp, ios and android platform
src/components/item/item.ios.scss
Outdated
@@ -210,6 +238,14 @@ $item-ios-sliding-content-background: $list-ios-background-color !default; | |||
background-position: right ($item-ios-padding-right - 2) center; | |||
background-size: 14px 14px; | |||
} | |||
[dir="rtl"] .item-ios[detail-push] .item-inner, |
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.
Missing line break
src/components/item/item.md.scss
Outdated
@@ -135,6 +148,14 @@ $item-md-sliding-content-background: $list-md-background-color !default; | |||
background-position: right ($item-md-padding-right - 2) center; | |||
background-size: 14px 14px; | |||
} | |||
[dir="rtl"] .item-md[detail-push] .item-inner, |
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.
Missing line break
src/components/item/item.wp.scss
Outdated
@@ -140,6 +148,14 @@ $item-wp-sliding-content-background: $list-wp-background-color !default; | |||
background-position: right ($item-wp-padding-right - 2) center; | |||
background-size: 14px 14px; | |||
} | |||
[dir="rtl"] .item-wp[detail-push] .item-inner, |
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.
Missing line break
Add missing line breaks
Add missing padding left on RTL
src/components/item/item.md.scss
Outdated
[dir="rtl"] a.item-md:not([detail-none]) .item-inner { | ||
@include svg-background-image($item-md-detail-push-svg-rtl); | ||
padding-right: 0; | ||
padding-left: 32px; |
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.
Can you store 32px
in a variable?
Everything else looks great to me
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.
@AmitMY I can but every other variable has been stored in theme, should I add a variable in theme and modify themes too? or else where?
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 think in the theme file you need to have a variable:
'$x = 32px'
And then it should be in every file (iOS, md, wp) at the top, near all of the other variables, like:
'$x-ios = $x'
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.
*And the name should be 'item-detail-push-padding-end'
Per platform - 'item-{plt}-detail-push-padding-end'
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.
Well ... for now I've just added a variable at the top of the file like padding for divider, I've also name it right instead of end as everything else is right but I agree with you right should be end and left should be start, but this thing should change globally, am I right?
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.
You are end
:)
Yes, should change all in a batch replace, but can only do that for version 4, otherwise need to support the old variables as well which is annoying.
Add a new variable and put 32px padding for the detail arrow
This reverts commit 01ff51f.
Add a new variable and put 32px padding for the detail arrow
@manucorporat Anything to add? this looks done |
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.
This looks like a big change in the css, needs review from @brandyscarney
src/components/item/item.ios.scss
Outdated
@@ -33,6 +33,12 @@ $item-ios-detail-push-color: $list-ios-border-color !default; | |||
/// @prop - Icon for the detail arrow | |||
$item-ios-detail-push-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-ios-detail-push-color}'/></svg>" !default; | |||
|
|||
/// @prop - Icon for the detail arrow RTL | |||
$item-ios-detail-push-svg-rtl: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M10,20l2-2l-8-8L8-8l-2-2l-10,10L10,10z' fill='#{$item-ios-detail-push-color}'/></svg>" !default; |
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.
wonder if we can use transform
here?
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.
Yes we can, but it will be hackish ... using svg is much cleaner, I'm making another commit with transform, let me know
src/components/item/item.ios.scss
Outdated
@@ -61,6 +67,11 @@ $item-ios-sliding-content-background: $list-ios-background-color !default; | |||
transition: background-color 200ms linear; | |||
} | |||
|
|||
[dir="rtl"] .item-ios { | |||
padding-left: 0; | |||
padding-right: ($item-ios-padding-left); |
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 parentesis
remove unnecessary parentesis
remove unnecessary parentesis
Use transform instead of independent svg for item-detail on RTL
This PR is ready for another review |
@sijav It feels like something was reverted here.. wasn't there a |
@AmitMY rotating is very hackish and does not look good, however I could manage to make it work with changing the border and shadow but still it doesn't look good. So I'm just reverse the icon's svg and it's working great, we can also use transform to rotate the icon itself, so let me know which one is preferred. |
@sijav You used it correctly. I just ran e2e.watch and it looks good! |
Any updates? |
@sijav This was not merged because it was waiting on another PR. Now that it is merged, what you need to do is, like you have rtl stuff under |
@AmitMY thanks, I'll do it tomorrow I don't have access to my laptop now, also can you please check the other PRs of mine and tell me if there's any changes I should make to them as well because of ltr mixin? Thanks again 😊 |
@sijav Most of your other PRs also use |
@AmitMY nice, that's what I expected 👌 |
Thank you for the PR! Closing this as it was fixed by #11945. 😄 |
Short description of what this resolves:
RTL fix (scss changes) for item for wp, ios and android platform
Changes proposed in this pull request:
Ionic Version: 2.x / 3.x
Fixes: #11211