-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: card error not show and cannot dismiss in report fraud page #49292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
945786e
fix: error not show and cannot dismiss in report fraud page
dominictb 5aa1fe5
remove cardID for indismissable cards
dominictb a0cd296
merge main
dominictb 09a0dc2
fix: remove withOnyx
dominictb 9946fdb
fix: lint
dominictb c546e1b
Merge branch 'Expensify:main' into fix/49010
dominictb 1959b4f
Merge branch 'main' of https://github.com/dominictb/epsf-app into fix…
dominictb 2790961
Merge branch 'fix/49010' of https://github.com/dominictb/epsf-app int…
dominictb c2be89c
Merge branch 'main' of https://github.com/dominictb/epsf-app into fix…
dominictb 9cdd0ec
close error in workspace card list page
dominictb 55021de
Merge branch 'main' of https://github.com/dominictb/epsf-app into fix…
dominictb 3722997
clear card error in workspace expensify card page
dominictb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominictb Why do we need isLoadingPaymentMethodsOnyx? isLoadingPaymentMethods should do the work here, right or am i missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominictb Same thing for the
isLoadingCardListandisLoadingBankAccountList, do we really need that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
|| isLoadingPaymentMethodsOnyxwas added in this commit to remove withOnyx. Previously, when using withOnyx, isLoadingPaymentMethods had a default value of true. So, when switching to useOnyx, we needed to include|| isLoadingPaymentMethodsOnyxwhereverisLoadingPaymentMethodsis used to ensure everything continues to function correctlyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same approach should be applied in the case isLoadingCardList and isLoadingBankAccountList. When using withOnyx,
isLoadingCardListhas default value is{}. So we need to useconst assignedCards = Object.values(isLoadingCardList ? {} : cardList ?? {}).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the details @dominictb.
I noticed an issue on the Expensify cards page within the workspaces—pressing the close icon doesn’t clear the error message. Although it's not related to the current issue but we had fixed a similar problem here in this PR.so, Just to confirm, @dominictb @cead22 should we address it as part of this task, or create a separate bug for it?
card-error-doesnt-go-away.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Coming in here as assigned - if it's going to be a pretty similar solution let's knock it out in this PR as well. I realize it's a different page but still card-related error I guess, and if we already have done the work we need to adjust, let's do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, Let's do this.
@dominictb We need to add the onClose here and set the errors null like we do in the clearDeletePaymentMethodError
App/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx
Lines 77 to 78 in 00cec11