Skip to content

Fix #935 - Add password visibility toggle to authentication modals#938

Open
MohitSoni2021 wants to merge 1 commit into
Charushi06:mainfrom
MohitSoni2021:main
Open

Fix #935 - Add password visibility toggle to authentication modals#938
MohitSoni2021 wants to merge 1 commit into
Charushi06:mainfrom
MohitSoni2021:main

Conversation

@MohitSoni2021
Copy link
Copy Markdown

Description

This PR adds a password visibility toggle to the Login and Signup modal forms.

Changes Made

  • Added show/hide password functionality to Login form.
  • Added show/hide password functionality to Signup form.
  • Added accessible toggle button using MUI IconButton.
  • Added Visibility and VisibilityOff icons.
  • Preserved existing validation and form behavior.

Related Issue

Fixes #935

Testing

  • Login password can be revealed and hidden.
  • Signup password can be revealed and hidden.
  • No console errors.
  • Responsive behavior verified.

Copilot AI review requested due to automatic review settings May 29, 2026 08:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR upgrades the authentication modal UI and adds interaction enhancements (close button, password visibility toggle, and profile-button behavior) while moving modal styling out of inline attributes into CSS.

Changes:

  • Replaced inline-styled auth modal markup with class-based styling and added a close button + password visibility toggle.
  • Added a profile-btn ID and click logic to open the auth modal when logged out (or show current user when logged in).
  • Added new CSS rules for the auth modal (“premium” look & feel).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
index.html Refactors auth modal markup, adds close/password-toggle/profile button behaviors, and adjusts login/signup handling.
css/index.css Introduces dedicated styles for the auth modal backdrop, card, inputs, and buttons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.html
Comment on lines +16 to +17
<div id="auth-modal" class="auth-backdrop">
<div class="auth-card">
Comment thread index.html
</svg>
</button>

<h2 id="auth-title" style="margin:0 0 8px; font-size:22px; font-weight:700;">Welcome back</h2>
Comment thread index.html
<input id="auth-password" type="password" placeholder="Password" style="width:100%; padding:12px; border:1px solid #ddd; border-radius:8px; font-size:14px; margin-bottom:20px; box-sizing:border-box;">
<div class="auth-input-group" style="margin-bottom: 20px;">
<input id="auth-password" type="password" placeholder="Password" class="auth-input auth-input-password">
<button id="auth-password-toggle" type="button" class="auth-eye-btn" aria-label="Toggle password visibility">
Comment thread index.html
Comment on lines +368 to +375
document.getElementById('profile-btn').addEventListener('click', () => {
if (!localStorage.getItem('studyplan_user')) {
document.getElementById('auth-modal').style.display = 'flex';
} else {
const user = JSON.parse(localStorage.getItem('studyplan_user'));
alert(`Logged in as: ${user.email}`);
}
});
Comment thread css/index.css
Comment on lines +4994 to +4999
.auth-card {
background: var(--color-background-primary);
border: 1px solid var(--color-border-tertiary);
border-radius: 16px;
padding: 32px;
width: 360px;
Comment thread css/index.css
Comment on lines +4982 to +4992
.auth-backdrop {
display: flex;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(6px);
z-index: 9999;
align-items: center;
justify-content: center;
transition: opacity 0.3s ease;
}
@MohitSoni2021
Copy link
Copy Markdown
Author

Implemented the requested enhancement from #935 by adding password visibility toggles to both Login and Signup modals.

Key points:

  • Added show/hide password functionality using MUI IconButton and InputAdornment.
  • Preserved existing validation and authentication logic.
  • Verified functionality on responsive layouts.
  • No breaking changes introduced.

Looking forward to feedback. Thanks for reviewing!

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.

bug: Add Password Visibility Toggle to Login and Signup Modal Forms

2 participants