Skip to content

Improve ordering#54

Open
LilianBoulard wants to merge 2 commits intofunmaker:masterfrom
LilianBoulard:impl-better-ordering
Open

Improve ordering#54
LilianBoulard wants to merge 2 commits intofunmaker:masterfrom
LilianBoulard:impl-better-ordering

Conversation

@LilianBoulard
Copy link
Contributor

@LilianBoulard LilianBoulard commented Jan 10, 2026

Addresses #28

Second commit is a fix for the count calculation, which is bugged on main (top-right number sometimes shows wrong result count, eg when filtering by rating).

I have not thoroughly tested this with comics/mangas, as I don't use Hybooru for that. For my use-case (images and videos exclusively) it does work as intended and is nice to have.
One thing that could probably be improved is the placement of the previous/next control, right now it's on the sidebar, which is fine for horizontal screens, but might be annoying on mobile in some cases ; will have to get some readers' feedback on that!

image

@LilianBoulard LilianBoulard mentioned this pull request Jan 11, 2026
@funmaker
Copy link
Owner

funmaker commented Feb 4, 2026

Hi, thanks for PR. I will go through it and test it on large databases, but it might take few more days.
Since there is multiple things going on and this is a feature I was planning for some time, I hope you don't mind I rewrite some parts of it to better fit what I had originally in mind instead of ping-ponging with reviews.

One thing I am not certain about is the navigation buttons and related additional complexity. Isn't this feature redundant if we already have popup gallery? It already leverages automatic scrolling to fetch new images as you go through it, exist on page with results(its relation to search query is more obvious), supports keyboard, mouse and has good mobile support(although some bug prevents you from hiding the upper shadow, I will have to fix it later). I'm more in favor of improving the gallery mode if necessary instead of copying some of its functionality to post page itself. I think manga people would enjoy being able to change the direction of the gallery, including some sort of continuous scrolling/strip mode, but that's for another issue.

I will also look into using custom collations(natural sorting) and indexing that could speedup this multi level sorting with numeric values. I think this sort of CASE statement could be not that fast for larger databases since sorting needs to happen for the entire result set IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants