-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add pagination support to bookmark context #350
base: main
Are you sure you want to change the base?
Add pagination support to bookmark context #350
Conversation
- Implemented infinite scrolling with IntersectionObserver for better performance - Added pagination API endpoint support in the frontend - Updated BookmarkContext to support loading bookmarks in chunks as user scrolls - Created tests for the pagination functionality - Fixed compatibility with existing code and handling of tags/filtering 🤖 Generated with Claude Code Co-Authored-By: shayesdevel@gmail.com
Please fix the following behaviors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review behavioral feedback mentioned before the PR. Overall code looks very well planned, the observer needs to load the next page before the entire scroll to the bottom.
@@ -69,6 +69,12 @@ const api = { | |||
getAllBookmarks() { | |||
return this.execute("GET", "bookmarks", null, {}); | |||
}, | |||
// Get paginated bookmarks. | |||
getPaginatedBookmarks(page: number, size: number = 10) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
if (typeof IntersectionObserver !== 'undefined') { | ||
const observer = new IntersectionObserver(handleObserver, { | ||
root: null, | ||
rootMargin: '20px', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make this a little bit bigger because its not getting the next page until I am well scrolled down and it lags.
🤖 Generated with Claude Code
Co-Authored-By: shayesdevel@gmail.com
Issue number: resolves #
Checklist
What is the current behavior?
What is the new behavior?
Does this introduce a breaking change?
Other information