Skip to content

(#1048) Replace Pagination With Infinite Scroll - #1152

Draft
TheRealDeLorian wants to merge 2 commits into
chocolatey:developfrom
TheRealDeLorian:infinite-scrolling
Draft

(#1048) Replace Pagination With Infinite Scroll#1152
TheRealDeLorian wants to merge 2 commits into
chocolatey:developfrom
TheRealDeLorian:infinite-scrolling

Conversation

@TheRealDeLorian

Copy link
Copy Markdown

Description Of Changes

Replace remote-source First/Back/Next/Last pagination with infinite scrolling.

  • Remove the pager controls from the remote package list.
  • Load the first batch of packages as before, then append more results as the user scrolls near the bottom.
  • Prefetch additional batches ahead of the viewport so later icons are ready before the user reaches the end of the currently loaded list.
  • Keep Chocolatey search and package mapping off the UI thread, and add tiles in small chunks, so scrolling stays responsive while more packages load.
  • Show a simple loaded / total status in place of the old page indicator.
  • Add unit tests covering prefetch, append, end-of-list, and reset-on-reload behavior.

Local "This PC" packages were already unpaged and are unchanged.

Motivation and Context

Previously remote package results used First/Back/Next/Last paging, so users had to step through pages to find software.

Issue #1048 originally asked for a configurable page size. Discussion on that issue preferred dropping pagination entirely in favor of infinite scrolling, which matches how most app stores and package manager UIs work.

This change replaces page navigation with a continuous list that loads more packages as the user scrolls, prefetching ahead so later batches are ready before the bottom of the list is reached.

Related: #1090

Testing

  1. Unit tests: RemoteSourceViewModelTests (7 passing), covering prefetch of two additional pages, append without clearing, short last batch / no further fetch, and reset after append.
  2. Manual GUI testing against community and other remote sources: scroll past the first loaded batch and confirm more packages appear without using pager buttons.
  3. Manual checks that search, sort, prerelease, all-versions, and refresh reset the list and start over from the top.
  4. Manual checks in both tile and list views, including that scrolling remains usable while later batches load in the background.
  5. Manual check of a small source that fits on one screen (no unnecessary extra fetch loop).

Operating Systems Testing

  • Windows 11

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?
  • All items are complete on the Definition of Done.

Related Issue

Fixes #1048

Previously remote package results used First/Back/Next/Last paging,
so users had to step through pages to find software.

Replace page navigation with a continuous list that loads more
packages as the user scrolls, prefetching ahead so later batches
are ready before the bottom of the list is reached.
Previously the initial remote package load waited on NuGet
Search()/$count (ListCount) and the outdated-package check before
dismissing the loading dialog. Against community.chocolatey.org the
count request can hang, leaving the UI stuck on Fetching packages.

Skip the total-count query during browse, close the loading dialog
as soon as packages are shown, and ignore stale or negative totals
so All Versions and normal browse stay responsive.
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.

More than 20 software titles on the Chocolatey GUI

1 participant