LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading. Python/Flask.
MIT License
422 stars 46 forks source link

Sort book listing via drag-and-drop #441

Open Inquisitor-Ignotorum opened 3 months ago

Inquisitor-Ignotorum commented 3 months ago

Configuration: Windows 10, Lute v. 3.4.2 installed via pip

Hello. I was recently trying to figure out a way to re-organise my "Home" screen's book list in a way that fit my preferences, but the desired result could unfortunately not be produced by using the "Home" screen's sorting options. Using tags and then sorting by tags did not quite produce the intended outcome, so I had to add increasing numbers in the beginning of the title of each book and to then sort by title, to achieve the preferred order. That led to the following idea:

The user's experience could be improved by enabling them to sort the book listing in the "Home" screen and the book listing in the "Book Archive" screen via drag-and-drop, just like what can be done for each language's dictionaries. This feature would not replace the very useful sorting options which are already available.

This is different than what is outlined in issue #115.

Your thoughts would be welcomed.

Thank you very much for your work. I think that Lute is great and use it every day.

jzohrab commented 3 months ago

Hi there, thanks very much for the issue.

I need to un-complicate some code first, per issue https://github.com/LuteOrg/lute-v3/issues/442.

Lute uses DataTables for the listing library, and they do have a plug-in for drag-drop sorting. https://editor.datatables.net/examples/extensions/rowReorder - so it is def doable.

As you know, the backlog is long and I'm thinly stretched, but this is a good issue and I think others might like it as well. I can't prioritize anything, due to the nature of the project and life :-), so perhaps someone else would be interested in giving this a shot. I'll add some notes below, cheers!

jzohrab commented 3 months ago

Notes for future:

In short, this isn't as trivial a problem as it appears it should be!