-
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(transition-ios): RTL fix for transition on ios #11820
Conversation
Works very well! Do you think using |
1bde6d4
to
c6fa3d4
Compare
@AmitMY nevermind what I was saying earlier :D it was the worst idea, besides it really is right offset not start offset, but we do it -99.5% instead of 99.5% |
@sijav Yeah I saw.. I was just about to comment the |
@AmitMY yeah ... it was a very bad solution :D |
Thanks for the PR! This looks good to me. I want to get one more team member to test it and if it looks good to them we'll merge it. 😄 |
Khalid had a good point. Instead of duplicating the variables, you can do: So you only check once (per call) and it is cleaner. What do u think? |
@AmitMY Khalid? I don't see any comment from him, but nevertheless I have nothing against it however I don't know how RTL change can work in runtime but I hope this change won't affect it. |
@sijav Well, of course that part of it will be to move the constants to the init function (which is also required for the Khalid commented but removed his comment. |
Sorry guys, I just removed my comment after seen my suggestion is already suggested by @AmitMY. |
@AmitMY How can I do that? |
@sijav Haha no not like that :P |
@@ -20,6 +18,8 @@ export class IOSTransition extends PageTransition { | |||
super.init(); | |||
|
|||
const plt = this.plt; | |||
const OFF_RIGHT = plt.isRTL ? '-99.5%' : '99.5%'; | |||
const OFF_LEFT = plt.isRTL ? '33%' : '-33%'; |
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.
Looks much better! @brandyscarney any other note or can this get merged?
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.
Nice! I have someone else testing it today and if all goes well with their tests I will merge it. 🙂
Only thing I can see is that the swipe to go back gesture isn't moving the active page, but that issue existed before this PR, so I think it's ok for now. |
@mhartington I've made about a dozen PR #11822 will fix that |
Perfect, thanks! |
* fix(transition-ios): RTL fix for ios transition * put const variables in init of page transition and remove RTL specific variables
Short description of what this resolves:
This will fix the transition on ios platform when it's RTL
Changes proposed in this pull request:
translateX
animations with opposite value if it's on rtlIonic Version: 2.x / 3.x
Fixes: #11211