-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Transition internals #4999
Transition internals #4999
Conversation
Also here's a playground for the fork https://svelte.dev/repl/3548e4d0a06f4440847e5c92caa02b93 always happy to instant chat on discord if you need me |
export const transition_out = (block: Fragment, local?) => { | ||
// todo : are `!block` and `outroing.has` checks necessary ? | ||
if (!block || !block.o || outroing.has(block)) return; | ||
outroing.add(block); | ||
block.o(local); | ||
}; |
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.
rereading it this looks like a memory leak, should push outroing.delete(block)
into a transition group callback
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There's some really good stuff here, but it's also just not possible to review given the size of the PR. Can you split it up into multiple smaller PRs? We've been trying to clear out the review queue, so I'm going to go ahead and close this given that I don't see any path forward on it in its current state. That doesn't mean that we don't appreciate this work, but it's just acknowledging the reality that no PR this big can be reviewed, which is why it's sat here for so long. If you'd like to discuss ways of splitting up the PR you can find us on Discord in the |
Following #4742
Unfortunately crossfading and the
animate
directive turned out to be incompatible with transitions by design. There is still a few things related to transitions from that PR, none of them are breakingNew frame callback system keeps track of all pending tasks to shrink work performed each frame (previously iterating over a Set calling each animation) down to as little as one timestamp check
Measurements and animations are now batched to be applied after flush, this avoids layout trashing and significantly improves performance in same tick tasks performing several DOM reads
This is the cause of most changed tests as it was expected for animations to be applied synchronously
Fixes Animation rects need to be measured before any other updates #4732
Position freeze is now reversed if re-introed,
fixes transition + animate where a node would hide behind others, fixes Elements (components) with transition overlap each other in an each block using flip animation #4910, fixes Animate breaks when used along with fly transition #6001
Bidi transitions now recompute on every run, fixes Nested Transitions NOT Honored #4784, fixes Slide transition jumps on the way out if height changes while it's visible #4831
is_intro
boolean, related Adddirection
parameter to transitions #4019Bidi transitions now handle several delay reversals, fixes delay in transitions only applies to last change #4968
is_intro
undefined
Fixed concurrency bugs related to bidi transitions reversal, fixes Error in bidi transitions when returning a function #4974, fixes outroing transition group never unmounts if one sibling remounts with delay in bidirectional transition #4954
Added
rotate
option tofly
transition, rewrotesvelte/transition
typesnotes
@rollup/plugin-typescript
has to be updated to properly inlineconst enum
todo
Remove transition easing strategies ( cool but unnecessary )
Write tests for fixed bugs
Can't work on this for some time but it's there if someone needs it, it's all yours