-
-
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
[WIP] outroing update flow #4699
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes #4630, summary of #4620, #4064, #3685, #3410 and #3202. prior to this change, a component would simply cancel the outro of its `if_block` for any update happening between `outrostart` and `outroend` I tested the REPL provided on each issue and they're all fixed, all but #4064 that also has another bug I'll be looking into
#4064 did not have another bug, the first change just blocked nested `if_block`s from getting updates
This reverts commit 80e4f6b.
#4693 made me realize that it's not just the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #4683
This is a followup to #4634
while a dirty check in simple if_blocks managed to fix the issue for many, every other update between outrostart and outroend will still either be voided, breaking or worked around using nasty checks such as
!current || dirty
Here is an edge case among others :
https://svelte.dev/repl/b71f70fa92a94bd8b82c677b919083a9?version=3.20.1
Fixes #4696, Fixes #4064
on first tick a hard outro is triggered on the element, a soft one on the current_block
on second thick, the update goes first, it calls a hard outro on the current_block
since it has not yet done its soft outro, the hard outro is voided
then it calls transition_in, but current_index has changed due to the update
so while the current_block gets transition_in called twice, the previous_block ends its soft outro and stays in the dom
this cannot be fixed in a single line as it necessitates to call
transition_in
before updating, that comes with the price of breaking every!current || dirty
check, so it's a WIP