You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
new primitive: transition, similar to modifiers, except they block certain render events #921
I don't know if this is feasible yet, but i was just looking at svelte, and https://twitter.com/ankurpsinghal/status/1640842168288919552?s=20
It seems that they may have transition managers, much like how we have modifier managers, so different animation implementations could be built on top of that.
Why not use modifiers? Modifiers don't and can't block the removal of an element from the DOM.
Alternatively, if the modifier manager had an option for blocking removal, we could probably reuse more code.
We would also need #883 for pre-paint timing, so animations could have a proper initial state
Big yes to this. Ember needs more useful primitives for animation.
ember-css-transitions approach to animating out an element is to clone it. That often works fine, but sometimes it opens up all kinds of problems.
One example where I've seen it break is when the elements to be cloned have web-components, for example. Basically, cloning the DOM might have side-effects that you might not want. Also, it's probably expensive to do.
Reacted by Jarek Radosz, Alex Kanunnikov and Ryan Panning
Activity
miguelcobain commentedon Mar 29, 2023
Big yes to this. Ember needs more useful primitives for animation.
ember-css-transitions approach to animating out an element is to clone it. That often works fine, but sometimes it opens up all kinds of problems.
One example where I've seen it break is when the elements to be cloned have web-components, for example. Basically, cloning the DOM might have side-effects that you might not want. Also, it's probably expensive to do.
lifeart commentedon Aug 4, 2023
We may have "poc" with modifier and
glimmeropcode removal patch https://github.com/glimmerjs/glimmer-vm/blob/664a746b3baf82221c5874a759279d1afdd41e5b/packages/%40glimmer/runtime/lib/vm/element-builder.ts#L474C5-L474C12Once modifier is installed, we adding node to AnimationMap, and once it's going to be removed (modifier uninstall), we could add additional removal logic into set.
And patched glimmer-vm logic may look into this set, and compare current node to remove with AnimationSet, and skip/delay removal.
Sample removal patch:
modifier logic:
sample glimmer remove opcode:
Since glimmer removing nodes inside-out, we may need to check for every
node.parentNodeto be inwindow.AnimationMap