retype icon indicating copy to clipboard operation
retype copied to clipboard

Manual ordering of books

Open xSamel-The-Camelx opened this issue 6 months ago • 1 comments

My books in shelf view are out of order and I would like to be able to manually move them around please.

xSamel-The-Camelx avatar Oct 14 '25 09:10 xSamel-The-Camelx

This brings into the picture the whole idea of sorting. Currently the order is just the order they are encountered in os.walk. I remember in other programs they have a dropdown with different ways to sort, one of which being manually, and as you switch between them it changes. I don't really want to have a stateful dropdown.

Maybe a pinning system, kind of like the Windows taskbar, where a program can be pinned or not. So if you drag a book cover it will pin it in place, and to indicate this we could have a different background colour or a pin icon. We'd also need a way to undo the pin, potentially in a right-click context menu.

If a user wants the books to be ordered in a particular algorithmic order, it would be annoying for them to have to do the pins. So in addition in customisation dialog we could have a way to select the sorting algorithm used (if any), which will apply when you save and on launch. But I guess the pins will persist in the same position. There could be a "clear pins" button there I guess.

Implementation steps could be:

  • [ ] Drag and drop functionality to reorder, no persistence
  • [ ] After manual reorder of an item, put in save data "pin pos" with index order the book was dragged into
  • [ ] On shelf view populate, attempt to take into account this "pin pos" data (persistence)
  • [ ] Shelf view cover right-click menu with just an "open book" action to start with
  • [ ] "Undo pin" action in cover right-click menu for books that are pinned, "pin" if not (to pin it in place)
  • [ ] Visual indication that a book is pinned
  • [ ] "Clear pins" button in customisation dialog
  • [ ] Sorting algorithm choice in customisation dialog, apply on save if changed
  • [ ] On shelf view populate, sort it according to the sort algorithm the user selected

Do tell me if I'm overcomplicating this and you can think of a simpler way :-p

plu5 avatar Oct 15 '25 02:10 plu5