-
Notifications
You must be signed in to change notification settings - Fork 28
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
Pagination (especially on topic pages) #76
Comments
there is already an ocular addon in sa which includes reaction buttons |
this is something i would really like to implement. it might be possible, considering scratchdb has the all of the information i might need to have paginated topic pages, but something i want to implement alongside this is to be able to find a single post in a topic, but i dont think scratchdb provides the post number which i would be able to use to find what page it's on. i'll speak to lefty. |
hey @towerofnix, how is this implementation? https://ocular-rewritten.jeffalo.net/search?q=ocular&sort=newest, i had to make some annoying compromises due to scratchdb things (page numbers are limited for users and queries with over 200 pages), but i think it works better than the "load more" stuff currently. what do you think? |
That looks awesome! It's surprisingly quick, too—switching between 34 or 7 or 125 pages of results on new queries that wouldn't have been (super extensively) cached is snappy, only like a second to fetch and display the results. It's kinda hilarious seeing 200 page links in a row. ...That's what Scratch does too though. As long as this doesn't put too much technical strain/liability on the codebase or system, this is really great! Thank you for your time putting it together and making it work! |
awesome. thanks! you're right - simplifying the page numbers when there are so many is probably a good idea. just couldn't wrap my head around the algorithm last time i was working on it :) it shouldn't be that hard though, i can try again sometime soon. the pagination is part of a big rewrite i started a while back, i haven't had much time to work on it, but when it's done it will replace ocular.jeffalo.net. :) |
Is your feature request related to a problem? Please describe.
Currently most pages use a "Load More" button; this is pretty standard for search pages and the like (where you can customize the sort order), but for topic pages, it makes it difficult to navigate to the most recent entries or find ones halfway through a topic, especially if it's got a lot of posts.
Describe the solution you'd like
IMO, Scratch's basic 20-per-page pagination works pretty well! My suggestion is adding something like Scratch's page selector to the top and bottom of topic pages:
Describe alternatives you've considered
There are workarounds right now besides just clicking Load More a bunch of times; you can enter
+topic:446450
and choose the "newest" option from the sort dropdown to get all the latest posts in a thread. This requires typing out that code manually and clicking a dropdown, though; it's not super usable!Another alternative is creating an SA addon which integrates stuff like reaction buttons right into Scratch, but I'm sure that's already under consideration, and this would help with anyone who browses via the Ocular site anyway :P
Additional context
I haven't looked deep, but it might require a bit of work shifting how the backend works, so with the workarounds available I wouldn't personally place this request at a super high priority. Still, it's a valuable feature to make the Browse feature a bunch more usable!
The text was updated successfully, but these errors were encountered: