Skip to content

This package is awesome!! №2 #8

@interk0t

Description

@interk0t

I really liked your library.
It includes the key functionality that should be for a sorting list. Many similar libraries either do not support Svelte or do not have the necessary functionality for such a library. The key aspects that are positive for this library that can be highlighted:
Functionality:

  • Horizontal / vertical list
  • Element lock
  • Element handle
  • Lock on a specific axis (very important)
  • Boundaries (very important)
    Visual:
  • Smooth animations for the ghost of the element
  • No jerks when taking an element and when releasing it (very important) this interaction with elements becomes very pleasant (not available in many libraries)
    Ease of use:
  • The library provides a minimum of elements for creating a list (, ). This corresponds to the trends and style of Svelte itself

What I would like to see in the next versions of this library, and what functionality is missing (my opinion):

  • First of all, as @elron said, support multiple droppables
    (this will greatly expand the capabilities of the library, which with the existing ones will make it a cut above the rest)
  • SortableList.enable() for connection and SortableList.disable() - very convenient methods that allow you to disable all functionality in those components of the project in which it is not needed at the moment (we are talking about a fairly global project with a large number of nested components and their functionality)
  • a very important functionality that allows you to move an element while scrolling the list of elements, this function is extremely necessary

Methods:

  • SortableList.onInit(()=> {}) the event would be triggered whether SortableList should be initialised automatically when you create an instance
  • SortableList.onDragStart(()=> {}) during the start of dragging
  • SortableList.onDrag(()=> {}) during dragging
  • SortableList.onDrop(()=> {}) when element was dropped
  • an event that would signal that the element's movement has reached the Boundaries of another container with elements (if multiple droppables are implemented)

Props:

  • isSortable . At the moment, the library allows you to use two props that block interaction using isLocked and isDisabled, but none of these props can "freeze" a certain element so that its position in the list will not change (it will not be sortable)
  • isSortableBetweenZones is an option to specify whether a given element can be moved to any other zone (if multiple droppables are implemented)

Issues:
I tried to create 1000 sortable elements and with such a number, the fps in the browser significantly decreased and it became difficult to move the element, since the animations lagged, is it possible to make some optimizations in this regard. I understand that the scenario in which the user will have 1000 elements is unlikely, and even if the developer does not use virtualization, but if there is an opportunity to optimize, it would be great.

I want to say that in my opinion, having tried almost all the libraries dedicated to sorting lists, this library solves many problems and it has a huge potential to become the best among the rest, this will be a good contribution to the Svelte community!

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions