Between Shahyar, Pau and S, this is getting into good shape for Matt to work from. There are still a few questions that we need to figure out:
#1. Making the Jump behavior work properly
In the current version on flow-tests, jumping from the top of the page to topic #47 doesn't work properly. The header gets stuck at #10, and then you see a lot of topics jumping around as they get loaded. You never end up at #47. :) We need to get this part working before we tackle filling in the gap.
#2. What are we loading when the user jumps?
When the user jumps from the top to #47, are we loading #41-50, or #45-54, or something else?
Any option is fine, but we've mentioned several versions and I don't think there's a clear consensus on which one is correct.
#3. Can we have two in-progress loads at the same time?
Pau's model for how to anchor the user view makes a lot of sense. The behavior when you get to the loading indicator and then stop is very clear.
But what happens when the user scrolls past the loading indicator? There's already one load currently in progress. Can you have two going on at the same time?
For example:
User opens the page.
-- #1-10 are loaded.
User opens the ToC, and jumps to #47.
-- #45-50 loads, user is positioned at #47.
User scrolls up and sees the loading indicator.
-- #36-44 load begins processing as the user is scrolling up.
User scrolls past the loading indicator to topic #9.
-- Does #36-44 finish loading, or is that cancelled?
User scrolls back down to the bottom of topic #10.
-- Start another process to load #11-20? Can we have both #11-20 and #36-44 in progress at the same time?
This can continue getting more complex if the user then scrolls quickly to the bottom of the page (triggering the next infinite scroll) or uses the ToC to jump to #27, in the middle of a gap.
The question is: Do we allow two in-progress loads at the same time, or do we cancel one if the user behavior triggers a second?