-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
afcaa60
to
59867fb
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.
couple of very minor nits and questions
README.md
Outdated
const { scroll } = this.meta(Dimensions).get('content'); | ||
|
||
return [ | ||
{ height: `0px` }, |
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: we don't need `
here, just '
src/mixins/Animated.ts
Outdated
import Map from '@dojo/shim/Map'; | ||
import MetaBase from '../meta/Base'; | ||
|
||
declare const KeyframeEffect: any; |
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.
Can we not type these?
src/mixins/Animated.ts
Outdated
(node: HNode) => { | ||
const { animate, key } = node.properties; | ||
if (animate && key) { | ||
this.meta(AnimationPlayer).add(key as string, animate, this); |
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.
any reason we can't bind
the controls in here rather than in the meta
?
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 can but it's potentially an array of arrays so wanted to avoid the extra loops. Can do though if you feel it's better?
src/mixins/Animated.ts
Outdated
decorate(result, | ||
(node: HNode) => { | ||
const { animate, key } = node.properties; | ||
if (animate && key) { |
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.
Do you think we should warn if animate
is passed without a key
, might be surprising if it doesn't work?
8ffa0b6
to
26ecd13
Compare
@agubler ready for another review |
src/interfaces.d.ts
Outdated
@@ -414,6 +455,7 @@ export interface NodeHandlerInterface extends Evented { | |||
export interface WidgetMetaProperties { | |||
invalidate: () => void; | |||
nodeHandler: NodeHandlerInterface; | |||
bind: any; |
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.
Is this really any
?
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.
the bind scope is any in widgetBase
I believe? I guess it should probably be WidgetBaseConstructor
?
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 wouldn't be the constructor, it would just be WidgetBase
if it is able to be typed.
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.
ok
src/meta/WebAnimation.ts
Outdated
} | ||
|
||
afterRender() { | ||
super.afterRender(); |
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.
why super.afterRender()
?
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.
Is this not how you call the super function?
package-lock.json conflict now |
@agubler all done, please re-review |
Type: feature
The following has been addressed in the PR:
Description:
Adds a
WebAnimations
meta which allows programatic web animations to be applied to aVNode
.Resolves #657