Open m-natarajan opened 3 weeks ago
Triggered auto assignment to @miljakljajic (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Edited by proposal-police: This proposal was edited at 2024-08-27 17:11:58 UTC.
Wallet empty state has disabled "Add bank account" button for new, unvalidated accounts
New Feature
VerifyAccountPage
using ValidateCodeForm
component like ContactMethodDetailsPage
with header and message we define in step 1ROUTES.VERIFY_ACCOUTNT_PAGE
onPress
function here onPress={()=>{
if(!isUserValidated){
Navigation.navigate(ROUTES.VERIFY_ACCOUTNT_PAGE.getRoute(currentUserPersonalDetails.login ?? ''));
return;
}
onPress();
}}
NA
Edited by proposal-police: This proposal was edited at 2024-08-27 17:13:03 UTC.
Wallet empty state has disabled "Add bank account" button for new unvalidated accounts
New refactor
In SETTINGS_CONTACT_METHOD_DETAILS, we add a note to that explains why we need to validate for that particular feature like this: "This feature requires you to validate your account" as suggested https://github.com/Expensify/App/issues/48041#issuecomment-2313076530. We need a condition to determine when to display this note, so it won't be shown in every case. We can choose to display the note based on the backTo parameter
Output:
https://github.com/user-attachments/assets/20b6281e-1dd1-431a-84f2-d09612a41a4a
Optionally, we can also show an announcement to the user with two choices: either navigating to SETTINGS_CONTACT_METHOD_DETAILS, and sign in again
Wallet empty state has disabled "Add bank account" button for new, unvalidated accounts
Improvement
disabled
prop.
https://github.com/Expensify/App/blob/e244e51b7ece393d0f8d725e0ea46fd328036409/src/pages/settings/Wallet/PaymentMethodList.tsx#L324Then we should add ConfirmModal
in the component, the modal will let the user know that their account isn't validated. We will show a button Validate
in the modal and if the user selects it, we will navigate to SETTINGS_CONTACT_METHOD_DETAILS
.
const [isValidateModalOpen, setIsValidateModalOpen] = useState(false);
<ConfirmModal
title="Account not validated"
isVisible={isValidateModalOpen}
onConfirm={() => {
const backTo = Navigation.getActiveRouteWithoutParams();
Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.getRoute(user.login ?? '', backTo));
setIsValidateModalOpen(false);
}}
onCancel={() => setIsValidateModalOpen(false)}
prompt="Please validate you account before connecting a bank account."
confirmText="Validate"
cancelText={translate('common.cancel')}
/>
<MenuItem
onPress={() => {
if (!isUserValidated) {
setIsValidateModalOpen(true);
return;
}
onPress();
}}
ContactMethodDetailsPage
, the component should use the backTo
param to navigate back if it is present .https://github.com/user-attachments/assets/96b61cbf-6e08-4f2c-bfa0-ed85b7650737
@Krishna2323 rather than throwing an error modal, I was thinking we could show the validate UI in the RHP.
Actually looks like @cretadn22 already proposed that.
@shawnborton, I thought it would be odd to directly push users to the validate page without providing any information. That's why I suggested showing a modal.
I think it would be simpler if we just added some text in that RHP view that explains why we need to validate for that particular feature.
I think it would be simpler if we just added some text in that RHP view that explains why we need to validate for that particular feature.
We can present the user with an announcement offering two options: either go to SETTINGS_CONTACT_METHOD_DETAILS and sign in again, or provide additional explanation. This approach could also be used in other places
I think we should do something simple like this, where we basically have a little line that says "This feature requires you to validate your account" and then we show the validate form, something like this:
cc @Expensify/design in case you have any additional thoughts.
Actually looks like @cretadn22 already proposed that.
@shawnborton my proposal is first and @cretadn22's proposal is same as mine
I like what you're proposing Shawn. Keeps you in the flow and doesn't derail you, but still gets you to validate.
Samesies! ^^
Dig it. Would it be a bit clearer if we have the header say "Validate your account" instead of the email address?
@dubielzyk-expensify yeah totally agree with that, I just grabbed a quick example from the contact methods flow since that is the only spot (I think?) that has this kind of in-product account validation thus far.
@miljakljajic Whoops! This issue is 2 days overdue. Let's get this updated quick!
@miljakljajic Still overdue 6 days?! Let's take care of this!
Job added to Upwork: https://www.upwork.com/jobs/~019c85c6a0fbfa60c9
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External
)
@shawnborton whose proposal are we going with here? I'll get them assigned
I think that would be @jjcoffee's decision right?
Hmm I'm not sure if I agree with navigating to the contact details page here. We wouldn't normally reuse a page for a different purpose, but rather the components in the page (ValidateCodeForm
in this case). I think navigating to a completely different route also will cause issues; if you refresh after tapping Add bank account
, for example, you'd lose your place (the central pane would switch in the background to the profile screen).
I think I'd be more in favour of adding a ValidateCodeForm
either in a new page or maybe as the first step of the add bank account flow (only if you aren't validated of course!).
@jjcoffee I don't think it's a big issue. In our project, we also have instances where we use shared modals. For example, on the I'm a teacher
page, we reuse the Contact methods
from the profile.
@daledah In that case it makes sense since the purpose is the same (adding an email address) and so we're directing the user to the page appropriate to that purpose.
Once we start talking about customising the contact details page to add text and a header that's specific to this flow, I think it doesn't really make sense to reuse the page anymore.
@jjcoffee agree with you, updated proposal
Thanks @daledah, happy to go with your updated proposal!
:ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Current assignee @miljakljajic is eligible for the NewFeature assigner, not assigning anyone new.
:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:
Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature
)
Swapped this to New Feature since this isn't really a bug. @shawnborton you know what project we should tie this to?
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖
@jjcoffee Currently I don't have access to Expensify Slack, can you help to ask for the new translations? The phrases are:
This feature requires you to validate your account
and Validate your account
@daledah Sure, asked on Slack. Are you waiting to be added to Slack? Maybe @miljakljajic can help get you added if so.
@daledah Here you go:
EN: This feature requires you to validate your account.
ES: Esta función requiere que valides tu cuenta.
EN: Validate your account.
ES: Valida tu cuenta.
Hi, we have a ValidateContactActionPage
added here #48320. This is to ask for validating the primary contact every time when trying to add a secondary contact. I think the page being added in this issue is also similar, though it is meant only if the primary contact is not validated. There are few flows which need primary contact verification every time here #48541.
Is it better to use this ValidateContactActionPage
and make it a common page for all these flows that require validation of the primary contact before allowing an action?
@jjcoffee what do you think about this suggestion. If we go with this suggestion I think we will need to add some new props to ValidateContactActionPage
to display new header and text
@c3024 Oh interesting, thanks for bringing that to our attention!
I wonder if we could be better off using ValidateCodeActionModal
(added in https://github.com/Expensify/App/pull/48628) for our purposes here, as we are not adding a step in the process of adding a bank account but a one-off block to verify your account (so a modal makes more sense in my mind). I don't know if that makes a big difference to the implementation @daledah?
I have understood the discussions here and completely agree with using ValidateCodeActionModal
, I will open PR soon.
Apologies @daledah we've run out of single channel guest spaces in slack - are you still waiting to be added? I'll make sure you're at the top of the list
are you still waiting to be added?
@miljakljajic Hey yes, I've sent multiple emails to contributors@expensify.com
on the matter but haven't received responses recently, would be great if you could help.
Thanks
Still working on this PR, i have some minor bugs. Will open tomorrow
https://github.com/user-attachments/assets/f2ab4514-b013-40a1-a55d-c150dcbeef20
I noticed there is still one button disabled on the enable payments page, and I think it will be handled in this issue as well.
@daledah Yes good point, we do want to handle it in both places.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.25-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1724687808309139
Action Performed:
Expected Result:
Step 2 and 3"Add bank account" should be enabled
Actual Result:
"Add bank account" is disabled and grayed out For the new unvalidated account, we'd mimic something like this where we just ask you to verify your account:
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jjcoffee