Open valdrinkoshi opened 8 years ago
Hi @robdodson, that's a good point. On the other hand removing the neon-animation
dependency and use css transitions would be a breaking change for paper-dialog
(it currently supports all these animations as entry/exit https://github.com/PolymerElements/neon-animation#animations).
I'd rather delegate this performance improvement on neon-animation
. WDYT?
From @robdodson on March 1, 2016 5:52
I think of neon-animations as being pretty tied to web animations so I'm not sure if it would be possible for it to remove that dependency. I think there was talk of switching neon-animations off of the current polyfill and possibly to a nicer one? @dstockwell were you working on that?
From @dstockwell on March 1, 2016 23:49
After further discussion, the plan is to move away from neon-animation
. For this particular element I think we should deprecate entry-/exit-animation and add hooks (callbacks + classes or attributes) to allow consumers to trigger animations (either CSS or Web Animations API) directly.
To reduce the effects of the breaking change we could continue to support the entry-/exit-animation attributes, but wire them up to CSS animations for the well-known neon-animation animation names.
From @robdodson on March 2, 2016 20:30
awesome!
@dstockwell, could we do this wiring to CSS animations on neon-animation
? Like this, we could handle the gradual deprecation from one single place. WDYT?
From @dstockwell on March 2, 2016 23:34
@valdrinkoshi, potentialy. It's somewhat fragile if consumers are applying other animations via CSS, but still plausible.
But, just going back to looking at the dependencies. Ideally a non-animating paper-dialog
would have no dependency on web-animations. Unfortunately this looks like a bug in the way neon-animation is structured where neon-animatable-behavior
pulls in an opaque-animation
.
Yeah, if that could be lazy-loaded it would be a big performance win
@dstockwell moved the issue here based on this comment
From @robdodson on February 28, 2016 17:54
The dialog element is super useful but pulling in all of web animations makes it feel prohibitively expensive. Is this a hard requirement or could it be replaced with CSS transition events?
Copied from original issue: PolymerElements/paper-dialog#91