-
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
feat: migrate KYCWall class component to functional #28798
feat: migrate KYCWall class component to functional #28798
Conversation
continue(event, iouPaymentType) { | ||
if (this.state.shouldShowAddPaymentMenu) { | ||
this.setState({shouldShowAddPaymentMenu: false}); | ||
const continueAction = (event, iouPaymentType) => { |
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.
btw had to change the name as continue
is a forbidden keyword
LGTM The only thing im wondering about is the It seems really hacky together with the |
@abdulrahuman5196 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] |
@Swor71 What are the tests for this? There is none in author's checklist? |
@abdulrahuman5196 hey, apologies for missing that part, added the steps now |
/> | ||
{children(continueAction, anchorRef)} | ||
</> | ||
); | ||
} | ||
|
||
KYCWall.propTypes = propTypes; |
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.
Functional components are expected to have a displayName value
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.
@abdulrahuman5196 I am aware of this, however this component is exported from the index.js
file which has the displayName
https://github.com/Expensify/App/blob/main/src/components/KYCWall/index.js#L17
Would you like me to add that line to this component as well?
EDIT: I've actually added the displayName
for the base component as well
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-12.at.7.34.26.PM.mp4Mobile Web - ChromeScreen.Recording.2023-10-12.at.7.43.10.PM.mp4Mobile Web - SafariScreen.Recording.2023-10-12.at.7.42.08.PM.mp4DesktopScreen.Recording.2023-10-12.at.8.00.18.PM.mp4iOSScreen.Recording.2023-10-12.at.7.48.44.PM.mp4AndroidScreen.Recording.2023-10-12.at.7.49.09.PM.mp4 |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @bondydaa
🎀 👀 🎀
C+ Reviewed
We did not find an internal engineer to review this PR, trying to assign a random engineer to #16170 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@bondydaa Kindly run the workflows before review/merging. |
@abdulrahuman5196 @bondydaa |
looks like conflicts |
@bondydaa |
@abdulrahuman5196 @bondydaa |
✋ 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/bondydaa in version: 1.3.88-1 🚀
|
this started causing a crash so we reverted it here #30110 |
The bigger reason for the revert is we have a conference starting sunday which we've been testing specifically the flows of #29573 to ensure they work for that event. I should have held this PR initially but wasn't thinking when I merged it. |
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.88-1 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|
Details
Migration of
KYCWall
class component to functional oneFixed Issues
$ #16170
PROPOSAL:
Tests
Offline tests
QA Steps
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android