Skip to content

Dis 187 reset their password front#238

Open
ChloeXiao0409 wants to merge 9 commits intomainfrom
DIS-187-reset-their-password-front
Open

Dis 187 reset their password front#238
ChloeXiao0409 wants to merge 9 commits intomainfrom
DIS-187-reset-their-password-front

Conversation

@ChloeXiao0409
Copy link
Contributor

This pull request implements a complete "Forgot Password" and "Reset Password" flow in the application, including new pages, forms, validation, and user feedback modals. It also introduces some reusable UI improvements and schema sharing between authentication-related forms.

The most important changes are:

Forgot Password Flow:

  • Added a new ForgotPasswordPage with a form for users to request a password reset by email, including validation, styled components, and user feedback via a modal on success. (src/app/(public)/forgot-password/page.tsx, src/app/(public)/forgot-password/components/SuccessModal.tsx, src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts)
  • Enhanced the login form to include a "Forgot password?" link that navigates to the new forgot password page. (src/app/(public)/login/component/LoginForm.tsx, src/app/(public)/login/component/FormField.tsx)

Reset Password Flow:

  • Added a new ResetPasswordPage and a ResetPasswordForm component, allowing users to set a new password using a token from their email. This includes form validation, password visibility toggles, and a success modal. (src/app/(public)/reset-password/page.tsx, src/app/(public)/reset-password/components/ResetPasswordForm.tsx)

Shared Validation and UI Enhancements:

  • Introduced a reusable emailSchema for consistent email validation across login and forgot password forms. (src/app/(public)/login/schemas/loginSchema.ts, src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts)
  • Updated the ControllerInput component to support optional hiding of error messages, which is used to customize error display in password fields. (src/app/(public)/login/ui/controller/ControllerInput.tsx)

Copilot AI review requested due to automatic review settings November 26, 2025 23:39
Copy link
Contributor

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

This pull request implements a complete "Forgot Password" and "Reset Password" authentication flow for the application. The changes introduce new pages with forms, validation schemas, success modals, and integrate seamlessly with the existing login flow through a "Forgot password?" link.

Key Changes:

  • Added forgot password page with email submission form and success modal feedback
  • Added reset password page with token-based password reset functionality and confirmation
  • Enhanced reusable form components to support more flexible UI patterns (React nodes as labels, optional error hiding)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 21 comments.

Show a summary per file
File Description
src/app/(public)/forgot-password/page.tsx New forgot password page with email submission form, validation, and success modal
src/app/(public)/forgot-password/components/SuccessModal.tsx Reusable success modal component for user feedback
src/app/(public)/forgot-password/schemas/forgotPasswordSchema.ts Validation schema for forgot password form using shared email validation
src/app/(public)/reset-password/page.tsx New reset password page that extracts token from URL and renders form
src/app/(public)/reset-password/components/ResetPasswordForm.tsx Password reset form with visibility toggles, validation, and API integration
src/app/(public)/reset-password/schemas/resetPasswordSchema.ts Validation schema ensuring passwords match and meet minimum requirements
src/app/(public)/login/component/LoginForm.tsx Added "Forgot password?" link in password field label
src/app/(public)/login/component/FormField.tsx Enhanced to accept React nodes as labels for more flexible UI composition
src/app/(public)/login/ui/controller/ControllerInput.tsx Added optional hideError prop for custom error message positioning
src/app/(public)/login/schemas/loginSchema.ts Extracted reusable emailSchema for consistent email validation

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

ChloeXiao0409 and others added 4 commits December 1, 2025 13:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants