Skip to content
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

@angular/animations. incoherent and inconsistent behavior when animating divs #25447

Open
1 task done
nasreddineskandrani opened this issue Aug 13, 2018 · 0 comments
Open
1 task done
Labels
area: animations freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Milestone

Comments

@nasreddineskandrani
Copy link

nasreddineskandrani commented Aug 13, 2018

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

I am playing around with the animation package and multiple points i have to raise here.
Please look at the stackblitz link provided to understand the bottom example.

For the exact same animation code (but with 2 different animation triggers):
. item red in an ngFor
. item yellow without ngFor

When you hit the button a first time
item red: move with animation (20px)
item yellow: move with animation (30px)

When you hit the button a second time
item red: move with animation from the beginning of the row (not from his current position) => Problem1 (lost position)
item yellow: move with NO animation from his current position to the new one => Problem2 (lost animation)

note:
When you uncomment only the line in the method animSecondDone the problem2 is solved. But it should not be needed in my opinion since transition('* => moveYellowX', animate('1s linear')) includes moveYellowX to moveYellowX.
Doing the same for red item=> when you uncomment only the line in the method animDone, it broke the animation of red Item totally Problem3.

Problem4 => animation behave differently with/without ngFor

I think all problems [1 to 4] mentioned should be fixed. Can you confirm that all these are problems?
(i didn't open one issue per problem but we can if you confirm and needed)

Expected behavior

On each button click, item yellow and item red behave the same so move horizontally with animation.

Minimal reproduction of the problem with instructions

check Current behavior section for instructions.
https://stackblitz.com/edit/angular-animations-poke-bugs?file=src/app/anim-test-a.component.ts

What is the motivation / use case for changing the behavior?

Fixing the package.

Environment

Angular V. => all in the stackblitz package.json

Browser:

  • Chrome (desktop) Version 68.0.3440.106 (Official Build) (64-bit)
@ngbot ngbot bot added this to the needsTriage milestone Aug 13, 2018
@ngbot ngbot bot removed this from the needsTriage milestone Sep 27, 2018
@ngbot ngbot bot added this to the Backlog milestone Oct 8, 2018
@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed severity3: broken labels Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: animations freq2: medium P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

No branches or pull requests

5 participants