-
Notifications
You must be signed in to change notification settings - Fork 27k
refactor(core): add compiler support for animation instructions #62528
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
Conversation
0d81af2 to
1ee1911
Compare
...st/compliance/test_cases/r3_view_compiler/animations/animate_in_with_string_host_bindings.ts
Outdated
Show resolved
Hide resolved
| it('should generate an animation in function call', () => { | ||
| const TEMPLATE = '<p (animate.in)="animateFn($event)"></p>'; | ||
| expect(tcb(TEMPLATE)).toContain( | ||
| '($event: i1.AnimationCallbackEvent): any => { ((this).animateFn)($event); }', |
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.
What should the return value be of the animateFn? The TCB here allows any but also only ever returns void or am I reading that incorrectly?
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.
There's an interface for it that'll be introduced in the follow up PR called AnimationCallbackEvent. I just wanted to separate out the PRs. So this will get fixed in the next PR.
f1cd8d4 to
072cea3
Compare
c93a738 to
c1f3d38
Compare
...ler-cli/test/compliance/test_cases/r3_view_compiler/animations/animate_enter_with_binding.ts
Outdated
Show resolved
Hide resolved
...est/compliance/test_cases/r3_view_compiler/animations/animate_enter_with_binding_template.js
Outdated
Show resolved
Hide resolved
1dfa5e3 to
be448d5
Compare
be448d5 to
5f89391
Compare
5f89391 to
b175c2c
Compare
this adds the compiler code to support the animate instructions.
b175c2c to
632532e
Compare
| expect(dtsContents).toContain('static ɵfac: i0.ɵɵFactoryDeclaration<Service, never>;'); | ||
| }); | ||
|
|
||
| describe('animate.enter', () => { |
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.
To be honest we have the "compliance" tests which cover the generated code quite nicely - I don't think we need this flavor of test as well. It is nice to have coverage of the @if(...) case though which shows the context save/restore working.
|
This PR was merged into the repository by commit fc8247d. The changes were merged into the following branches: main |
|
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. |
this adds the compiler code to support the animate instructions.
Does this PR introduce a breaking change?