Skip to content

Conversation

@crhallberg
Copy link
Contributor

Query for the next batch of results when we have one page or less hidden.

  • better detection for running out of records
  • will load all items with quick look next page
  • more responsive interface

I forget the term Demian used for this, so I'm going with "forward loading" until I'm reminded.

- better detection for running out of records
- will load all items with quick look next page
- more responsive interface
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

@crhallberg, it looks like there are some minor eslint issues that need to be addressed to make the build happy.

As for what I would call this feature, I do feel like I used some useful name in the past, but now I can't remember what it was either! This is probably not what I said before, but "lookahead loading" might be a good name for it.

@demiankatz demiankatz added this to the 11.1 milestone Dec 3, 2025
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Also, I've found a useful way to test the edge cases here. It seems like things are improved but not 100% correct yet.

Using the standard test environment, edit channels.ini with these changes:

  • cache_home_channels = false
  • in [provider.facets.home], itemsPerRow = 2 and maxBatchSize = 8

When you go to the default Channels home page, the first channel should be "Topic: Research" which should contain 16 records (you can confirm this using the "show as search results" link in the channel options). Thus, with the above settings, we expect there to be exactly two batches loaded from the server, with no remainder -- so it's good for testing edge cases.

With these settings, the dev branch only gives me 10 of the 16 results before giving up when I use the "more" button (and I can only navigate through 8 using the quick look next button).

On this branch, I can get through all 16 records using the quick look next button, but if I use the "Load more items" button in the channel itself, it gives up after retrieving only 14. Hopefully that's not too hard to fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants