-
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
Fix extra space on AdditionalDetailsPage #11257
Conversation
Looks good but lint is failing |
Updated, ready for another review |
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Tests were passing |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
{currentStep === CONST.WALLET.STEP.ONFIDO && <OnfidoStep walletAdditionalDetailsDraft={this.props.walletAdditionalDetailsDraft} />} | ||
{currentStep === CONST.WALLET.STEP.TERMS && <TermsStep />} | ||
{currentStep === CONST.WALLET.STEP.ACTIVATE && <ActivateStep userWallet={this.props.userWallet} />} | ||
{(() => { |
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.
IIFE is looking very awkward here.
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 don't like? I would review another refactor if you feel strongly – I thought this was pretty readable and like having only one parent <ScreenWrapper>
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.
Yeah, combined statements are good but IIFE in JSX is not very common.
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.
Came across this randomly, but yeah I think I don't like either. Feels like an anti-pattern and an alternate approach would be to create a new component for all the logic like:
<ScreenWrapper>
<EnablePaymentsContent {...props} />
</ScreenWrapper>
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.
I'm not opposed and that sounds like a good alternative @marcaaron. Feel free to create an issue if you want 👍🏼
🚀 Deployed to staging by @AndrewGable in version: 1.2.10-0 🚀
|
1 similar comment
🚀 Deployed to staging by @AndrewGable in version: 1.2.10-0 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.2.10-1 🚀
|
…tionalDetails Fix extra space on AdditionalDetailsPage
Details
The parent component of
AdditionalDetailsPage
,EnablePaymentsPage
, already has aScreenWrapper
here.We should never have nested
ScreenWrapper
components. This is what was causing the extra space bug.The same bug existed on the
ActivatePage
.Fixed Issues
$ #10367
Tests
enable-payments
page:adb shell am start -a android.intent.action.VIEW -d new-expensify://enable-payments
xcrun simctl openurl booted new-expensify://enable-payments
/enable-payments
in the browserPR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
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)QA Steps
Screenshots
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android