mampf icon indicating copy to clipboard operation
mampf copied to clipboard

Sorting of watchlist entries is broken

Open fosterfarrell9 opened this issue 6 months ago • 2 comments

Inside of watchlists, watchlist entries are supposed to be draggable so that their position can be changed, see the info in the corresponding helpdesk:

By dragging the dark blue area of a medium, you can change the order as you wish.

But this does not work any longer. In the browser console you can see

watchlists.coffee:7 Uncaught TypeError: $(...).sortable is not a function
    at HTMLDocument.<anonymous> (watchlists.coffee:7:36)

It is broken in production and next.

fosterfarrell9 avatar Aug 10 '25 13:08 fosterfarrell9

Also make sure that https://github.com/MaMpf-HD/mampf/pull/842#discussion_r2292233940 is working as expected.

Splines avatar Aug 21 '25 22:08 Splines

In the solution, please also make sure that the approach can be used elsewhere as well with minimal overhead, since we need this dragging around for Vignettes as well (not sure, but I think we used Sortable there too). In the end, the respective watchlist JS files should probably import sortable on-top of their files as node_module. It should not be the case that the Sortable JS code is imported on pages where it is not needed. As usual, follow best practices from the respective package documentations.

Splines avatar Sep 08 '25 21:09 Splines