todo_trek icon indicating copy to clipboard operation
todo_trek copied to clipboard

Bug when scrolling backwards and then forward in infinite scroll

Open woodward opened this issue 1 year ago • 0 comments

Hi, Chris!

Thank you for releasing todo_trek; it's a really cool application, and is an excellent learning tool for all of us in the LiveView community.

I encountered a bug when scrolling backwards and then forwards with the infinite scroll in my own application, and was able to reproduce it in todo_trek (I'm essentially re-implementing infinite scroll just like it's done in todo_trek in my own app - thank you for the awesome example). I've created a fork of todo_trek whose only difference is it prints out the ActivityLog.Entry.id at the start of each log entry to highlight the problem and so the problem can be seen more easily. To reproduce the bug:

  1. Git clone my fork of todo_trek

  2. Create some activity log entries, either programmatically or via some activity in the app; I see the problem with 150 entries in my local app, but I think you'll probably see the issue with anything more than 80+ entries

  3. Scroll backwards to the beginning of time

  4. Now scroll back upwards. Note how the activity IDs go from 57, 58, 59, 60, and then jump to IDs 2, 3, 4, 5 ...

Here's a little screen capture movie which shows the issue in action (at second 35 of the 40 second video).

I'm not sure if the problem is in todo_trek, or in the underlying LiveView code, but my thought is you would probably quickly know what the issue is.

Thank you very much for your help with this, Greg

woodward avatar Jun 24 '23 20:06 woodward