-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[TS-migration] Migrate 'AddPaymentMethodMenu.tsx' to TypeScript #37900
[TS-migration] Migrate 'AddPaymentMethodMenu.tsx' to TypeScript #37900
Conversation
iouReport, | ||
onItemSelected, | ||
session, | ||
shouldShowPersonalBankAccountOption = false, |
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.
How about rest default props like anchorAlignment
?
isVisible: boolean; | ||
onClose: () => void; | ||
onItemSelected: (paymentMethod: ValueOf<typeof CONST.PAYMENT_METHODS>) => void; | ||
iouReport?: OnyxEntry<Report>; | ||
anchorPosition: AnchorPosition; | ||
anchorAlignment?: AnchorAlignment; | ||
anchorRef: RefObject<View | HTMLDivElement>; | ||
shouldShowPersonalBankAccountOption?: boolean; |
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.
Missing JSDOc here 👀
@@ -246,7 +247,7 @@ function KYCWall({ | |||
<> | |||
<AddPaymentMethodMenu | |||
isVisible={shouldShowAddPaymentMenu} | |||
iouReport={iouReport} | |||
iouReport={isEmptyObject(iouReport) ? undefined : iouReport} |
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.
Let's test this change 😄
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
@@ -246,7 +247,7 @@ function KYCWall({ | |||
<> | |||
<AddPaymentMethodMenu | |||
isVisible={shouldShowAddPaymentMenu} | |||
iouReport={iouReport} | |||
iouReport={isEmptyObject(iouReport) ? undefined : iouReport} |
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.
Maybe we can update iouReport
type to include EmptyObject
in the AddPaymentMethodMenu
instead?
|
||
/** Callback to execute when the payment method is selected. */ | ||
onItemSelected: PropTypes.func.isRequired, | ||
onItemSelected: (paymentMethod: ValueOf<typeof CONST.PAYMENT_METHODS>) => void; |
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.
You can reuse existing PaymentMethod
type
onItemSelected: (paymentMethod: ValueOf<typeof CONST.PAYMENT_METHODS>) => void; | |
onItemSelected: (paymentMethod: PaymentMethod) => void; |
@mananjadhav 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] |
Overall changes look good, are we going to address? |
@mananjadhav I believe I've addressed it here |
@war-in Can we add some content for the Offline Tests. For example, |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-add-payment-menu.movAndroid: mWeb Chromemweb-chrome-add-payment-menu.moviOS: Nativeios-add-payment-menu.moviOS: mWeb Safarimweb-safari-add-payment-menu.movMacOS: Chrome / Safariweb-add-payment-menu.movMacOS: Desktopdesktop-add-payment-menu.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.
Change looks good and tests well. One last comment on offline test in the PR body. Can be merged after that.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25073 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Yes, we can :) One @mateuuszzzzz is back (I believe today) he will add it to the PR description (I don't have write permissions here) |
@MariaHCD Should we merge now, or we are waiting on something? 😄 |
We're waiting on the offline tests to be added to the PR description :) |
@MariaHCD I added offline tests |
The reassure performance test failed 🤔
Asked here: https://expensify.slack.com/archives/C05LX9D6E07/p1711436202175639 |
@mateuuszzzzz @MariaHCD I merged the newest main, maybe this will fix it 😄 |
@MariaHCD looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Not an emergency, all tests passed |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
Fixed Issues
$ #25073
PROPOSAL:
Tests
/settings/wallet
route)Add bank account
buttonAdd debit card
should show a component for entering debit card details.Personal bank account
should redirect to Plaid.Offline tests
Personal bank account
should display LHP withYou appear to be offline.
message.QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android.native.mov
Android: mWeb Chrome
Android.mWeb.mov
iOS: Native
iOS.native.mov
iOS: mWeb Safari
iOS.mweb.mov
MacOS: Chrome / Safari
macOS.browser.mov
MacOS: Desktop
macOS.desktop.mov