Skip to content

feat: add minPageSize option to control query page size#64

Merged
arv merged 1 commit into
mainfrom
arv/min-page-size
Jul 13, 2026
Merged

feat: add minPageSize option to control query page size#64
arv merged 1 commit into
mainfrom
arv/min-page-size

Conversation

@arv

@arv arv commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 13, 2026 11:24
@arv arv enabled auto-merge July 13, 2026 11:25
@arv arv added this pull request to the merge queue Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new minPageSize option to the core virtualizer so consumers can set a lower bound for query page size (derived from viewport size), and documents/tests the behavior.

Changes:

  • Introduces minPageSize to VirtualizerOptions and uses it when computing pageSize.
  • Initializes #pageSize from the configured minimum and keeps the existing “monotonic growth” behavior.
  • Adds unit tests and README documentation explaining how/when to tune page size for tall rows.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/core/virtualizer.ts Adds minPageSize option and uses it as the page-size floor in #updatePageSize.
src/core/virtualizer.test.ts Adds tests covering default/min/even rounding behavior for minPageSize.
README.md Documents how page size is derived and when to adjust minPageSize.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/core/virtualizer.ts
Comment on lines +1019 to +1022
#minPageSize(): number {
const min = this.#options.minPageSize;
return min === undefined ? MIN_PAGE_SIZE : makeEven(Math.max(2, min));
}
Merged via the queue into main with commit 55ee139 Jul 13, 2026
10 checks passed
@arv arv deleted the arv/min-page-size branch July 13, 2026 11:29
@arv arv requested a review from 0xcadams July 13, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants