Conversation
- better detection for running out of records - will load all items with quick look next page - more responsive interface
demiankatz
left a comment
There was a problem hiding this comment.
@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
left a comment
There was a problem hiding this comment.
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!
Query for the next batch of results when we have one page or less hidden.
I forget the term Demian used for this, so I'm going with "forward loading" until I'm reminded.