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 |
mountiny
left a comment
There was a problem hiding this comment.
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:
FromfilterShow morebutton allowing him to load more itemsShow morebuttonScenario B:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)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.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