-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(pagination): smart pagination #479
Conversation
PocketKit: Coverage: 75.59
Sync: Coverage: 88.96
Generated by 🚫 Danger Swift against 33faed6 |
// | ||
// File.swift | ||
// | ||
// | ||
// Created by Daniel Brooks on 3/9/23. | ||
// |
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.
update with other Source Code Form
header?
|
||
import Foundation | ||
|
||
struct SyncConstants { |
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.
awesome! maybe we want to add Search constants here too in the future
@@ -199,6 +198,9 @@ class FetchSavesTests: XCTestCase { | |||
|
|||
func test_refresh_whenItemCountExceedsMax_fetchesMaxNumberOfItems() async throws { | |||
var fetches = 0 | |||
let pages = Int(ceil(Double((SyncConstants.Saves.firstLoadMaxCount - SyncConstants.Saves.initalPageSize) / SyncConstants.Saves.pageSize))) + 2 |
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.
shall we add tests for Archive as well?
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.
Looks good @bassrock , the log reported what you say in the description!
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.
logs look good, I see initial 15 and subsequent 30. a couple of comments, but non blocker!
1b11869
to
a4e41fb
Compare
60348ef
to
a52b7b7
Compare
Summary
References
Implementation Details
Chose 500 items for now, will align with @nzeltzer and leadership later on for our launch size.
I also updated our large lists to have new data, but didn't change the data within. I want to find a tool to do that for us instead of sitting manually doing that.
Test Steps
PR Checklist:
Screenshots