From f98684df36a79b6774f3c5627d4f2649c1e61c9a Mon Sep 17 00:00:00 2001 From: feugy Date: Thu, 1 Oct 2020 10:19:53 +0200 Subject: [PATCH] feat(ui): more efficient sortable list component with drag'n drop events --- README.md | 1 - renderer/App.svelte | 12 +- .../auto-scrollable.stories.storyshot | 126 +++++++++++---- .../auto-scrollable.stories.js | 5 +- .../auto-scrollable.stories.svelte | 6 +- .../auto-scrollable/auto-scrollable.test.js | 67 ++++---- renderer/actions/auto-scrollable/index.js | 22 +-- .../PlaylistTracksTable.test.js | 27 ++-- .../PlaylistTracksTable.stories.storyshot | 59 ++++--- .../SortableList/SortableList.svelte | 147 ++++++------------ .../SortableList/SortableList.test.js | 88 +++++------ .../SortableList.stories.storyshot | 29 ++-- .../TracksQueue/TracksQueue.test.js | 32 ++-- .../TracksQueue.stories.storyshot | 34 ++-- renderer/components/index.js | 1 - 15 files changed, 331 insertions(+), 325 deletions(-) diff --git a/README.md b/README.md index 03ccff83..47c4f0e8 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ There are thunsands of them in the wild. This mine is an excuse for learning [El ### Bugs and known issues -1. now that I'm not using FLIP animations, native drag'n drop may be leaner than my mouse-event based implementation 1. Undetected live changes: remove tracks and re-add them. This is a linux-only issue with chokidar - https://github.com/paulmillr/chokidar/issues/917 - https://github.com/paulmillr/chokidar/issues/591 diff --git a/renderer/App.svelte b/renderer/App.svelte index 2e449faa..201807a4 100644 --- a/renderer/App.svelte +++ b/renderer/App.svelte @@ -8,7 +8,6 @@ Nav, Sheet, Snackbar, - SortableListConstants, SystemNotifier, TracksQueue, Tutorial @@ -23,7 +22,6 @@ let isPlaylistOpen = true let ready = false let scrollable - const { isMoveInProgress } = SortableListConstants onMount(async () => { const settings = await invoke('settings.get') @@ -84,17 +82,11 @@
-
+
-