Commit Graph

7 Commits

Author SHA1 Message Date
evazion
363cf2014b views: fix deprecated calls to ViewComponent#with_variant. 2022-04-13 00:18:53 -05:00
evazion
c1a1741d20 posts: add z=N URL param to searches and tag lists.
Add a `z=N` param to the URL when doing a search from the search box, or
when clicking a link in the tag list. This is to gather data on how
often the links in the tag list are used, and whether it's more common
to click tags in the tag list or to perform searches manually.

This is temporary and will be removed when enough data is collected.
2022-01-12 10:36:14 -06:00
evazion
55d00fc40c paginator: fix showing page 5000 when page count is unknown
Fix a bug where if you did a slow search that took too long to calculate
the page count, and you had 200 posts per page, then we would show page
5000 as the last page of the search.

This was because we were artificially returning 1,000,000 as the post
count to signal that the count timed out, but at 200 posts per page this
would show 5000 as the last page of the search.
2021-09-08 18:33:28 -05:00
evazion
07e23204b6 rubocop: fix various Rubocop warnings. 2021-06-17 04:17:53 -05:00
evazion
981d56c97c paginator: fix switching to sequential pagination.
Fix a bug where the paginator didn't correctly switch to sequential
pagination when reaching the page limit.
2021-02-18 19:01:45 -06:00
evazion
4e6dff782d paginator: fix page 1 shown twice in empty searches.
Fix a bug where page 1 was shown twice (once for the current page, and
once for the last page) in searches that returned 0 results.
2021-02-18 18:55:27 -06:00
evazion
c1805cc4e0 views: factor out paginator component.
* Refactor the paginator into a ViewComponent.
* Fix inconsistent spacing between paginator items.
* Fix a bug where the sequential paginator generated the wrong next /
  previous page links in the <link rel="{next|prev}"> tags in the <head>.
* Always include the final page as a hidden html element, so that it can
  be unhidden with custom CSS.
* Make it easier to change the pagination window.
2021-02-18 02:47:21 -06:00