-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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(animations): animateChild
shouldn't trigger animation on disabled element
#37724
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
45942e3
to
68ecf2f
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
68ecf2f
to
e5e1f92
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
e5e1f92
to
fcd2c9f
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
fcd2c9f
to
dfd3af5
Compare
By the way , the test file has some typo errors before. And I fix it with this PR together. |
animateChild
should not invoke disabled child anim…animateChild
shouldn't trigger animation on disabled element
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
dfd3af5
to
28aa7ee
Compare
28aa7ee
to
01edf66
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
01edf66
to
93fa7c0
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
93fa7c0
to
6012442
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
6012442
to
7dccfd7
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
7dccfd7
to
c92325f
Compare
The cr/circleci error seems is not relevant with this PR. |
I've restarted the CI target and am running a google3 presubmit. |
@@ -1033,7 +1033,10 @@ export class TransitionAnimationEngine { | |||
// instead stretch the first keyframe gap up until the animation starts. The | |||
// reason this is important is to prevent extra initialization styles from being | |||
// required by the user in the animation. | |||
instruction.timelines.forEach(tl => tl.stretchStartingKeyframe = true); | |||
instruction.timelines = instruction.timelines.filter(tl => { |
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.
Overall the changes look good, but this filter
with a side effect looks weird since filter predicate functions are supposed to be pure. I'd recommend doing this instead:
const timelines = [];
instruction.timelines.forEach(tl => {
tl.stretchStartingKeyframe = true;
if (!this.disabledNodes.has(tl.element)) {
timelines.push(tl);
}
});
instruction.timelines = timelines;
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.
Thanks, have updated code
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
622778c
to
4101aca
Compare
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.
LGTM
friendly ping @IgorMinar |
@Zuckjet Looks like there's a code conflict here. Can you rebase this? I think we should be able to land it. Once you rebase, I'll re-run a presubmit and we should be green. |
4101aca
to
a270dcf
Compare
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724
a270dcf
to
d60c34f
Compare
have fixed the conflict. |
Everything looks good. Thanks @Zuckjet! |
This PR was merged into the repository by commit bab7ed3. |
…#37724) Currently child animation will be triggered by `animateChild()` despite it has been disabled. These changes add some logic to prevent that unexpected behavior. PR Close angular#37724 PR Close angular#37724
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ations
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Fixes 35558