-
Notifications
You must be signed in to change notification settings - Fork 0
Adjust auth pages #29
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
Conversation
Everything is changing to "Register/Login/Sign Out".
This makes it easier to handle the show password button layout globally. This also makes the show password button absolutely positioned, so autofilling fills the background color consistently between email and password fields.
It turns out this is the only place on the page that uses this checkbox now, so I'm not surprised that the color wasn't properly assigned for both themes.
This is to add a delay to requests like checking the password, so the API doesn't get called every time you type a character.
Using the new debounce hook, it will check the password for strength in the API after a second of not typing.
The best part of doing full stack development is the ability to change the API to make your life easier on frontend.
Really just for styling, but consistent styling.
There was a problem hiding this 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 PR updates the authentication pages with improved UX and standardized nomenclature. The changes focus on replacing "sign up" terminology with "register", implementing password strength validation, and enhancing form interactions.
Key changes:
- Standardized auth action names to "Login", "Register", and "Sign Out" across all pages and routes
- Added password strength checking with real-time validation using a new debounced API call
- Introduced show/hide password functionality and "Remember me" toggle for better user experience
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/verify-email/page.tsx | Updated button text and route from "sign up" to "register" |
| app/ui/components/link-text.tsx | New component for consistent link styling with hover effects |
| app/ui/components/header/account-dropdown.tsx | Renamed logout function and updated menu text to "Sign Out" |
| app/ui/components/checkbox.tsx | Enhanced with proper light/dark mode color theming |
| app/ui/components/auth/text-input-field.tsx | New reusable input component with show/hide password functionality |
| app/ui/components/auth/password-criteria.tsx | New component for displaying password strength requirements |
| app/reset-password/success/page.tsx | Updated button text capitalization |
| app/reset-password/page.tsx | Added password strength validation and updated form components |
| app/register/page.tsx | Complete overhaul with new components, validation, and route updates |
| app/register/email-sent/page.tsx | Updated session storage keys and button text |
| app/login/page.tsx | Added remember me functionality and updated form components |
| app/forgot-password/page.tsx | Updated title and form components |
| app/_lib/use-debounce.tsx | New custom hook for debouncing API calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
mirmirmirr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 (yay password viewing)
What?
This PR introduces a bunch of new features and fixes to the auth pages.
Nomenclature and Capitalization Change
The names of the auth actions have been changed to "Login", "Register", and "Sign Out". This change is reflected on the pages, on buttons, and on the URL routes.
The capitalization of buttons, titles, and links were also adjusted to align with our new agreed-upon style.
Show Password Buttons
On all pages with password fields (
/login,/register, and/reset-password), the password fields now have a button to show the text.New
TextInputFieldComponentJust for the auth pages, this makes it easier to manage the styling and functionality of these fields.
New "Remember Me" Toggle
On the login page, the mysterious (and previously unused) custom
Checkboxcomponent was used to accomplish this.The
Checkboxcomponent was also adjusted to have proper coloring on both light and dark mode.New
useDebounceHookInitially created for password strength checking, this hook takes a function, dependencies, and an optional delay. After dependencies are changed, it waits for inactivity of the delay's duration before calling the function.
This is useful for cases like the
/auth/check-passwordAPI, where you don't want to call it every single time the user types a letter.Password Strength Checking
On both the
/registerand/reset-passwordpages, the passwords are checked against the API to make sure they are strong enough before trying to send an API request.This makes sure that the rate limits aren't hit just because the user didn't make a strong enough password. It's also just good UX to give the user quick feedback.
Proper Link Text Styling
I created the
LinkTextcomponent to handle this styling. When hovering the text, it will be underlined and colored with the appropriate accent color. This helps give feedback so the user knows that it's a link.Why?
The auth pages needed some tweaks before they were production-ready. We want a good UX, especially when signing up.