-
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] Adjustments on KYCWall #34870
[TS Migration] Adjustments on KYCWall #34870
Conversation
@@ -146,7 +145,7 @@ function KYCWall({ | |||
* | |||
*/ | |||
const continueAction = useCallback( | |||
(event?: SyntheticEvent<NativeTouchEvent>, iouPaymentType?: TransferMethod) => { | |||
(event?: GestureResponderEvent | KeyboardEvent | undefined, iouPaymentType?: TransferMethod) => { |
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.
Why you have both ?:
and | undefined
. If the param is not required leave ?:
, if it's always passed to the function, but can be undefined leave | undefined
src/libs/actions/PaymentMethods.ts
Outdated
@@ -17,7 +17,7 @@ import type PaymentMethod from '@src/types/onyx/PaymentMethod'; | |||
import type {FilterMethodPaymentType} from '@src/types/onyx/WalletTransfer'; | |||
|
|||
type KYCWallRef = { | |||
continueAction?: (event?: SyntheticEvent<NativeTouchEvent>, iouPaymentType?: TransferMethod) => void; | |||
continueAction?: (event?: GestureResponderEvent | KeyboardEvent | undefined, iouPaymentType?: TransferMethod) => 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.
Same
@@ -161,7 +160,7 @@ function KYCWall({ | |||
} | |||
|
|||
// Use event target as fallback if anchorRef is null for safety | |||
const targetElement = anchorRef.current ?? (event?.nativeEvent.target as HTMLDivElement); | |||
const targetElement = anchorRef.current ?? (event?.currentTarget as HTMLElement); |
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.
Please make sure this change works for all platforms (native/web)
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@@ -68,8 +67,8 @@ function KYCWall({ | |||
walletTerms, | |||
shouldShowPersonalBankAccountOption = false, | |||
}: BaseKYCWallProps) { | |||
const anchorRef = useRef<HTMLDivElement>(null); | |||
const transferBalanceButtonRef = useRef<HTMLDivElement | null>(null); | |||
const anchorRef = useRef<HTMLElement>(null); |
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.
Why is this changed?
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.
It's related with this comment: #33714 (comment)
In order to make the types compatible with MenuItem and Button we had to change the event type which than the target is not compatible with HTMLDivElement and just with HTMLElement.
@rushatgabhane 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] |
Asking @johnmlee101 or @joekaufmanexpensify to test this build out |
@ruben-rebelo This was fixed! but the reassure tests are something we should fix before merging |
restarted |
Reviewer Checklist
Screenshots/VideosWas tested in Slack https://expensify.slack.com/archives/C049HHMV9SM/p1705929941791079 Android: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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!
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
the failing reassure tests are flaky and they were skipped on main https://github.com/Expensify/App/actions/runs/7614760746/job/20741389627?pr=34870 |
✋ 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 production by https://github.com/thienlnam in version: 1.4.31-7 🚀
|
Details
[TS migration] Migrate KYCWall component
Fixed Issues
$ #25126
$ #34904
PROPOSAL: N/A
Tests
Offline tests
Same as Tests section
QA Steps
Same as Tests section
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop