Repository navigation
fix(animations): normalize final styles in buildStyles - #42763
dario-piotrowicz wants to merge 4 commits into
Conversation
JoostK
left a comment
There was a problem hiding this comment.
Heya, thank you for taking a look at this. The animations package is not a simple one to get your hands dirty on.
It would be great if this could have a test. I think the best place for such a test would be in the integration suite located in packages/core/test/animation. I am also a bit concerned about the normalizer being optional.
Thank you very much!!! 😃 About the test, consider it done! 😉 Also the normalizer should definitely not be optional! you're totally right! I'm going to amend it 🙂 |
f876e92 to
722a99a
Compare
42d655a to
4cd0367
Compare
JoostK
left a comment
There was a problem hiding this comment.
I think this looks good now. I'm marking for presubmit to see how this behaves in Google.
78d47c3 to
b9ffddc
Compare
lol you noticed that immediately! 🙈 force of habit to amend the last commit... sorry 😅 , should be all good now |
|
FYI tests in Google's codebase (including a global run) went well. // cc @JoostK |
AndrewKushnir
left a comment
There was a problem hiding this comment.
@dario-piotrowicz thanks for the fix 👍
The changes look good, just left 1 minor comment on seemingly unused import.
the final styles created in buildStyles lack normalization, meaning that pixel values remain as numbers (without "px") and so such properties fail to be correctly set/applied Example: "width: 300" is applies as "width": "300" (and thus ignored) instead of the correct "width": "300px"
the buildTrigger function and AnimationTrigger class are annotated as publicApi which seems wrong and makes changes to the two problematic, so they are being removed here see: https://github.com/angular/angular/pull/42763/files#r671481902
in the animation_trigger.ts file there are unused imports remove them to clean up the file
cc520c0 to
f7e517a
Compare
|
Let's do it! I was waiting for CI to go green. |
the final styles created in buildStyles lack normalization, meaning that pixel values remain as numbers (without "px") and so such properties fail to be correctly set/applied Example: "width: 300" is applies as "width": "300" (and thus ignored) instead of the correct "width": "300px" PR Close #42763
) the buildTrigger function and AnimationTrigger class are annotated as publicApi which seems wrong and makes changes to the two problematic, so they are being removed here see: https://github.com/angular/angular/pull/42763/files#r671481902 PR Close #42763
in the animation_trigger.ts file there are unused imports remove them to clean up the file PR Close #42763
the final styles created in buildStyles lack normalization, meaning that pixel values remain as numbers (without "px") and so such properties fail to be correctly set/applied Example: "width: 300" is applies as "width": "300" (and thus ignored) instead of the correct "width": "300px" PR Close #42763
) the buildTrigger function and AnimationTrigger class are annotated as publicApi which seems wrong and makes changes to the two problematic, so they are being removed here see: https://github.com/angular/angular/pull/42763/files#r671481902 PR Close #42763
in the animation_trigger.ts file there are unused imports remove them to clean up the file PR Close #42763
|
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. |
the final styles created in buildStyles lack normalization, meaning that pixel values remain as numbers (without "px") and so such properties fail to be correctly set/applied
Example: "width: 300" would be applied as "width": "300" (and thus ignored) instead of the correct "width": "300px"
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?
At the end of animations numerical values are not normalized thus they are not saved correctly
Example with width, notice how the animation widths are ignored at the end:

stackblitz
Issue Number: #24698
What is the new behavior?
numerical values get normalized at animations end thus fixing the issue
Example after fix:

Does this PR introduce a breaking change?