Skip to content

fix-password-validation-not-working #595

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

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

benjaminshafii
Copy link
Collaborator

@benjaminshafii benjaminshafii commented Jul 23, 2024

TL;DR

Updated the password validation logic in the PasswordCard component to only show the password mismatch message when both passwords are filled and to simplify the validation logic.

What changed?

  • Show password mismatch message only when both passwords are filled.
  • Simplified password match condition.
  • Removed unnecessary length checks for password and confirmPassword fields.

How to test?

  1. Go to the Join secure page.
  2. Fill in the password and confirmPassword fields with non-matching passwords.
  3. Verify that the password mismatch message only shows up when both fields are filled.

Why make this change?

Improving user experience by providing clearer validation messages and simplifying the component's logic.


What does this PR do?

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

Required

  • Read Contributing Guide
  • Self-reviewed my own code
  • Tested my code in a local environment
  • Commented on my code in hard-to-understand areas
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the UnInbox Docs if changes were necessary

Current Change

🎥 Video uploaded on Graphite:

Past Behavior

Nothing would happen until a user entered at least 8 chars.

🎥 Video uploaded on Graphite:

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ashgansh and the rest of your teammates on Graphite Graphite

@benjaminshafii benjaminshafii marked this pull request as ready for review July 23, 2024 13:34
Copy link
Member

@OmarMcAdam OmarMcAdam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashgansh I think that the "too weak" error message should be shown as soon as the first validation comes back (14 second timestamp in first video)

this would let the user make a stronger password BEFORE they start the confirmation step

also, i think previously the color of the strength bars were dynamic
red for weak
amber for medium
green for strong

maybe im imagining it @BlankParticle ?

@BlankParticle
Copy link
Member

Yeah the remote validation doesn't occur until atleast 8 letters are there, also about the strength meter colors, it doesnt play well with when using the same component for both strength and confirm password.

@benjaminshafii
Copy link
Collaborator Author

@ashgansh I think that the "too weak" error message should be shown as soon as the first validation comes back (14 second timestamp in first video)

this would let the user make a stronger password BEFORE they start the confirmation step

also, i think previously the color of the strength bars were dynamic red for weak amber for medium green for strong

maybe im imagining it @BlankParticle ?

when user under 8 chars returning an error
when password over 8 return the strength in strength bar

note:
removed the color part of the bar for the moment + giving proper user follow up

@OmarMcAdam OmarMcAdam self-requested a review July 23, 2024 17:21
Copy link
Member

@OmarMcAdam OmarMcAdam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@OmarMcAdam OmarMcAdam merged commit a05dcc5 into main Jul 23, 2024
6 checks passed
@OmarMcAdam OmarMcAdam deleted the 07-23-fix-password-validation-not-working branch July 23, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants