42 Replies
lol you dork
you cannot use FLIP without a key'd each block
it has to know the first order and last
it can only know that if each one has a id
I see
I am legitimately laughing out loud at that title
Svelte examples
Cybernetically enhanced web apps
ok so transition works fine, it's just an animate issue
wait that example is odd
imo
that is basically what I do in my todo
it just needs the (todo.id) t
ehh, so I gotta try change this around then, hmm
lemme try
oh yeah but transition works fine, it's animate that breaks for me
can you share in a repl?
lemme try that sandbox
or at least the github
Try this
Freaking love I got them to add Vim motions
codesandbox? ntvm
xD
They lost my love, nothing but frustration
use the repl or sveltelab/stackblitz
https://svelte.dev/repl/hello-world?version=4.2.3?vim=true
err take off vim=true xD sorry defaulted (or tell it false lol)
the hell do I use this thing
lol which
the repl
just says its loading
reload?
https://svelte.dev/repl/
or just try that link no version/vim
SvelteLabs you might have to whitelist stackblitz
ugh hold on lemme try log in, bloody thing is bugging out
BARE WITH
ooh sorry I didn't past it all did I
you need to give the id="{todo.id}" too
so it knows what to animate xd
https://www.sveltelab.dev/52t5d1m1cfq47m7
doesnt work but the code s there
edit in an alert eh
>.>;;
<input id="{todo.id}" class="ui-checkbox" bind:checked={todo.completed} type="checkbox" />
don't judge me.
(you can judge me it's fine)
I will sorry xD
haha getting the same a11y errors I am
2 years ago I didn't trust buttons ig
I didn't know how else to do it tbh, I'd prefer if I could just edit the span lol
yeah 'coz of span
yea should be a button
I can fix it with some code, but it's whatever
anyway this still doesn't work, hmm
I mean the code I'm looking at does not even have the FLIP imported or assigned so idk
oh hold on
https://www.sveltelab.dev/52t5d1m1cfq47m7
better at least have the proper error now
An element that uses the animate directive must be the immediate child of a keyed each blocknot sure what but you had the flip on one the spans you need it on the whole parent
<div class="li-box" animate:flip>
hmmm
no error but it does nothing
i only wanted it on the delete button, interesting
span*
why only on the del?
idk how you would FLIP that
xD
you're right
I just wanted it to flip the list if I click delete, basically
though I'm just testing it out to see what it does, how it works, etc etc
make sure you understand what it does first. It would work on any change to the list
so adding it would FLIP or deleting (ordering too).
I must've skipped some of the tutorial
didn't know the key blocks etc
I mean FLIP is not just Svelte its a technique
that is just sveltes implementation of it. Like GSAP.Flip works different.
Right but that is what I mean you probably don't understand FLIP and why it would need the key
David Khourshid
CSS-Tricks
Animating Layouts with the FLIP Technique | CSS-Tricks
User interfaces are most effective when they are intuitive and easily understandable to the user. Animation plays a major role in this - as Nick Babich said,
yeah absolutely
transition works well and I understand that, I'll go through animate some more befoer I start dicking around with it
idk if that article will help any but gives a deep overview of the technique
yeh in:fly out:fade is perfect for now, that's what I was after, lemme look into FLIP
I think I'd use transitions more than animate but lemme research it, thanks for the help again b1 š
out of curiosity, which one do you use more often than not?
eh?
I use all the things xD
Also I use GSAP in most my stuff so
just depends what I need. I'll use it
fair enough
anyway let's not sidetrack this one. BACK TO GENERAL!