Skip to content

bug: [UX] Add show/hide password toggle on login pageΒ #1063

@tharunika-19

Description

@tharunika-19

πŸ› Bug / UX Issue

The password field on the login modal does not have a show/hide password toggle (eye icon).
Users cannot verify what they've typed, which leads to confusion β€” especially since the form
has strict password validation rules.

πŸ“ Location

Login modal β†’ Password input field
URL: https://studyplan-jvgd.onrender.com/

πŸ” Steps to Reproduce

  1. Open the app at https://studyplan-jvgd.onrender.com/
  2. Click on "Sign In" or wait for the login modal to appear
  3. Try typing in the password field
  4. Notice there is no way to view the entered password

πŸ˜” Current Behavior

  • Password is always hidden with no option to reveal it
  • Users can't verify their input before submitting
  • Combined with the strict validation (min 8 chars, 1 capital, 1 special char),
    this makes it harder to debug login failures
Image

βœ… Expected Behavior

  • An eye icon (πŸ‘οΈ) should appear at the right end of the password field
  • Clicking it should toggle between type="password" and type="text"
  • Icon should update visually (eye / eye-off) to reflect current state

πŸ’‘ Suggested Fix

Add a toggle button inside the password input wrapper in index.html / login JS logic:

const toggle = document.querySelector('#togglePassword');
const passwordInput = document.querySelector('#password');

toggle.addEventListener('click', () => {
  const type = passwordInput.type === 'password' ? 'text' : 'password';
  passwordInput.type = type;
  toggle.textContent = type === 'password' ? 'πŸ‘οΈ' : 'πŸ™ˆ';
});

🏷️ Labels

enhancement UX good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions