Make WorkspaceSettlementAccountPage use new SelectionList#72989
Conversation
Codecov Report❌ Patch coverage is
... and 1654 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| ), | ||
| alternateText: `${translate('workspace.expensifyCard.accountEndingIn')} ${getLastFourDigits(bankAccountNumber)}`, | ||
| keyForList: bankAccountID?.toString(), | ||
| keyForList: bankAccountID?.toString() ?? '', |
There was a problem hiding this comment.
Are you sure in both cases that keyForList won't be an empty string?
There was a problem hiding this comment.
In this case I think it's hard to find a better candidate for keyForList other than bankAccountID which can be undefined looking at the type. I could filter out eligibleBankAccounts which do not have bankAccountID (which looks like something that would be sensible), but it would change the logic that was before the migration, so instead I decided to keep it as it was.
I can't say that I'm 100% sure these won't fall back to empty strings of course, I was thinking that this is a type problem rather than data problem while making these changes - types are not narrowed down, but data should be there.
LMK what you think.
For the fallback in if (options.length === 0) I think this problem doesn't really matter
There was a problem hiding this comment.
Ahh okay I see, let's leave it like this then 👍
| initiallyFocusedOptionKey={paymentBankAccountID?.toString()} | ||
| listHeaderContent={ | ||
| initiallyFocusedItemKey={paymentBankAccountID?.toString()} | ||
| customListHeaderContent={ |
There was a problem hiding this comment.
I would extract this one, it's quite big
|
@dukenv0307 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] |
|
There are many duplicate hooks in |
After giving it some more thought I agree that what I did may have been an overkill. I moved the header to the main component and wrapped it into useMemo instead |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-11-03.at.22.36.49.movAndroid: mWeb ChromeScreen.Recording.2025-11-03.at.22.33.27.moviOS: HybridAppScreen.Recording.2025-11-03.at.22.37.41.moviOS: mWeb SafariScreen.Recording.2025-11-03.at.22.34.07.movMacOS: Chrome / SafariScreen.Recording.2025-11-03.at.22.30.30.movMacOS: DesktopScreen.Recording.2025-11-03.at.22.40.22.mov |
|
✋ 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/grgia in version: 9.2.43-0 🚀
|
|
@GCyganek testers were not able to see the bank accounts inside the settlement settings page if they add personal bank accounts via the wallet page, but business bank accounts (added from the workflow page) are seen, is this what's expected? |
|
I think that is expected cc @joekaufmanexpensify |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.43-2 🚀
|
Yeah that is expected. The test step in OP should have directed to add two business bank accounts from workspaces, because it's not possible to add them on the wallet page in NewDot yet (will be soon). It's only possible to add personal bank accounts there right now. |
|
Yeah, my bad, sorry for confusion, I'm updating the description now |
Explanation of Change
datavariable is refactored to allow auto-memoization by React CompilerFixed Issues
$ #72969 (parent: #65655)
PROPOSAL: N/A
Tests
WorkspacestabExpensify CardfeatureExpensify Cardtab > Add Expensify card to the workspaceWorkflowsscreen.Expensify Cardtab in your workspaceMore>SettingsSettlement accountto open the listOffline tests
QA Steps
Same as tests
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))npm run compress-svg)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
Screen.Recording.2025-10-20.at.14.27.18.mov
Android: mWeb Chrome
Screen.Recording.2025-10-20.at.14.28.53.mov
iOS: Native
Screen.Recording.2025-10-20.at.14.47.06.online-video-cutter.com.mp4
iOS: mWeb Safari
Screen.Recording.2025-10-20.at.14.38.39.mov
MacOS: Chrome / Safari
Screen.Recording.2025-10-20.at.14.21.38.mov
MacOS: Desktop
Screen.Recording.2025-10-20.at.14.23.56.mov