Currently, due to a check in fetchItems() that bails if the new query type is equal to the current tab, when a user finishes a batch of images, the next batch will not load. We added this line to avoid duplicate queries running when the user switches tabs via URL fragment, and we still need a way to avoid this.
Furthermore, if a user switches tabs quickly, they might see the batch for the wrong tab for a short time before it's replaced by the batch for the correct tab. This means we need to ensure cardstacks are only added to the element of their respective tab, and they can't be unintentionally shown on the wrong tab.
Steps to Reproduce:
- Go to suggested tags and skip through all images in a batch
- You'll see a blank tab because fetchItems() bails early
- Click on the user tab then quickly back to the popular tab. You'll see the user results for a second before the popular results replace them
Expected Results:
- When user finishes a batch of images, the next one loads and is displayed
- User can switch tabs quickly because results are tied to their respective tabs
- User can switch tabs via URL fragment without seeing duplicate query results