-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Client side pagination gap detection #41962
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
Client side pagination gap detection #41962
Conversation
c17801d to
51cddfe
Compare
dd901bf to
05738d6
Compare
05738d6 to
a995a19
Compare
7b3f3d2 to
0cd9f37
Compare
52130d2 to
8f39e39
Compare
roryabraham
left a comment
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.
The main piece of feedback I have is that I'd really love to see the Middleware generalized such that it's not really referencing reportActions directly. I think the way I set that up with API.paginate was looking pretty clean.
I might even say the same for the UI component. Would be great to have some business-logic-agnostic UI component like PaginatedList that leverages this pattern and then just make ReportActionsList a lightweight wrapper around that.
|
🎯 @ishpaul777, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #44874. |
mountiny
left a comment
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.
Seems like this is ready to go, amazing job pushing this ahead, any concerns about merging this as is?
src/types/onyx/Request.ts
Outdated
| }; | ||
|
|
||
| /** | ||
| * |
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.
+1 seems like we are missing the comment here
mountiny
left a comment
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.
Thanks
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.5-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.5-2 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
|
Hey @janicduplessis and everyone subscribed to this pagination PR. I think this newly discovered bug is related to these changes. Our backend seems to report a value of -1 to be invalid. Is a value of -1 necessary for the |
|
@roryabraham I think you worked on this part, do you know why this happens now? |
|
@Julesssss we didn't change the logic with |
|
I believe @iwiznia @danieldoglas were doing something around this default/ logic |
| const isJestEnv = process.env.NODE_ENV === 'test'; | ||
|
|
||
| const useTheme = process.env.NODE_ENV === 'test' ? realUseTheme : () => ({}); | ||
| const realReactNavigation = isJestEnv ? jest.requireActual<typeof ReactNavigation>('@react-navigation/native') : (require('@react-navigation/native') as typeof ReactNavigation); |
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.
Coming from #51108,
These changes broke storybook for components, Incase when isJestEnv is "false", there seems to be case of circular depency in importing of module @react-navigation/native we are importing the module in its mock itself.
Details
Listing out related or potentially related issues, won't move these into
Fixed Issuesunless we test and confirm:GetOlderActionscalls #41254Fixed Issues
$
PROPOSAL: https://docs.google.com/document/d/19xEEr0mY41cTio1lGgJ2F6vYCA5QH4Sj7hOMRZsj0Dc/edit
Tests
Offline tests
QA Steps
Test 1: Basic Navigation
Note: Links can be copied to any message and used in any order.
Test 2: Popup Navigation
Test 3: Cache and Logout
Test 4:
Notes:
Ensure the chat contains at least 150 messages. Initially, up to 50 messages are rendered. Navigating to the 70th message should allow further navigation up to the 150th message, even with gaps.
If bugs are found, confirm they are reproducible on another account, or provide credentials for debugging. Thsnks!
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop