[Internal QA] Expensify Card feed selector#59887
Conversation
|
@dominictb 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] |
|
@koko57 Please align the vertical center two buttons
|
| <CaretWrapper style={styles.flex1}> | ||
| <Text style={[styles.textStrong, styles.flexShrink1]}>{feedName}</Text> | ||
| </CaretWrapper> | ||
| {children} |
There was a problem hiding this comment.
For displaying RBR, let's introduce a new prop called shouldShowRBR. And at this time I think we can remove children element
|
Should we initialize COLLECTION.LAST_SELECTED_EXPENSIFY_FEED value? Currently, this value will be null until users select another Expensify Feed. I think we need to set a default value for LAST_SELECTED_EXPENSIFY_FEED to |
no, I don't think it's necessary - we always fallback to the workspaceID or fundID when available |
| } | ||
|
|
||
| function updateSettlementAccount(workspaceAccountID: number, policyID: string, settlementBankAccountID?: number, currentSettlementBankAccountID?: number) { | ||
| function updateSettlementAccount(domainName: string, workspaceAccountID: number, policyID: string, settlementBankAccountID?: number, currentSettlementBankAccountID?: number) { |
There was a problem hiding this comment.
Why do we need to change this function?
| onBackButtonPress={() => Navigation.goBack()} | ||
| > | ||
| {!shouldUseNarrowLayout && isBankAccountVerified && getHeaderButtons()} | ||
| {!shouldShowSelector && !shouldUseNarrowLayout && isBankAccountVerified && getHeaderButtons()} |
There was a problem hiding this comment.
Let's move isBankAccountVerified check to getHeaderButtons function to avoid duplicated code
There was a problem hiding this comment.
no, if we move it this View wrapper will be displayed <View style={styles.ph5}>{getHeaderButtons()}</View>
|
|
@DylanDylann we don't initiate the laste selected feed with value for company feeds - we fallback to the default feed instead, so I did it similarly for Exfy Card feed |
|
@koko57 Prettier check failed |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-14.at.15.39.31.movAndroid: mWeb ChromeScreen.Recording.2025-04-14.at.15.25.04.moviOS: NativeScreen.Recording.2025-04-14.at.15.27.44.moviOS: mWeb SafariScreen.Recording.2025-04-14.at.15.24.48.movMacOS: Chrome / SafariScreen.Recording.2025-04-14.at.15.22.05.movMacOS: DesktopScreen.Recording.2025-04-14.at.15.23.09.mov |
|
@DylanDylann prettier fixed |
puneetlath
left a comment
There was a problem hiding this comment.
Mainly some minor comments from me. Should we add some UI tests for this functionality?
Also, does this selector show up if there is a workspace feed and a domain feed? Or only if there are domain feeds? I was trying to test locally
|
@puneetlath All changes applied! What UI tests do you mean? The feed selector is always shown when is more than one feed - no matter if there are 2+ domain feeds or a workspace and a domain feed |
I didn't have anything specific in mind. Just wondering if there is anything here that we can add tests for. All good if not. |
Co-authored-by: Puneet Lath <puneet@expensify.com>
@puneetlath no, I don't think they are necessary here |
|
✋ 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/puneetlath in version: 9.1.29-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.29-10 🚀
|
|
|
||
| const getHeaderButtons = () => ( | ||
| <View style={[styles.w100, styles.flexRow, styles.gap2, shouldUseNarrowLayout && styles.mb3]}> | ||
| <View style={[styles.flexRow, styles.gap2, shouldChangeLayout && styles.mb3, shouldShowSelector && shouldChangeLayout && styles.mt3]}> |
| }, | ||
| }); | ||
|
|
||
| if (lastSelectedExpensifyCardFeed) { |
There was a problem hiding this comment.
I think we should also consider lastSelectedCardSettings availability here because if the lastSelectedExpensifyCardFeed value workspace is deleted then it doesn't make sense to return that feed number. Issue #65592
|
|
||
| const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
| const [cardsList, cardsListResult] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${fundID}_${CONST.EXPENSIFY_CARD.BANK}`, {selector: filterInactiveCards}); | ||
| const [cardsList, cardsListResult] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${defaultFundID}_${CONST.EXPENSIFY_CARD.BANK}`, {selector: filterInactiveCards}); |
There was a problem hiding this comment.
Coming from #67491, this change will introduce an issue where App displays the "Not here" page when opening a card from another feed. More details on RC & solution: #67491 (comment)
| <View style={styles.flex1}> | ||
| <View style={[styles.flexRow, styles.gap1]}> | ||
| <CaretWrapper style={styles.flex1}> | ||
| <Text style={[styles.textStrong, styles.flexShrink1]}>{feedName}</Text> |
There was a problem hiding this comment.
Came from this issue
We had an issue where the Card feed name is displayed partially with a blank space on Android 16
More context here


Explanation of Change
Fixed Issues
$ #59364
PROPOSAL:
Tests
PREREQUISITES: an account with a domain card set up in the OD, ideally with 2 workspaces in the ND - one with Expensify Card set up, one with no Expensify Card setup
Has an Expensify Card set up
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
n/a
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
iOS: mWeb Safari
MacOS: Chrome / Safari
https://github.com/user-attachments/assets/80d5f64f-5e14-4f3b-ac25-858f1cd54ce4



MacOS: Desktop