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): allow animations with unsupported CSS properties #44729
fix(animations): allow animations with unsupported CSS properties #44729
Conversation
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, @dario-piotrowicz! I like this a lot. Definitely take a look at the comment below. One thing I've been thinking about as I read this is that there's similar code used every time you output them to console.warn
. This suggests to me maybe an abstraction makes sense. What do you think?
Thanks! 😃 Yes an abstraction would make total sense, the issue is that if you look at the I am not sure why they are different and figured the safest thing would be to follow that for the introduction of warnings, but I could definitely abstract the console warnings in some reusable way and then we can pick the errors up separately? or would it make sense to just keep the warnings as they are for this PR and abstract both errors and warnings at the same time in a separate PR? 🤔 regardless there are many ways these errors can pop up, I haven't really tried triggering them all, I will have to have an investigation in this too to see if there is a reason we have different formats for errors in different places or not (probably not, but still would be good to have a look around I think 😄) |
5767268
to
29114a0
Compare
@jessicajaniuk I've looked into the errors and they are all just results of So I'll add a commit to add some shared functionality for the errors and warnings 🙂👍 |
ce516ae
to
6875003
Compare
packages/animations/browser/src/render/transition_animation_engine.ts
Outdated
Show resolved
Hide resolved
@jessicajaniuk I've added shared functions for both the errors throwing and the warnings logging, please have a look 😄 By the way, I originally added the new functions to the The issue is that currently |
84d2e67
to
a0668f8
Compare
a0668f8
to
bac79f9
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.
@dario-piotrowicz I managed to break this again with the Error tree shaking pull request. So you'll want to take a look again. We'll want to be sure that warnings are also tree shakable, as well. Definitely take a look and let me know if you need any pointers. I'm pretty sure we can still get this in the v14 release.
cee8cc3
to
79f06a5
Compare
@jessicajaniuk PR fixed, for the warning I tried to follow what you did for the errors in the way that made more sense to me, hopefully I got it right, please let me know what you think 🙂 PS: there were so many things to change that I just force-pushed a single commit in and cleared all the rest, sorry if it creates any inconvenience 🙇 |
c541a9f
to
d67e6c7
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.
@dario-piotrowicz This is super close. I like the changes, and I have a few suggestions for making it a bit cleaner here. Should be very quick to address and we should be able to land it.
packages/animations/browser/src/render/animation_engine_next.ts
Outdated
Show resolved
Hide resolved
packages/animations/browser/src/render/animation_engine_next.ts
Outdated
Show resolved
Hide resolved
packages/animations/browser/src/render/timeline_animation_engine.ts
Outdated
Show resolved
Hide resolved
2750894
to
e92ee0f
Compare
e92ee0f
to
0c776eb
Compare
0c776eb
to
4cf1e0c
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 🍪
Thanks for working through this, @dario-piotrowicz!
Thank you for the awesome reviewing, sorry I went in the wrong direction a couple of times! 😜 |
@dario-piotrowicz currently this is tagged as |
Sorry I am not really sure.... the original code was purposely stopping animations for unsupported properties, and I changed it to ignore them instead... so it does sort of sound like a feature (even if a very small one) 🤷 I don't even know what difference it makes to land this as a (@jessicajaniuk, what do you think? 🙂) |
currently animations with unsupported CSS properties cause a hard error and the crash of the animation itself, instead of this behaviour just ignore such properties and provide a warning for the developer in the console (only in dev mode) this change also introduces a general way to present warnings in the animations code resolves angular#23195
20902d2
to
8cface7
Compare
@alxhub Updated to |
FYI - This had a conflict with |
This PR was merged into the repository by commit f8dc660. |
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. |
…gular#44729) currently animations with unsupported CSS properties cause a hard error and the crash of the animation itself, instead of this behaviour just ignore such properties and provide a warning for the developer in the console (only in dev mode) this change also introduces a general way to present warnings in the animations code resolves angular#23195 PR Close angular#44729
currently animations with unsupported CSS properties cause a hard error
and the crash of the animation itself, instead of this behaviour just
ignore such properties and provide a warning for the developer in
the console (only in dev mode)
resolves #23195
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Issue
Issue Number: #23195
Does this PR introduce a breaking change?
I don't think it's a breaking change, unless someone was actually in some circumstances relying on the animations crushing when finding unsupported CSS properties 🤔
Other information
You can notice that the warnings I've added are
string
s which is inconsistent with the errors beingany
s, I believe the errors should actually also be strings and I've already opened #44726 to update their type 🙂