rwieruch / favesound-redux

🎶 A SoundCloud Client in React + Redux running in production. Live Demo and Source Code to explore React + Redux as a beginner.
http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/
1.59k stars 249 forks source link

Infinite scroll only works if there are enough results to fill the screen (and create a scrollbar) #84

Open ohadschn opened 6 years ago

ohadschn commented 6 years ago

Say I filter my feed by something (text or mix/track) and few (or no) results come up.

If there aren't enough results to fill the current screen and create a scrollbar, I can't invoke infinite scrolling to try and load more.

Perhaps a manual "load more" button would be the easiest way around this.

chriszhangusc commented 6 years ago

Hi @ohadschn, could you please provide the case where you can not load more content? I can't reproduce it.

ohadschn commented 6 years ago

Sure:

  1. Go to the main site and put drumcode in the search filter. For me it finds 3 results.
  2. Since there is no scrollbar (only 3 results), you can't scroll down to load more.
  3. Now clear the filter, scroll down (invoke infinite scroll a few times), and put drumcode in the filter again
  4. Note how you have more results now. Ideally, you should have been able to invoke the infinite scroll even when you only had 3 results.

This also happened to me when I filtered my home feed for mixes because I had too many reposts of regular tracks on my feed. So I had to cancel the mix filter, scroll down a few times, then bring it back, and possibly repeat that until I had enough mixes to overflow the on-screen list and create a scrollbar.

The point is, it doesn't make sense IMO for the ability to scroll infinitely to be dependent on the existence of a scrollbar (which is dependent on your zoom level, window size, etc).