fix: remove other occurrences of ShowMoreButton and the component#69599
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-09-03.at.17.56.53.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-09-03.at.18.01.22.mp4MacOS: Chrome / SafariScreen.Recording.2025-09-03.at.17.52.12.movMacOS: Desktop |
| </> | ||
| } | ||
| onEndReached={onEndReached} | ||
| onEndReached={onEndReached ?? incrementPage} |
There was a problem hiding this comment.
Inside the incrementPage function, we can use condition flattenedSections.allOptions.length > CONST.MAX_SELECTION_LIST_PAGE_LENGTH * currentPage; to increase the page value. Currently, it is increasing irrespective of there is more data or not on scrolling the end of the list.
There was a problem hiding this comment.
ok, I will look into that
trjExpensify
left a comment
There was a problem hiding this comment.
Nice improvement to remove the "show more" where we don't need it for pagination. CC'ing @Expensify/design so this is on your radar too for vis!
|
Nice, I dig it 👍 |
| const incrementPage = () => setCurrentPage((prev) => prev + 1); | ||
| const incrementPage = useCallback(() => { | ||
| // Calculate total options from sections | ||
| const totalOptions = sections.reduce((total, section) => total + (section.data?.length ?? 0), 0); |
There was a problem hiding this comment.
Can't we use flattenedSections.allOptions here as it is already available and used earlier here https://github.com/Expensify/App/pull/69599/files#diff-750b08e6eebe347cd7ad8d106d3ea0192256cbd6217b8a97618239ee76b3404cL319
|
✋ 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.2.9-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.11-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.2.12-4 🚀
|
Explanation of Change
Fixed Issues
$ #68866
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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: mWeb Chrome
iOS: Native
Screen.Recording.2025-09-02.at.09.48.59.mp4
iOS: mWeb Safari
Screen.Recording.2025-09-02.at.09.51.12.mp4
MacOS: Chrome / Safari
here I'm comparing the changes with staging (in the 2nd half of the film)
Screen.Recording.2025-09-02.at.09.34.18.mp4
MacOS: Desktop
Screen.Recording.2025-09-02.at.12.11.03.mp4