Repository navigation
Fix/50248 handle card failure data - #50644
Conversation
|
@DylanDylann 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] |
| DD79042B2792E76D004484B4 /* RCTBootSplash.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD79042A2792E76D004484B4 /* RCTBootSplash.mm */; }; | ||
| DDCB2E57F334C143AC462B43 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D20D83B0E39BA6D21761E72 /* ExpoModulesProvider.swift */; }; | ||
| E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */ = {isa = PBXBuildFile; }; | ||
| E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; |
| errors?: OnyxCommon.Errors; | ||
|
|
||
| /** Whether the request was successful */ | ||
| success?: boolean; |
There was a problem hiding this comment.
This should beisSuccessful
There was a problem hiding this comment.
@DylanDylann I saw "success" in a few places in the app like in
Line 105 in d77a4fd
There was a problem hiding this comment.
We should follow our convention
App/contributingGuides/STYLE.md
Lines 605 to 622 in ce23fb5
There was a problem hiding this comment.
@DylanDylann shouldShowSuccess would be acceptable? 😅 like here
App/src/types/onyx/WalletTransfer.ts
Line 17 in ce23fb5
There was a problem hiding this comment.
For me, I prefer isSuccessful because it's more generic
| return <NotFoundPage />; | ||
| } | ||
|
|
||
| const shouldShowCardsSection = (policy?.areExpensifyCardsEnabled && paymentAccountID) ?? policy?.areCompanyCardsEnabled; |
There was a problem hiding this comment.
@koko57 while reviewing this PR, I see a bug here
"0" is displayed in the end of WorkspaceMemberDetailsPage
| const shouldShowCardsSection = (policy?.areExpensifyCardsEnabled && paymentAccountID) ?? policy?.areCompanyCardsEnabled; | |
| const shouldShowCardsSection = (policy?.areExpensifyCardsEnabled && !!paymentAccountID) ?? policy?.areCompanyCardsEnabled; |
|
|
||
| useEffect(() => { | ||
| return () => { | ||
| Card.clearIssueNewCardFlow(); |
There was a problem hiding this comment.
Why do we need to clear data here? We already cleared data if the API failed
There was a problem hiding this comment.
I noticed that when we close RHP during the flow and go to another workspace and start the flow for issuing the card we have the data from the previous flow. This may lead to an error when i.e. we have chosen an assignee that is not a member of the new workspace. To avoid such errors, I think it's better to clear the flow everytime it's closed.
cc @mountiny
|
Welcome back @koko57 will you be able to get this one cleared up today? Thanks |
|
@mountiny yeah, on it right now! Should be ready shortly |
|
@DylanDylann changes applied |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-16.at.16.05.18.movAndroid: mWeb ChromeScreen.Recording.2024-10-16.at.15.58.11.moviOS: NativeScreen.Recording.2024-10-16.at.16.02.38.moviOS: mWeb SafariScreen.Recording.2024-10-16.at.15.54.57.movMacOS: Chrome / SafariScreen.Recording.2024-10-16.at.15.52.10.movMacOS: DesktopScreen.Recording.2024-10-16.at.15.55.42.mov |
|
@mountiny All yours |
|
@koko57 can you please merge with main, sorry for late review (please ping me in slack for quick actions just in case) |
|
@mountiny conflicts resolved |
| const ownerDetails = personalDetails?.[policy?.ownerAccountID ?? -1] ?? ({} as PersonalDetails); | ||
| const policyOwnerDisplayName = ownerDetails.displayName ?? policy?.owner ?? ''; | ||
| const hasMultipleFeeds = Object.values(cardFeeds?.settings?.companyCards ?? {}).filter((feed) => !feed.pending).length > 0; | ||
| const paymentAccountID = cardSettings?.paymentBankAccountID ?? 0; |
There was a problem hiding this comment.
Nab just to make it clearer
| const paymentAccountID = cardSettings?.paymentBankAccountID ?? 0; | |
| const paymentBankAccountID = cardSettings?.paymentBankAccountID ?? 0; |
|
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ 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.0.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.52-5 🚀
|
Details
Fixed Issues
$ #50248
$ #50441
PROPOSAL:
Tests
Offline tests
QA Steps
same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-11.at.19.57.37.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-10-11.at.19.08.02.mp4
MacOS: Desktop