Aerolab / booom

Dribbble Enhancement Suite
MIT License
51 stars 3 forks source link

Retain paging position/history states in url #16

Open oryan opened 9 years ago

oryan commented 9 years ago

Firstly, I love the extension. There is only one little thing that irks me every time I use it. Currently the infinite loading makes it hard to return to your previous position if you use the browser's back button. For example I scroll down a few pages see something awesome and click into the page to view it. On hitting back I am returned to the top of the search results and I have to scroll and try to find my previous position.

My way of dealing with it is right clicking and opening each shot in a new tab. But that quickly gets frustrating. Especially, if I forget and then lose my place in the results.

Dribbble's native pagenation scheme uses query strings to navigate. Your extension works by default on a page with the query string present. My suggestion would be to update the url and history state to reflect the current page as the infinite loader updates the page content. This way a user can navigate back in the history stack and when the url loads the previous position is mostly maintained.

Obviously this would create a situation where the user may want to "scroll back up" through the list but the previous page's content is no longer there. On a few sites I've worked on in the past we have solved that by adding a small context banner that allows them to "load previous items."