kampffrosch94 / jpdb-deck-manager

https://kampffrosch94.github.io/jpdb-deck-manager/
MIT License
3 stars 0 forks source link

Request: new page for deck reordering #4

Open philipguin opened 1 month ago

philipguin commented 1 month ago

Hi! Just discovered this tool, and the CoverageOverview in particular is fantastic. Thank you!

One feature I really wanted from the base website was better management of decks - in particular, reordering them more quickly than is currently possible. Since you already have pages for merging and deleting decks, do you think you could add a page for reordering them as well?

E.g. just a table like the other pages, but every row could include:

  1. Drag-and-drop widget
  2. Move up one
  3. Move down one
  4. Move to top
  5. Move to bottom

Bonus features might be:

  1. Sort by column
    • Just allow superficial sorting by columns in UI (as in other pages), but add button to "commit" sort to jpdb, possibly with warning. Index column that's default sorted on could make less confusing.

If you're busy, I'd be happy to try and make this. I don't have much web experience, but the front-end code doesn't seem too complex, so the difficulty would probably be just learning how to set everything up.

Thanks for your time!

kampffrosch94 commented 1 month ago

Hi :wave:

unfortunately deck order is not exposed via the jpdb-api so this isn't really possible to do properly in a webapp.

One could hack around it by deleting all decks and recreating them in the (reverse) target order but I have ergonomic concerns with that method. Since the jpdb api is rate limited the process would take a while (say half a second per deck or something). If the user closes the tab or loses internet connection or something like that their decks would be gone :fearful:

An imo better approach would be to implement an user script (violentmonkey etc) that changes the interface on the jpdb.io website itself.