Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: A more effective way to handle the number of books per page #480

Closed
Inquisitor-Ignotorum opened this issue Sep 17, 2024 · 4 comments
Assignees
Labels
fixed Fixed in develop or master, to be launched. tweak Adjustment to the code -- not a new feature, just minor mods/tweaks

Comments

@Inquisitor-Ignotorum
Copy link

Inquisitor-Ignotorum commented Sep 17, 2024

Configuration: Windows 10, Lute installed via pip

Hello. For a long while, I have, unfortunately, been troubled by the "number of books per page" feature of the "Home" and "Book Archive" screens. I always have more than 25 in use books in my "Home" screen collection (some due to studying different topics via the English language and some due to learning some foreign languages), so I am constantly forced to set the number of books per page to 50. I have also noticed that, after a small period of inactivity, the number of books per page will revert to the default of 25, even if the user does not clear the browser's cache. It feels that this situation is unnecessary and perhaps even a potential diminution of the quality of the user experience provided by your otherwise excellent software.

It seems that it would be perfectly fine to disable the "number of books per page" feature and to always show all books by default, both in the "Home" screen and in the "Book Archive" screen. Besides, I imagine (but I am willing to be corrected) that most Lute users would not be ultra-hardcore book worms like me, so they may have no need for the "number of books per page" feature due to only having a small number of in use books. As for the "Book Archive" screen, no matter how big a user's archive is, they would most likely only visit it once in a while, so it seems that it would be perfectly fine to also see all of the archive's books at once. Even with a large archive, the user can save time by using the search box at the top right of the screen or the list sorting options.

I think that it may be more beneficial to remove the "number of books per page" feature from the "Home" screen and from the "Book Archive" screen (or perhaps to temporarily disable it in order to gauge the reaction of other Lute users) because that would likely contribute to the enhancement of the user experience while also trimming down the code that must be maintained by the developer. Without wanting to be imposing, I also think that another possible benefit of this change is that it may be easier to eventually implement the proposed "re-order books by drag-and-drop" feature (#441) if the user's book collection is not separated into pages.

Your thoughts would be welcomed, because the above is just the opinion of one person who admires Lute and uses it a lot, and other people may have different thoughts on the same topic.

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

P.S. Being able to see the total number of books in the "Home" screen and in the "Book Archive" screen is nice, so it would be great if that part could be kept.

@Inquisitor-Ignotorum Inquisitor-Ignotorum changed the title Feature Request: A more effective way to handle the number of books per page Request: A more effective way to handle the number of books per page Sep 17, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Sep 17, 2024

Hey @Inquisitor-Ignotorum - thanks for taking the time to write this out. :-)

This one's a hard call. I've had cases where I've had a bunch of very small books, and for my sanity only wanted to see a handful at a time. I have no idea what others think though, and wouldn't want to impose the idea of "just show everything" on everyone, as you're the first to suggest this idea.

Some counter points:

  • re trimming down the code: really, it's negligible :-) given how it was implemented.
  • re drag-and-drop: I do like this idea, but I can't figure out how it would work if the user, say, sorts by any of the existing columns. It rapidly gets ugly, even if the drag-and-drop idea is pretty simple. Some people do sort by various columns, and there are requests to add other columns (% complete, last data read, etc) which make this harder.

The code uses a javascript library called datatables, which stores your table settings in local storage. It looks like I can set a stateDuration (https://datatables.net/reference/option/stateDuration), the current default appears to be just 2 hours (!), so I'll try setting it to 0 (per the docs, "The value 0 is a special value as it indicates that the state can be stored and retrieved indefinitely with no time limit."), and see if that persists. I'll let you know how it goes! 👋

@jzohrab jzohrab self-assigned this Sep 17, 2024
@jzohrab jzohrab added the tweak Adjustment to the code -- not a new feature, just minor mods/tweaks label Sep 17, 2024
@jzohrab jzohrab added this to Lute-v3 Sep 17, 2024
@jzohrab jzohrab moved this to In Progress in Lute-v3 Sep 17, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Sep 17, 2024

Also will add more than 50 to the "page size" drop down, for people who have piles of books :-)

@jzohrab
Copy link
Collaborator

jzohrab commented Sep 19, 2024

Setting the timeout to 0 appears to make your settings stick, so I'll merge that into develop and it will be in the next launch (out soon, I think).

@jzohrab jzohrab moved this from In Progress to Done in Lute-v3 Sep 19, 2024
@jzohrab jzohrab added the fixed Fixed in develop or master, to be launched. label Sep 19, 2024
@jzohrab
Copy link
Collaborator

jzohrab commented Sep 20, 2024

Launched in 3.5.3, should be ok for you now (I hope), thank you!

@jzohrab jzohrab closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Fixed in develop or master, to be launched. tweak Adjustment to the code -- not a new feature, just minor mods/tweaks
Projects
Archived in project
Development

No branches or pull requests

2 participants