Skip to content
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

[HOLD for payment 2021-09-10] Sign in - Error message is not specific if password is not entered #4856

Closed
kavimuru opened this issue Aug 26, 2021 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Aug 26, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Lunch the app
  2. Put user name or email
  3. On Password page click on Sign in

Expected Result:

Expected message - Error message should be specific as "Please fill out password field"

Actual Result:

Message is displayed as Please fill out all the fields

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web ✔️
  • iOS ✔️
  • Android ✔️
  • Desktop App ✔️
  • Mobile Web ✔️

Version Number:
1.0.88-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

image

Expensify/Expensify Issue URL:

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @Dal-Papa (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@thesahindia
Copy link
Member

thesahindia commented Aug 26, 2021

Proposal

Adding specific error message inside this function can fix the issue.

Only three conditions are required.

  1. When both the fields are empty and this.props.account.requiresTwoFactorAuth is true (Please fill out all the fields)
  2. When only the password field is empty (Please fill the password)
  3. When only the twoFactorAuthCode is empty and is required. (Please fill the two factor code)

Here's the code which should work here:

    /**
     * Check that all the form fields are valid, then trigger the submit callback
     */
    validateAndSubmitForm() {
        if (!this.state.password.trim()
            && (this.props.account.requiresTwoFactorAuth && !this.state.twoFactorAuthCode.trim())
        ) {
            this.setState({formError: this.props.translate('passwordForm.pleaseFillOutAllFields')});
            return;
        }
        if (!this.state.password.trim()) {
            this.setState({formError: this.props.translate('passwordForm.pleaseFillPassword')});
            return;
        }
        if (this.props.account.requiresTwoFactorAuth && !this.state.twoFactorAuthCode.trim()) {
            this.setState({formError: this.props.translate('passwordForm.pleaseFillTwoFactorAuth')});
            return;
        }
        this.setState({
            formError: null,
        });

        signIn(this.state.password, this.state.twoFactorAuthCode);
    }

@Dal-Papa
Copy link

The proposal looks coherent. Will tag a CM.

@MelvinBot MelvinBot removed the Overdue label Aug 30, 2021
@Dal-Papa Dal-Papa added the External Added to denote the issue can be worked on by a contributor label Aug 30, 2021
@MelvinBot
Copy link

Triggered auto assignment to @puneetlath (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@isagoico
Copy link

Issue reproducible during KI retests

@puneetlath puneetlath added the Waiting for copy User facing verbiage needs polishing label Aug 30, 2021
@MelvinBot
Copy link

Triggered auto assignment to @jamesdeanexpensify (Waiting for copy), see https://stackoverflow.com/c/expensify/questions/7025/ for more details.

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 30, 2021
@puneetlath
Copy link
Contributor

puneetlath commented Aug 30, 2021

@jamesdeanexpensify added the waiting for copy label as we need some copy for the specific error messages described here. We'll need them in Spanish as well.

@thesahindia your proposal seems good to me. You'll also need to add the new copy that @jamesdeanexpensify provides here and here.

Here's the Upwork job: https://www.upwork.com/jobs/~0148e14c6f52be895f. Go ahead and apply there and I can assign you the job.

@puneetlath
Copy link
Contributor

Actually it looks like the spanish translations for existing messages are being handled here, right @Jag96? In which case we just need spanish versions of the new messages.

@thesahindia
Copy link
Member

Thanks @puneetlath
I've applied to the job. Will wait for the translations.

@puneetlath
Copy link
Contributor

Great! Feel free to start on the PR with some placeholder copy until the final copy is provided by @jamesdeanexpensify.

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 30, 2021
@jamesdeanexpensify
Copy link
Contributor

jamesdeanexpensify commented Aug 30, 2021

Got it, so if I'm understanding correctly, we need three pieces of copy:

  1. When both fields are empty, we can say: Please fill out all fields.
  2. When the password field is empty, we can say: Please enter your password.
  3. When the two-factor auth field is empty, we can say: Please enter your two factor code.

@thesahindia
Copy link
Member

thesahindia commented Aug 30, 2021

1. When both fields are empty, we can say: Please fill out all fields.

2. When the password field is empty, we can say: Please enter your password.

3. When the two-factor auth field is empty, we can say: Please enter your two factor code.

Seems good to me!

@jamesdeanexpensify jamesdeanexpensify removed the Waiting for copy User facing verbiage needs polishing label Aug 30, 2021
@jamesdeanexpensify jamesdeanexpensify removed their assignment Aug 30, 2021
@puneetlath
Copy link
Contributor

puneetlath commented Aug 30, 2021

@jamesdeanexpensify it looks like we don't use a dash in two-factor here. We should probably be consistent yeah?

image

I posted in the #espanol channel about getting the spanish versions.

@jamesdeanexpensify
Copy link
Contributor

Ah, I didn't see that screenshot before. I actually think we should update it to the hyphenated version because that's how it's spelled almost everywhere online. Is that possible?

@Jag96
Copy link
Contributor

Jag96 commented Aug 30, 2021

Actually it looks like the spanish translations for existing messages are being handled here, right @Jag96? In which case we just need spanish versions of the new messages.

Yes, #4880 is to ensure that the error message translations happen when switching languages on the sign in form, so now anytime we set formError we'll set the translation key (this.setState({formError: 'passwordForm.pleaseFillOutAllFields'});) rather than setting the translated text (this.setState({formError: this.props.translate('passwordForm.pleaseFillOutAllFields')});)

@puneetlath
Copy link
Contributor

@jamesdeanexpensify it is possible, but everywhere in our product (.com and .cash) we use the non-hyphenated version. So if we want to change that, let's do it in a separate issue.

image

@jamesdeanexpensify
Copy link
Contributor

Yep, I can take that to a new issue soon. Thanks!

@puneetlath
Copy link
Contributor

Ok @jamesdeanexpensify @thesahindia I edited both your comments to remove the dash.

@thesahindia
Copy link
Member

thesahindia commented Aug 30, 2021

We still need spanish translations for these two messages:

  1. Please enter your password. (might be "Por favor introduce tu contraseña." taken out from here)
  2. Please enter your two factor code.

@saracouto
Copy link
Contributor

Hey @thesahindia, for those two sentences:

  1. Por favor, introduce tu contraseña.
  2. Por favor, introduce tu código 2 Factores.

@puneetlath
Copy link
Contributor

@saracouto should Factores be lower case like the rest of the words?

@saracouto
Copy link
Contributor

lower case works I think!

@puneetlath puneetlath changed the title Sign in - Error message is not specific if password is not entered [Hold for payment] Sign in - Error message is not specific if password is not entered Sep 2, 2021
@botify
Copy link

botify commented Sep 2, 2021

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@puneetlath
Copy link
Contributor

PR merged. Will be paid 7 days after production deploy if no regressions. Thanks @thesahindia!

@puneetlath puneetlath added Weekly KSv2 and removed Daily KSv2 labels Sep 2, 2021
@botify
Copy link

botify commented Sep 3, 2021

🚀 Deployed to staging by @puneetlath in version: 1.0.92-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 3, 2021
@botify botify changed the title [Hold for payment] Sign in - Error message is not specific if password is not entered [HOLD for payment 2021-09-10] [Hold for payment] Sign in - Error message is not specific if password is not entered Sep 3, 2021
@botify
Copy link

botify commented Sep 4, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.93-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@puneetlath puneetlath changed the title [HOLD for payment 2021-09-10] [Hold for payment] Sign in - Error message is not specific if password is not entered [HOLD for payment 2021-09-10] Sign in - Error message is not specific if password is not entered Sep 7, 2021
@puneetlath
Copy link
Contributor

Paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

10 participants