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

bug(animations): false (0) state is being confused as "void" in transitions in 4.0.0-rc.4 #15223

Closed
emoralesb05 opened this issue Mar 17, 2017 · 9 comments
Labels
area: animations regression Indicates than the issue relates to something that worked in a previous version

Comments

@emoralesb05
Copy link

emoralesb05 commented Mar 17, 2017

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The * auto-style wildcard stopped working when upgrading the @angular@4.0.0-rc.3 and the element keeps the opacity at 0 and display at none even after animating. (also the returning transition is not working)

e.g.

trigger('fade', [
    state('false', style({
      opacity: '0',
      display: 'none',
    })),
    state('true',  style({
      opacity: '*',
      display: '*',
    })),
    transition('0 => 1', animate('200ms ease-in')),
    transition('1 => 0', animate('200ms ease-out')),
  ])

Expected behavior
It was working in 2.X.X without any issues. Should set opacity to 0 and display to none when trigger is false and should set opacity and display to whatever it was when trigger is true while animating between opacity.

Minimal reproduction of the problem with instructions
Plnkr with issue: https://plnkr.co/edit/IGvg3RIcdVtfhOV9M0sI?p=preview

What is the motivation / use case for changing the behavior?
Working animations are broken now.

  • Angular version: 4.0.0-rc.3

  • Browser: all

@emoralesb05
Copy link
Author

emoralesb05 commented Mar 17, 2017

After digging around more, i notice that its confusing false with void in the transitions.

screen shot 2017-03-16 at 7 08 07 pm

Notice the transitions are going from true to false and then void to true 🤔

Created a plnkr so its easier to notice:

https://plnkr.co/edit/xEeGUDk3ob4lR5x5mqMe?p=preview

@emoralesb05 emoralesb05 changed the title bug(animations): * auto-style stopped working in 4.0.0-rc.3 bug(animations): false state is being confused as "void" in transitions in 4.0.0-rc.3 Mar 17, 2017
@emoralesb05 emoralesb05 changed the title bug(animations): false state is being confused as "void" in transitions in 4.0.0-rc.3 bug(animations): false (0) state is being confused as "void" in transitions in 4.0.0-rc.3 Mar 17, 2017
@emoralesb05
Copy link
Author

Renamed the issue since the * works fine, the problem is the confusion between false and "void"

@matsko matsko added the regression Indicates than the issue relates to something that worked in a previous version label Mar 17, 2017
@matsko
Copy link
Contributor

matsko commented Mar 17, 2017

This will be fixed tomorrow.

@emoralesb05
Copy link
Author

Pulled rc.4 and still has the same error. 😞

@emoralesb05 emoralesb05 changed the title bug(animations): false (0) state is being confused as "void" in transitions in 4.0.0-rc.3 bug(animations): false (0) state is being confused as "void" in transitions in 4.0.0-rc.4 Mar 17, 2017
matsko added a commit to matsko/angular that referenced this issue Mar 17, 2017
@matsko
Copy link
Contributor

matsko commented Mar 17, 2017

This is now waiting to go in: #15245

@emoralesb05
Copy link
Author

Awesome @matsko. looking forward for 4.0.0 😄

@matsko
Copy link
Contributor

matsko commented Mar 17, 2017

Just you wait until 4.1.0-beta and you'll get some crazy new stuff ;)

@emoralesb05
Copy link
Author

Oh snap! extra excited 💥 haha

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: animations regression Indicates than the issue relates to something that worked in a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants