szurubooru
szurubooru copied to clipboard
Address comments from PR #403 Improve pool navigation/browsing
This takes the commits introduced in PR #403, which appears to be abandoned by the contributor, and applies the suggestions in that PR and updates the code to fix merge conflicts and broken tests that occurred as a result of master branch diverging from the PR. It includes the original changes from that PR. In addition, I re-arranged the Dockerfile for server to make caching a little easier (mostly, doing package installs prior to any COPYs to stop 0.5GB images from being generated on every code change), and to add a default BUILDPLATFORM build arg so that it does not need to be explicitly passed via buildargs. Those additions can be pulled out and discussed separately (or wholesale rejected) but I figured I'd keep them in this PR and see if they would be helpful to others.
In addition, this includes the following changes, copied verbatim from PR #403:
Related to #380.
-
Implements
sort:pool
for post searches, which will sort the results by the order defined by thepool:
named token in the same search query. -
Modifies the previous/next post order for the post view if a
pool:
named token is in the current query. -
Adds a grid-based view for the pools list page, showing up to the first three posts in each pool.
-
Implements pool navigators. They allow navigating to the first/last/next/previous post in each pool the post belongs to. The current pool active in the search query will get bolded/placed at the top.
My fork includes a bunch of styling fixes for pool thumbnails, a bugfix for pool navigation, and a performance optimization for nearby posts serialization.
Filter for commit messages containing pool.
Oh, nice! @po5 does that render the changes in this branch redundant? I can close this PR if that's the case, no need to pollute an already dense PR list.
I haven't submitted my pool-related changes yet so feel free to cherry pick.