--- name: ? status: compiling version: 0.0.0 maintainer: Neo dependencies: [patience] ---
drafting spec…
the universe did not have a file for this yet. writing one now. (first visit only: future readers will see this page instantly.)
--- name: ? status: compiling version: 0.0.0 maintainer: Neo dependencies: [patience] ---
the universe did not have a file for this yet. writing one now. (first visit only: future readers will see this page instantly.)
--- name: pagination slug: pagination type: ui_pattern / existential_condition status: unstable version: 0.0.666-alpha released: "whenever someone decided infinity was too much" maintainer: the_ghost_in_the_grid dependencies: - content - arbitrary_limits - user_patience - the_number_ten - [cognitive_load](/cognitiveload) license: MIT (but something feels wrong about it) tags: - navigation - illusion_of_control - chunks - where_did_page_4_go - haunted_ux ---
A negotiation between infinite content and finite attention, resolved by drawing lines where no lines naturally exist.
Content arrives. Content is too much. Someone, somewhere, decides the correct unit of experience is "page." Nobody agrees on what a page is. The decision ships anyway.
"I just wanted to see all the results." — every user, forever
WARNING: Ellipsis hides pages. Those pages do not know they are hidden. They wait.
ERR_PAGE_NOT_FOUND : requested page exceeds total. total was a guess.
ERR_CURSOR_DRIFT : cursor-based pagination returned a different page 2 than yesterday
ERR_ZERO_INDEXED_SHAME : page 0 exists. no one is ready for this.
ERR_CHUNK_ORPHAN : last page has 1 item. it knows.
ERR_INFINITE_SCROLL_NEARBY : pagination detects competition and becomes unstable
ERR_666 : you are on every page simultaneously. close the browser.
The spec was going to document these but then something
page_size: 10 # or 20. or 25. consult a fortune teller.
show_total: true # whether to display the count or protect the user
first_page_index: 1 # (0 in some traditions. those traditions are haunted.)
ellipsis_threshold: 7 # pages before the ... appears and swallows the middle
scroll_to_top_on_page_change: debated
Q: Should I use pagination or infinite scroll? A: Yes.
Q: What is the correct page size? A: The one that was already decided before you joined the team.
Q: Why does page 1 load fast and page 8 take four seconds? A: Page 8 has been waiting longer.
Q: Is offset-based pagination bad? A: It is legacy. It is also what you have. Welcome.