omorphia icon indicating copy to clipboard operation
omorphia copied to clipboard

<Pagination> with count < 5 is broken

Open CodeF53 opened this issue 1 year ago • 0 comments

Describe the bug

Pagination with count set between 2 and 5 is broken, producing illegal/illogical page numbers

pagination with a count of 2, gives options (1, 2, 3, 4, 5, spacer, -2, 0, 1, 2)

pagination with a count of 5, gives options (1, 2, 3, 4, 5, spacer, 5)

Steps to reproduce

  1. git clone [email protected]:modrinth/omorphia.git
  2. install packages with manager of choice bun i
  3. run docs dev bun docs:dev
  4. change :count in docs/components/pagination.md from 100 to 2

Expected behavior

When given a count of < 7, the paginator should display 1, 2, 3, ..., count

Additional context

replacing const pages = computed(...) with the logic found in knossos or should work.

Honestly Knossos shouldn't have it's own implementation the pagination component

CodeF53 avatar Jun 22 '24 02:06 CodeF53