ui: move auth switch links into authentication card
Closes # 264
Description
This PR improves the authentication user experience (UX) by relocating the "Already have an account? / Don’t have an account?" navigation links. Previously, these links were located in the global header; they have now been moved directly into the authentication card on both the Login and Signup pages.
UX Rationale:
- Fitts's Law: Reduces the distance between the primary action (Sign In/Up button) and the alternative action (switching accounts).
- Distraction-Free Auth: Cleans up the header to keep the user focused on the authentication task.
- Mobile First: Improves thumb-reachability on smaller screens by keeping all interactions contained within the central card.
Changes Made
- LoginPage.tsx: Removed the "Sign up" link from the header and added it to the bottom of the login card with a visual separator.
- SignupPage.tsx: Removed the "Sign in" link from the header and added it to the bottom of the signup card.
- Styling: Added a subtle top border (border-t) and consistent padding to the new card footers to match the existing design system.
- Responsiveness: Ensured the links remain centered and legible across all screen sizes.
- Dark Mode: Applied dark: utility classes to ensure the border and text colors adapt correctly to the dark theme.
Screenshots or Visual Changes
-
before :
-
after:
Checklist
- I have read the contributing guidelines.
- My changes follow the project's code style.
- I have tested the changes locally in both light and dark modes.
- I have verified the links function correctly and lead to the intended routes.
Summary by CodeRabbit
-
Style
- Reorganized login page layout: signup prompt moved from header to below social login buttons
- Reorganized signup page layout: sign-in link moved from header to below signup form
-
Chores
- Removed example environment variable entries from configuration template
✏️ Tip: You can customize this high-level summary in your review settings.
Environment variables removed from example config. Login and Signup page components refactored to relocate authentication mode toggle prompts from page headers to dedicated sections positioned below their respective primary authentication forms. 🎯 2 (Simple) | ⏱️ ~12 minutes 🐰 Hop, hop, the UI's rearranged!📝 Walkthrough
Walkthrough
Changes
Cohort / File(s)
Summary
Configuration
Frontend/env-exampleRemoved three example environment variable declarations: Supabase URL, Supabase anon key, and YouTube API key.
Authentication UI Layout
Frontend/src/pages/Login.tsx, Frontend/src/pages/Signup.tsxRelocated signup/signin toggle prompts from inline headers to dedicated sections below social login and signup forms respectively. Simplified page headers to display only essential content. Removed stale navigation comments.
Estimated code review effort
Poem
Auth prompts find a better place,
No more secrets in the env file—
Just clean headers, a friendlier face! ✨
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The PR title directly describes the main change: moving authentication switch links from the header into the authentication card on Login and Signup pages, which aligns with the file modifications shown in the raw summary. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Hi Maintainers, Just a gentle follow-up on this PR. All checks are passing, please let me know if any changes are needed from my side. Thanks! @Saahi30 , @Aditya30ag
@chandansgowda looks good to me