-
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(nav): custom animation is no longer overridden #23779
fix(nav): custom animation is no longer overridden #23779
Conversation
opts will always have animationBuilder prop when used with ion-router and this fix will make sure, that animationBuilder will be set with appropriate value
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.
Thank you! This is good to merge when tests pass.
...opts | ||
...opts, | ||
|
||
animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation') |
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.
Any reason why we switched the order 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.
Transition passed in opts (e.g. it came from router) should take precedence over nav transition. Simple example - I set transition for nav, but in specific scenario, when moving from view A to B I need other transition, which can be passed to push() or set in router-link. Previous impl would always pick nav's transition.
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.
Good catch! In that case, could we also make that same change here: https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/router-outlet/route-outlet.tsx#L191
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.
Done
Merged. Thank you! |
opts will always have animationBuilder prop when used with ion-router and this fix will make sure, that animationBuilder will be set with appropriate value
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #23777
What is the new behavior?
Use custom transition if set on ion-nav and page change triggered by ion-router.
Does this introduce a breaking change?
Other information