-
Notifications
You must be signed in to change notification settings - Fork 25.4k
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(ivy): introduce the animate
pipe for styling bindings
#26931
Conversation
39d8bef
to
8cd7e9b
Compare
You can preview 7f1a9be at https://pr26931-7f1a9be.ngbuilds.io/. |
} | ||
|
||
export function now(): number { | ||
return window ? window.performance && window.performance.now() : Date.now(); |
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 a bug here, should be:
return window ? window.performance && window.performance.now() : Date.now(); | |
return window && window.performance && window.performance.now() || Date.now(); |
playerContext[index] = null; | ||
} else { | ||
playerContext.splice(index, 1); | ||
player.status.subscribe(state => { |
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.
This subscription is not unsubscribed from, nor is the status
Subject
being completed, so this will probably leak by the looks of it.
export function computeStyle(element: HTMLElement, prop: string): string { | ||
if (!window || !window.getComputedStyle) return ''; | ||
const gcs = window.getComputedStyle(element); | ||
let val = (gcs as any)[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.
nit:
let val = (gcs as any)[prop]; | |
const val = (gcs as any)[prop] || gcs.getPropertyValue(prop); |
const bool = classes[className]; | ||
element.classList.toggle(className, revert ? !bool : bool); | ||
if (store) { | ||
store[className] = revert ? false : true; |
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.
nit:
store[className] = revert ? false : true; | |
store[className] = !revert; |
|
||
function applyStyleChanges( | ||
element: HTMLElement, styles: {[key: string]: any}, backupStyles: {[key: string]: any} | null, | ||
revert?: boolean, store?: {[key: string]: any} | null) { |
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.
nit: what I think is strange is that backupStyles
is not optional, whereas its read is conditional on the optional revert
param being true.
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
scheduleFlush(): void; | ||
flushEffects(): boolean; | ||
destroy(): void; | ||
onAllEffectsDone(cb: () => any): void; |
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.
onAllEffectsDone(cb: () => any): void; | |
onAllEffectsDone(cb: () => void): void; |
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.
This is needed so you can do something like onAllEffectsDone(x => foo());
(incase foo()
returns something ... otherwise typings would fail)
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.
It is perfectly fine to use a function with a non-void return type in place of a () => void
function (e.g. see microsoft/TypeScript#20006 (comment)).
(There are discussions about changing that, but I don't see it as likely in the near future - famous last words.)
If you wanted to be fancy (and safe), you could use () => unknown
😛
80c3b59
to
1533bc2
Compare
You can preview 1533bc2 at https://pr26931-1533bc2.ngbuilds.io/. |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
You can preview 6a548fe at https://pr26931-6a548fe.ngbuilds.io/. |
CLAs look good, thanks! |
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
packages/core/src/render3/animations/css_transition_animator.ts
Outdated
Show resolved
Hide resolved
98032a6
to
a6789ad
Compare
You can preview a6789ad at https://pr26931-a6789ad.ngbuilds.io/. |
6f83273
to
30d7ce1
Compare
You can preview dd02c54 at https://pr26931-dd02c54.ngbuilds.io/. |
You can preview 13fe0dc at https://pr26931-13fe0dc.ngbuilds.io/. |
You can preview df73dbf at https://pr26931-df73dbf.ngbuilds.io/. |
You can preview 8fdff6c at https://pr26931-8fdff6c.ngbuilds.io/. |
1d1e08d
to
67ce48f
Compare
You can preview 1d1e08d at https://pr26931-1d1e08d.ngbuilds.io/. |
You can preview 67ce48f at https://pr26931-67ce48f.ngbuilds.io/. |
You can preview 8f0c799 at https://pr26931-8f0c799.ngbuilds.io/. |
You can preview f1d1d6b at https://pr26931-f1d1d6b.ngbuilds.io/. |
You can preview bbe62d3 at https://pr26931-bbe62d3.ngbuilds.io/. |
You can preview 6826828 at https://pr26931-6826828.ngbuilds.io/. |
You can preview d684d5d at https://pr26931-d684d5d.ngbuilds.io/. |
@matsko I was excited about |
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. |
No description provided.