-
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(menu): rtl fix for menu #11830
fix(menu): rtl fix for menu #11830
Conversation
Add "// scss-lint:disable PropertySpelling" above 'left: auto' so it will pass linting |
Remove the css changes, as they are conflicting, and this will be reviewed soon |
@AmitMY what multidir mixin does? It just use the same code for both ltr and rtl? Can I use it in my other PRs? |
Otherwise, specificity rules can override it. You can and should use it in your PRs, only on directional properties. I have a list of all PRs and correct order to review them, and what relies on what. Your other PRs show as "not ready" for me as of a small dependency. I will update you as soon as that is taken care of Left side is without it, middle is with, right is differences: http://ionic-snapshot-go.appspot.com/ionic2/snapshots/d4t/hhp/chrome_400x800 |
This reverts commit 87c3302.
…l-fix-menu # Conflicts: # src/components/menu/menu.scss
@AmitMY waiting for another review, I've tested |
This goes well with #11336, which is not done becasue of bad animation after changing direction. Mind having a look? ( |
src/components/menu/menu.scss
Outdated
@include multi-dir() { | ||
left: 0; | ||
right: auto; | ||
} |
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.
Leave menu.scss
unchanged
The correct default is start
, and thus 0, auto, 0, 0
is correct
You are correct that there is a need to address left, so #11953
Sorry for all of the mess around this.
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 Oh ... alright
This reverts commit f657369.
@AmitMY I reverted the commit but if you mind please check the left menu in tablet mode it doesn't open at an appropriate position also about the #11336 commit I'll take a look but there's a lot of things changed which I'm not sure why are these things changed? why we are using a custom animation here? would you mind explaining a bit about your changes? |
src/components/menu/menu-gestures.ts
Outdated
@@ -57,14 +57,14 @@ export class MenuContentGesture extends SlideEdgeGesture { | |||
} | |||
|
|||
onSlide(slide: SlideData, ev: any) { | |||
const z = (this.menu.isRightSide ? slide.min : slide.max); | |||
const z = ((this.menu.isRightSide && !this.plt.isRTL) || (!this.menu.isRightSide && this.plt.isRTL) ? slide.min : slide.max); |
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.menu.isRightSide && !this.plt.isRTL) || (!this.menu.isRightSide && this.plt.isRTL)
is logically equal to:
this.menu.isRightSide !== this.plt.isRTL
Can you fix this in all of the expressions in this PR?
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 well technically yes but I put it that way for more readability ...
Ok I will change all of em
I can confirm that menu scss problems has been fixed by #11953 Thanks @AmitMY |
src/components/menu/menu-gestures.ts
Outdated
@@ -89,7 +89,7 @@ export class MenuContentGesture extends SlideEdgeGesture { | |||
|
|||
getElementStartPos(slide: SlideData, ev: any) { | |||
const menu = this.menu; | |||
if (menu.isRightSide) { | |||
if (this.menu.isRightSide !== this.plt.isRTL) { |
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 please change this.menu
to menu
?
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 yeah sure sorry my bad
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 missed it too :) orders from above
Short description of what this resolves:
This will fix the menu for rtl direction.
Changes proposed in this pull request:
Ionic Version: 3.x
Fixes: #11211
This will complete after: #11822