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

native: scroller post loading #3516

Merged
merged 9 commits into from
May 16, 2024
Merged

native: scroller post loading #3516

merged 9 commits into from
May 16, 2024

Conversation

dnbrwstr
Copy link
Collaborator

@dnbrwstr dnbrwstr commented May 14, 2024

This PR implements ""intelligent"" post loading in the scroller, which should allow us to initialize the scroller at any post and correctly load content before + after. In order to do that it implements windowing -- tracking which cached posts are contiguous so that we know whether there's a gap with missing posts.

It's still missing scroll-to-bottom, and scrolling to a post in history from inside the channel (clicking on a ref, or on a search result) isn't yet implemented. It may be slow or mushy in some situations -- further work should improve that.

@dnbrwstr dnbrwstr marked this pull request as draft May 14, 2024 19:03
@dnbrwstr dnbrwstr requested review from patosullivan, latter-bolden and alecananian and removed request for patosullivan May 16, 2024 17:14
@dnbrwstr dnbrwstr marked this pull request as ready for review May 16, 2024 17:14
@dnbrwstr dnbrwstr changed the title [draft] native: scroller post loading native: scroller post loading May 16, 2024
Copy link
Member

@patosullivan patosullivan left a comment

Choose a reason for hiding this comment

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

Looks good, just two questions

packages/shared/src/debug.ts Show resolved Hide resolved
packages/shared/src/store/sync.ts Show resolved Hide resolved
packages/shared/src/store/useChannelPosts.ts Outdated Show resolved Hide resolved
packages/ui/src/components/Channel/index.tsx Outdated Show resolved Hide resolved
dnbrwstr and others added 2 commits May 16, 2024 14:53
Co-authored-by: Patrick O'Sullivan  <patrick@osullivan.io>
@dnbrwstr dnbrwstr merged commit 320b317 into develop May 16, 2024
1 check failed
@dnbrwstr dnbrwstr deleted the db/post-loading branch May 16, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants