Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backward Paginate timeline by scroll #109 #186

Merged

Conversation

alanpoon
Copy link
Contributor

#109

Loading.mp4
  1. Set visibility for top_space when pagination is idle to true
  2. Clear it when done_loading is true
  3. Added send_pagination_request_based_on_scroll_pos function

Copy link
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I appreciate you working on this. I think there are a few issues with this approach, but it's a good start. I left some comments.

In addition, I don't see any place in the code where you're actually sending an action/update to the Timeline that informs it that pagination is actually occurring in the background, which is the condition during which we would want to make the TopSpace visible and show the loading message. That should be sent from the timeline's background async task that subscribes to pagination state updates.

src/home/room_screen.rs Show resolved Hide resolved
src/home/room_screen.rs Show resolved Hide resolved
@kevinaboos
Copy link
Member

So upon further inspection, I've realized that we need a complete rearchitecting of how we submit pagination requests and react to pagination responses. We don't actually need the pagination status task that subscribes to back pagination, because it gives us less info than the return value of a pagination function call itself.

Thus, I'm going to accept this PR as-is, and then refactor the pagination task handling shortly thereafter.

@kevinaboos
Copy link
Member

Another issue here (which is partly caused by our "backend" pagination architecture) is that pagination requests are getting fired off repeatedly (like hundreds per second) once you do hit the top of the timeline. Another issue is that because the portal list has scrolling momentum, if you use a finger or trackpad, you can hit the scroll position hundreds of times in a second, so it's also related.

@kevinaboos kevinaboos merged commit 18237da into project-robius:main Oct 11, 2024
1 check passed
@kevinaboos
Copy link
Member

I've addressed the various issues here in #194. Take a look at the solution and let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants