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

Validation Message in Change Password Form #4367

Closed
mananjadhav opened this issue Aug 2, 2021 · 26 comments
Closed

Validation Message in Change Password Form #4367

mananjadhav opened this issue Aug 2, 2021 · 26 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.

Comments

@mananjadhav
Copy link
Collaborator

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to Settings Page
  2. Click Change Password
  3. Try to enter different "New Password" and "Confirm New Password"

Expected Result:

It should ideally show a validation message of the password mismatch

Actual Result:

No error message is displayed with the button disabled.

Screenshot 2021-08-02 at 8 03 42 PM

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

@mananjadhav mananjadhav added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 2, 2021
@MelvinBot
Copy link

Triggered auto assignment to @zanyrenney (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 2, 2021
@parasharrajat
Copy link
Member

I think this was already there. Wasn't it?

@mananjadhav
Copy link
Collaborator Author

mananjadhav commented Aug 2, 2021

Proposal

I would want to add two aspects to this:

  1. Show a validation message between when the New Password and Confirm Password don't match
  2. Add a visibility toggle to the Password Fields. This will make it simple for the user to see the issue.

Approach:

More or less the implementation looks like the following:

In the PasswordPage,

this.state = {
            currentPassword: '',
            newPassword: '',
            confirmNewPassword: '',
            isPasswordRequirementsVisible: false,
            passwordValidationError: '',
            securedTextEntry: {
                currentPassword: true,
                newPassword: true,
                confirmNewPassword: true
            }
        };

Add onBlur={() => matchNewPasswords()}


matchNewPasswords() {
    if(this.state.newPassword !== this.state.confirmNewPassword) {
         this.setState({ passwordValidationError: translate('passwordMismatchError')});
    } 
}
toggleSecureEntry(fieldKey) {
        this.setState(prevState => {
          return {
            securedTextEntry: {
                ...prevState.securedTextEntry,
                [fieldKey]: !prevState.securedTextEntry[fieldKey],
            }
          };
        });
    }


{this.state.passwordValidationError && (
                                <Text style={[styles.formHint, styles.mt1, error]}>
                                    {this.state.passwordValidationError}
                                </Text>
                            )}

Update the text input to have a toggle icon on the right. We can even move this as a new PasswordField with this visibility prop.


<View style={styles.iconInputSection}> // Some alignment effort is required to get the icon inside the input field.
                                <TextInput
                                    ref={el => this.currentPasswordInputRef = el}
                                    secureTextEntry={this.state.securedTextEntry.currentPassword}
                                    autoCompleteType="password"
                                    textContentType="password"
                                    style={[styles.textInput, styles.inputWithIcon]}
                                    value={this.state.currentPassword}
                                    onChangeText={currentPassword => this.setState({currentPassword})}
                                    returnKeyType="done"
                                />
                                <Pressable style={styles.iconInput} onPress={() => this.toggleSecureEntry('currentPassword')}>
                                    <Icon src={this.state.securedTextEntry.currentPassword ? Eye : EyeSlash }  />
                                </Pressable>
                            </View>

@mananjadhav
Copy link
Collaborator Author

@parasharrajat Couldn't find that on the Change Password page.

@MelvinBot
Copy link

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

@zanyrenney zanyrenney removed their assignment Aug 4, 2021
@nkuoch nkuoch added the Improvement Item broken or needs improvement. label Aug 4, 2021
@nkuoch nkuoch removed their assignment Aug 4, 2021
@nkuoch nkuoch added the External Added to denote the issue can be worked on by a contributor label Aug 4, 2021
@MelvinBot
Copy link

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

@dylanexpensify
Copy link
Contributor

On it!

@dylanexpensify
Copy link
Contributor

Upwork Job Posting - here.

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

Triggered auto assignment to @AndrewGable (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@AndrewGable
Copy link
Contributor

@dylanexpensify can you hire @mananjadhav? The proposal looks good, thanks!

@mananjadhav
Copy link
Collaborator Author

@AndrewGable Thanks. Am I supposed to add the validation message only or also the visibility toggle? The latter will have to be added to other password fields too.

@AndrewGable
Copy link
Contributor

I would say let's focus on validation message only. We do not have the visibility functionality on Expensify.com, so I think it's fine to not implement it for now.

Screen Shot 2021-08-04 at 8 42 38 AM

@mananjadhav
Copy link
Collaborator Author

Noted. Thanks.

@dylanexpensify
Copy link
Contributor

Working on this now @AndrewGable!

@dylanexpensify
Copy link
Contributor

@AndrewGable @mananjadhav I have sent the offer.

@mananjadhav
Copy link
Collaborator Author

@dylanexpensify Received the invite for 250$. Shouldn't it be 500$ as I've posted the issue. Thanks.

@dylanexpensify
Copy link
Contributor

Hi @mananjadhav! Ah yes, sorry for the oversight. Will update the offer to reflect the correct amount.

@dylanexpensify
Copy link
Contributor

@mananjadhav I've gone ahead and sent over the new offer!

@dylanexpensify
Copy link
Contributor

Confirming @mananjadhav has been hired for this.

@mallenexpensify
Copy link
Contributor

@mananjadhav The $250 bonus for reporting this issue (if you fix it) is added at the end once final payment is made. If @dylanexpensify added it before, that's fine for this job.

@mananjadhav
Copy link
Collaborator Author

@mallenexpensify Thanks for clarifying. Noted.

@MelvinBot
Copy link

@AndrewGable, @dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

@MelvinBot
Copy link

@AndrewGable, @dylanexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@mallenexpensify
Copy link
Contributor

@dylanexpensify update plz

@dylanexpensify
Copy link
Contributor

On this today, sorry competing priorities kept me distracted.

@MelvinBot MelvinBot removed the Overdue label Aug 12, 2021
@dylanexpensify dylanexpensify removed the Daily KSv2 label Aug 12, 2021
@dylanexpensify
Copy link
Contributor

Contributor: Paid
Contract: Completed
Upwork Post: Closed

@mallenexpensify mallenexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement.
Projects
None yet
Development

No branches or pull requests

8 participants