-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
skipIntroByDefault only works in top-level components #1475
Comments
I think this is a dupe of #1460 ? |
Should this be altered to address the second part of the issue only (the animation being run when the checkbox is clicked)? Or are the two issues the same underlying problem? |
The second part is the missing piece of #1451. Quoting from there: ...introduce some mechanism for preventing child transitions — I suggested this previously: <!-- it would be weird if each <li> slid out while the <ul> itself was fading -->
{#if showList}
<ul transition:fade childtransition:false>
{#each list as item (item.id)}
<li transition:slide>{item.name}</li>
{/each}
</ul>
{/each} We need nested transitions, but we also need a way to prevent them. That seems like the most reasonable design to me. Thoughts? |
That makes sense, however I believe the default should prevent child transitions as that will be a vast majority of the cases. I will add my thoughts in #1431 since that is where the discussion is. Thanks! |
#1431 is closed; this probably warrants a new issue |
Opened #1480 |
If transitions are deeper than the top-level component then they get run on startup. See:
https://svelte.technology/repl?version=2.6.2&gist=b875329d846ecad0201bcfa62d6d1230
In addition, the slide transition in the above example should never run. It should be scoped to the
{#if visible}
block within the inner component and only run whenComponent1
’svisible
property is toggled, not whenApp
’s visible property is toggled to showComponent1
. If it isn't scoped to the nearestif
oreach
then animations will only skip at app startup but will run on new page routes. This is undesirable.The text was updated successfully, but these errors were encountered: