Skip to content

Conversation

yasirakhlaque
Copy link

Description

This Pull Request introduces significant user interface and user experience enhancements to the Login and Register pages, as shown in the attached screenshots. The goal was to create a more modern, intuitive, and visually appealing authentication flow for users of Paisable.

Key visual changes include:

  • Better visual hierarchy and spacing to guide the user's eye and reduce cognitive load.
  • Improved form styling for input fields, including better focus states (e.g., a subtle border change on focus).
  • Added icons for better user experience (UX), such as the email icon in the login field and the visibility toggle for the password.
  • Enhanced card design with a more refined look and a subtle gradient effect for the backdrop of the forms.

Related Issue

Fixes #130

Motivation and Context

This change is required to modernize the look and feel of the application's most visible entry points. The improvements solve problems related to visual appeal, clarity, and overall professionalism, ensuring a positive first impression for new and returning users.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an existing feature)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Test (adds or updates tests only)
  • Documentation (non-code change)

How Has This Been Tested?

The changes were primarily tested via local development by:

  • Visual inspection across standard desktop screen sizes to ensure consistent styling and responsiveness.
  • Interactive checks for all form elements, confirming that focus states, click states, and icons (like the password visibility toggle) function correctly.
  • Form submission checks to ensure the new styling did not break the underlying logic for registration and login.

Screenshots (if applicable):

Login Page Register Page
screencapture-localhost-5173-login-2025-10-17-12_07_43 screencapture-localhost-5173-register-2025-10-17-12_07_58

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 06:49
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for paisable ready!

Name Link
🔨 Latest commit 30c784f
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68f1e70536b9c90008dfc088
😎 Deploy Preview https://deploy-preview-136--paisable.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Copilot 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

Enhances the authentication UI/UX for Login and Register pages with modern styling, better visual hierarchy, and interactive elements like icons and loading states.

  • Adds loading states and improved error presentation on Login and Register forms
  • Introduces password strength indicators and requirement checklist on Register page
  • Refactors PasswordInput to accept custom className and adds accessibility improvements for the visibility toggle

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
frontend/src/pages/RegisterPage.jsx Adds new layout, email icon, password strength meter, and loading/disabled submit handling
frontend/src/pages/LoginPage.jsx Adds new layout, email icon, loading/disabled submit handling, and improved error presentation
frontend/src/components/PasswordInput.jsx Extends API to accept className, tweaks styling composition, and improves accessibility for the eye toggle

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// Default classes if no className is provided
const defaultClasses = "w-full px-4 py-2 pr-10 mt-2 border rounded-md focus:outline-none focus:ring-1";
const errorClasses = error ? 'border-red-500 focus:ring-red-500' : 'focus:ring-blue-600 dark:border-gray-600';
const inputClasses = className || `${defaultClasses} ${errorClasses}`;
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

When a custom className is provided, the component drops its own error styling (errorClasses). This makes the error prop ineffective in those cases. Consider merging classes instead so consumers can extend styles without losing built‑in error visuals: const inputClasses = ${defaultClasses} ${errorClasses} ${className ?? ''}.

Suggested change
const inputClasses = className || `${defaultClasses} ${errorClasses}`;
const inputClasses = `${defaultClasses} ${errorClasses} ${className ?? ''}`;

Copilot uses AI. Check for mistakes.

};

// Default classes if no className is provided
const defaultClasses = "w-full px-4 py-2 pr-10 mt-2 border rounded-md focus:outline-none focus:ring-1";
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

pr-10 is specified here and also appended on the input, leading to duplicate padding classes. Remove it from defaultClasses and keep the single pr-10 appended at render to avoid duplication and ensure a single source of truth.

Suggested change
const defaultClasses = "w-full px-4 py-2 pr-10 mt-2 border rounded-md focus:outline-none focus:ring-1";
const defaultClasses = "w-full px-4 py-2 mt-2 border rounded-md focus:outline-none focus:ring-1";

Copilot uses AI. Check for mistakes.

type={isPasswordVisible ? 'text' : 'password'}
placeholder={placeholder}
className={`w-full px-4 py-2 pr-10 mt-2 border rounded-md focus:outline-none focus:ring-1 ${error ? 'border-red-500 focus:ring-red-500' : 'focus:ring-blue-600 dark:border-gray-600'}`}
className={`${inputClasses} pr-10`}
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

This adds pr-10 even though pr-10 is already included in defaultClasses. After removing pr-10 from defaultClasses (as suggested), keeping it here ensures the icon spacing remains consistent without duplication.

Copilot uses AI. Check for mistakes.

</label>
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<HiMail className="h-5 w-5 text-gray-400 dark:text-gray-500" />
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The mail icon is decorative; add aria-hidden="true" to prevent it from being announced by screen readers: <HiMail aria-hidden="true" className="..." />.

Suggested change
<HiMail className="h-5 w-5 text-gray-400 dark:text-gray-500" />
<HiMail aria-hidden="true" className="h-5 w-5 text-gray-400 dark:text-gray-500" />

Copilot uses AI. Check for mistakes.

</label>
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<HiMail className="h-5 w-5 text-gray-400 dark:text-gray-500" />
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

The mail icon is decorative; add aria-hidden="true" so it isn't read by screen readers: <HiMail aria-hidden="true" className="..." />.

Suggested change
<HiMail className="h-5 w-5 text-gray-400 dark:text-gray-500" />
<HiMail aria-hidden="true" className="h-5 w-5 text-gray-400 dark:text-gray-500" />

Copilot uses AI. Check for mistakes.

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.

enhancement: ✨ Enhance UI/UX of Authentication Pages

1 participant