-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: Reduce amount of items displayed per page of SelectionList #65846
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: Reduce amount of items displayed per page of SelectionList #65846
Conversation
…34-reduce-amount-of-items-per-page-of-selection-list
…34-reduce-amount-of-items-per-page-of-selection-list
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid.movAndroid: mWeb Chromemweb-chrome.moviOS: HybridAppiOS.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop-1.movdesktop-2.mov |
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.
Tests well, LGTM 🚀
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.
Thank you! Noted in DM, but can you add explicit test to the PR so QA can test the fact the selected element outside of the first page is rendered?
@mountiny I've added one more scenario to the QA steps |
✋ 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.1.81-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.1.81-7 🚀
|
Explanation of Change
Changed CONST that was used in BaseSelectionList to indicate how many items we should initially render. Decreased it to 50 to make it more in-line with usual amount of items displayed per page of paginated content.
Fixed a case where user loaded more items on the list and selected one of the items that wasn't initially loaded. Previously it was resetting the set page.
When selected item is further in the list than the initially loaded 50 items we load up all pages up to the page including this item
Fixed Issues
$ #65634
PROPOSAL:
Tests
Same as QA steps
Offline tests
QA Steps
Note:
All of the selection lists in the project will now initially load 50 items instead of 500. Most notable cases are long list that are in the app, ie: selecting users in filters, Tags list or countries list when you add address for the account. Verifying that one of the lists works correctly should give us confidence that the remaining lists work without any issues as well.
Precondition: Be on account that has many reports from 100+ different users
Scenario A:
From
filterShow more
button allowing him to load more itemsShow more
buttonScenario B:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.native.mov
Android: mWeb Chrome
android.web.mov
iOS: Native
ios.native.mov
iOS: mWeb Safari
ios.web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov