25

Seems inconsistent:

prev 1 .. 5 6 [7] 8 9 .. 390331 next
prev 1 .. 4 5 [6] 7 8 .. 390331 next
prev 1 .. 3 4 [5] 6 7 .. 390331 next
prev 1    2 3 [4] 5 .. 390331 next
5
  • 1
    ​​​​​​​​​​​​​​​I think it's by design, not a bug. However, there's also no link to page 1416 - 2 on page 1416.
    – Remi Guan
    May 20, 2016 at 6:04
  • 1
    @KevinGuan "four nearest pages + first + last" is the rule I've thought of, I just don't see any reason not to follow it on some pages.
    – Leonid
    May 20, 2016 at 6:29
  • 7
    No repro in ie6 i.stack.imgur.com/Mgqut.jpg
    – user1228
    May 20, 2016 at 16:43
  • How often are specific pages linked to? Don't they change so fast it's really irrelevant? Why not just have first/prev/next/last with a page indicator? At least for the questions list that seems workable, though I'm one of those weirdos who likes infinite scrolling (let me scroll until I get bored).
    – Cᴏʀʏ
    May 20, 2016 at 16:44
  • 1
    Helps save bandwidth.
    – jotik
    May 21, 2016 at 13:03

1 Answer 1

3

Since we always have a link to the first page, and we always show 5 adjacent pages, this is, in fact, consistent.

There is no gap between page 1 and 2, so to show the 5 adjacent pages, we go up to 5 when on page 4.

7
  • Okay, I understand. It is just weird that you can leap two pages from anywhere but one page.
    – Leonid
    May 20, 2016 at 11:48
  • 1
    @Leonid two pages really as you will see the same issue when you are are 3 pages away from the end.
    – Joe W
    May 20, 2016 at 13:18
  • 30
    Hm... from a certain point of view, it is consistent. Still, the rule is confusing and complicated. Showing a link to the first and last page, as well as to all pages two before to two after the current page, eliminate duplicates, that would be simpler and more useful. May 20, 2016 at 13:23
  • @Deduplicator what do you do for pages 1, 2, last, last -1?
    – Joe W
    May 20, 2016 at 14:34
  • 6
    @JoeW I think the idea is as follows: If n <= 6, show all pages. For i=1 to 3, show 1 to 5 and last. For i=n-2 to n, show 1 and n-4 to n. Otherwise, show 1, i-2 to i+2, and n. May 20, 2016 at 19:06
  • @DamianYerrick now could you write that in Lisp? Having trouble following... May 23, 2016 at 4:17
  • 2
    @Qix (insert-dots (remove-duplicates (merge (list-n-nearest-between 4 page 1 total) (list 1 total))))
    – Leonid
    May 27, 2016 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .