-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add VBA flow Part 1 #3459
Add VBA flow Part 1 #3459
Conversation
{!_.isEmpty(this.props.text) && ( | ||
<Text style={[styles.mb5]}>{this.props.text}</Text> | ||
)} | ||
{/* @TODO there are a bunch of logos to incorporate here to replace this name |
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.
Created an issue here to follow up on this eventually https://github.com/Expensify/Expensify/issues/166782
} | ||
|
||
canSubmitManually() { | ||
// @TODO add better validation |
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 thinking at least check for a 9 digit routing number + that both are all numbers? I'll look at how web-secure is handling this.
} | ||
|
||
addManualAccount() { | ||
// @TODO call API to add account manually |
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.
Will do in the next PR.
|
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.
Sorry, just a preliminary review for now. Didn't have time to finish this right now.
}; | ||
|
||
const CheckboxWithLabel = ({ | ||
LabelComponent, isChecked, onPress, style, |
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.
NAB, Should be moved to separate lines?
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.
Not sure we enforce this so if eslint doesn't mind I don't mind 😄
This is ready for review. |
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.
Also NAB but if you wanted to Checkbox
and CheckboxWithLabel
would probably be good candidates to include in storybook
style={styles.mb4} | ||
isChecked={this.state.hasAcceptedDisclosure} | ||
onPress={this.toggleDisclosure} | ||
LabelComponent={() => ( | ||
<Text> | ||
{`${this.props.translate('termsStep.haveReadAndAgree')} `} | ||
|
||
<TextLink href="https://use.expensify.com/fees"> |
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.
Not sure if it's safe to put a Pressable
inside a Text
, but I don't think you're supposed to.
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 think this can (and should) be un-nested
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.
Ok I'm not entirely sure either. But this flow isn't being used yet so if it's broken because of this. We'll find out eventually 😂
Thanks for the review @roryabraham !
Fixed up a few things but I'm going to create a follow up issue for this one and a few others you've mentioned. Great stuff overall. |
errorText: '', | ||
}; | ||
|
||
const TextInputWithLabel = props => ( | ||
<> | ||
<Text style={[styles.formLabel]}>{props.label}</Text> | ||
{!_.isEmpty(props.label) && <Text style={[styles.formLabel]}>{props.label}</Text>} |
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.
NAB: Why are we making props.label
optional? Seems strange to make a label optional on a component called TextInputWithLabel
. I also don't see you using the errorText
prop anywhere where you're using TextInputWithLabel
without the label
prop, so I'm wondering if this change is necessary.
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.
Sorta answered this in the other comment. But this component is likely going to change in the future when we apply some standardization to TextInputs across the app as it's kind of a mess. But we gotta keep rolling.
style={[styles.exampleCheckImage, styles.mb5]} | ||
source={exampleCheckImage} | ||
/> | ||
<TextInputWithLabel |
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.
Followup of my comment from earlier, can't you just use vanilla TextInputs here? I'm probably 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.
I think this decision will make more sense once...
- We add error handling + take advantage of the
errorText
(this is just a scaffolding step) - all the inputs get refactored and we use TextInputWithLabel as a base to build off of to create the text inputs that @shawnborton would prefer we build out eventually.
@@ -78,48 +71,42 @@ class TermsStep extends React.Component { | |||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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.
wat, this is definitely a placeholder I assume
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 it is
@MonilBhavsar gonna move forward with this one but lemme know if you have any additional comments :) |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Thanks! looks good and tests well for me considering the scope of the PR |
🚀 Cherry-picked to staging in version: 1.0.68-0🚀
|
🚀 Deployed to production in version: 1.0.68-4🚀
|
Details
Adds the Verified Bank Account flow to E.cash
For this PR I am just cleaning things up a bit and laying down some scaffolding. We will:
/bank-account/new
for adding the VBAWe will not be hooking up to any APIs just yet...
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/166041
Tests
/bank-account/new
user_good
pass_good
+ Continue/add-personal-bank-account
route and verify the selection screen appears + an account can be added (confirm via Web-Expensify).Note: Testing on native/desktop is tricky atm but can be done by using a deep link for native and/or putting the
navigate()
method on window like this:then calling
window.ecashNavigate('/bank-account/new')
from console / native debugger sessionQA Steps
No QA - We will test the entire flow together at the end
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android