Hi, thanks for the port. I haven't used the original, but the port seems feature complete and behaving as expected.
I've spent a week trying to implement a hobby project with this library (after ruling out every other DnD library as being too limited or incompatible with Svelte's data first model), and while this library seems the most promising I just can't seem to get things working quite right.
Most fundamentally, I would ask if this library is considered compatible with animations/transitions (crossfade and flip in particular)? I see some examples are using crossfade, but in my use case nothing I do seems to work without the Svelte animation code spewing out errors and/or infinite loops I think from collision detection.
More generally, do you have any advice on implementing a multi-container sortable solution (e.g. kanban board) with crossfade transitions, and a backing data structure like:
interface {
...someTopLevelData
sections: {
...someSectionData
items: {
...someItemData
}[]
}[]
}
Where each section is a sortable context, and each item is a sortable? If you are open to updating your examples, I think this structure is a more likely implementation than the $derived columns from your kanban example.
I have tried moving items onDragOver to the new section (pushing it to the end of the new section), but then crossfade moving between columns always starts the transition from the bottom of the section instead of the previous hover position. I have also tried inserting the items at the correct index onDragOver with some success, though it didn't seem recommended by the original dnd-kit. Regardless of those two strategies, I can't seem to get away from Svelte animation errors or the script freezing from an infinite loop moving back and forth between two sections.
Crossfade is important for my use-case, because I would like my data to be able to live updated from the server, and it would be confusing to understand without animations/transitions.
Sorry for the messy question, I've just tried so many things with limited ability or understanding for debugging Svelte animation errors or the cause of collision detection infinite loops that I'm not sure what makes sense anymore.
Thanks
Hi, thanks for the port. I haven't used the original, but the port seems feature complete and behaving as expected.
I've spent a week trying to implement a hobby project with this library (after ruling out every other DnD library as being too limited or incompatible with Svelte's data first model), and while this library seems the most promising I just can't seem to get things working quite right.
Most fundamentally, I would ask if this library is considered compatible with animations/transitions (crossfade and flip in particular)? I see some examples are using crossfade, but in my use case nothing I do seems to work without the Svelte animation code spewing out errors and/or infinite loops I think from collision detection.
More generally, do you have any advice on implementing a multi-container sortable solution (e.g. kanban board) with crossfade transitions, and a backing data structure like:
Where each section is a sortable context, and each item is a sortable? If you are open to updating your examples, I think this structure is a more likely implementation than the
$derivedcolumns from your kanban example.I have tried moving items onDragOver to the new section (pushing it to the end of the new section), but then crossfade moving between columns always starts the transition from the bottom of the section instead of the previous hover position. I have also tried inserting the items at the correct index onDragOver with some success, though it didn't seem recommended by the original dnd-kit. Regardless of those two strategies, I can't seem to get away from Svelte animation errors or the script freezing from an infinite loop moving back and forth between two sections.
Crossfade is important for my use-case, because I would like my data to be able to live updated from the server, and it would be confusing to understand without animations/transitions.
Sorry for the messy question, I've just tried so many things with limited ability or understanding for debugging Svelte animation errors or the cause of collision detection infinite loops that I'm not sure what makes sense anymore.
Thanks