socialgenomics / discover-frontend

Ember frontend for Repositive discovery platform
0 stars 0 forks source link

[B] - DIS-325 - Properly reset the infinite-scroll #1045

Closed leojpod closed 6 years ago

leojpod commented 6 years ago

@cwhicher this fixes the bug but we can do better than that!

When transitioning away from the requests listing page, we could store which ID 's been clicked and then when going back to the request we could scroll back to it!

Note: the requests page is behaving differently depending on how you navigate. If from the requests page you go to a specific request then next time you go to the requests page, they will be loaded up to where you left (e.g. if to select your request you had to go to "page 3" then it will reload up to page 3). Whereas if you click on any other route transition then the loading will be reset (only page 1 will be loaded).

Ideally and we may think about doing that, we should reset the offset whenever the user leave the "block" of routes requests/request.details. By that I mean that it would be nice to reset the offset for the requests page everytime the user step away from the requests listing page or the request details one. Does it make sense? (I don't know yet how we could do that though).