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
feat(animations): provide warnings for non-animatable CSS properties #45212
feat(animations): provide warnings for non-animatable CSS properties #45212
Conversation
packages/animations/browser/src/render/web_animations/animatable_props_set.ts
Show resolved
Hide resolved
041ef5c
to
f646f41
Compare
f646f41
to
2376a29
Compare
| @@ -19,6 +19,11 @@ export class WebAnimationsDriver implements AnimationDriver { | |||
| return validateStyleProperty(prop); | |||
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.
We should consider (in a followup) whether we should make the validateStyleProperty a dev-mode-only check as well. Otherwise, there is an inconsistency between validateStyleProperty (which works in both prod and dev modes) and validateAnimatableStyleProperty (that actually works only in dev mode). I think dropping the validateStyleProperty in prod mode makes sense and would help remove some payload size (+ add some extra runtime perf benefits, since we'd need to execute less logic).
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.
yes sounds like a good idea
(I'd be happy to take that on!
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.
Cool, thanks @dario-piotrowicz
2376a29
to
7d8053b
Compare
packages/animations/browser/src/render/web_animations/web_animations_driver.ts
Outdated
Show resolved
Hide resolved
fb4aac9
to
bd04a93
Compare
LGTM
Thanks for your work on this, Dario!
reviewed-for: public-api, fw-animations, fw-testing, size-tracking
packages/animations/browser/src/render/web_animations/animatable_props_set.ts
Show resolved
Hide resolved
LGTM with a couple nits
reviewed-for: public-api, size-tracking
9ddaf66
to
2a14282
Compare
a33a36d
to
2a14282
Compare
@dario-piotrowicz looks great, just left one comment to see if we can improve the error message. Thank you.
warn developers when they are trying to animate non-animatable CSS properties so that can more easily understand why something is not being animated as they would expect it to resolves angular#27577
|
Merge-assistance: I can't remove extra reviewers from the list, but the PR is approved and ready for merge. |
|
@AndrewKushnir I was able to remove them. So I removed the merge-assistance label. Not sure why it let me and not you. |
|
This PR was merged into the repository by commit 79d334b. |
…ngular#45212) warn developers when they are trying to animate non-animatable CSS properties so that can more easily understand why something is not being animated as they would expect it to resolves angular#27577 PR Close angular#45212
…ngular#45212) warn developers when they are trying to animate non-animatable CSS properties so that can more easily understand why something is not being animated as they would expect it to resolves angular#27577 PR Close angular#45212
make the validateStyleProperty check dev-mode only so that it is consistent with the validateAnimatableStyleProperty check introduced in PR angular#45212 besides consistency this change also reduces the payload size and increases performance (since less logic is executed) original conversation: angular#45212 (comment)
make the validateStyleProperty check dev-mode only so that it is consistent with the validateAnimatableStyleProperty check introduced in PR angular#45212 besides consistency this change also reduces the payload size and increases performance (since less logic is executed) original conversation: angular#45212 (comment)
make the validateStyleProperty check dev-mode only so that it is consistent with the validateAnimatableStyleProperty check introduced in PR angular#45212 besides consistency this change also reduces the payload size and increases performance (since less logic is executed) original conversation: angular#45212 (comment)
…alidation in the `validateAnimatableStyleProperty` function use the more complete check for the ngDevMode as it seems to be the preferred version (see: angular#45212 (comment))
make the validateStyleProperty check dev-mode only so that it is consistent with the validateAnimatableStyleProperty check introduced in PR angular#45212 besides consistency this change also reduces the payload size and increases performance (since less logic is executed) original conversation: angular#45212 (comment)
…alidation in the `validateAnimatableStyleProperty` function use the more complete check for the ngDevMode as it seems to be the preferred version (see: angular#45212 (comment))
…idation in the `validateAnimatableStyleProperty` function use the more complete check for the ngDevMode as it seems to be the preferred version (see: angular#45212 (comment))
) make the validateStyleProperty check dev-mode only so that it is consistent with the validateAnimatableStyleProperty check introduced in PR #45212 besides consistency this change also reduces the payload size and increases performance (since less logic is executed) original conversation: #45212 (comment) PR Close #45570
…idation (#45570) in the `validateAnimatableStyleProperty` function use the more complete check for the ngDevMode as it seems to be the preferred version (see: #45212 (comment)) PR Close #45570
|
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. |
warn developers when they are trying to animate non-animatable CSS
properties so that can more easily understand why something is not being
animated as they would expect it to
resolves #27577
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Issue
Issue Number: #27577
Does this PR introduce a breaking change?
Other information