Skip to content

feat: add loading indicators to signup and login pages; remove loading from AuthContext#232

Merged
Joshkovu merged 1 commit into
mainfrom
fix/loading
May 6, 2026
Merged

feat: add loading indicators to signup and login pages; remove loading from AuthContext#232
Joshkovu merged 1 commit into
mainfrom
fix/loading

Conversation

@Joshkovu
Copy link
Copy Markdown
Owner

@Joshkovu Joshkovu commented May 6, 2026

Co-authored-by: Copilot copilot@github.com

…g from AuthContext

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 6, 2026 08:47
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying logify-frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: 46fa36c
Status: ✅  Deploy successful!
Preview URL: https://3e6dd1d7.logify-frontend.pages.dev
Branch Preview URL: https://fix-loading.logify-frontend.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: d5604a8b-d5ad-4032-8df8-5554a2855c99

📥 Commits

Reviewing files that changed from the base of the PR and between 06e7a9d and 46fa36c.

📒 Files selected for processing (7)
  • logify-frontend/src/contexts/AuthContext.jsx
  • logify-frontend/src/pages/AdminSignupPage.jsx
  • logify-frontend/src/pages/LoginPage.jsx
  • logify-frontend/src/pages/StudentSignupPage.jsx
  • logify-frontend/src/pages/SupervisorSignupPage.jsx
  • logify-frontend/src/pages/TutorialPage.jsx
  • logify-frontend/src/pages/auth/GuestOnlyRoute.jsx

Summary by CodeRabbit

  • New Features
    • Loading indicators now display on login and signup pages during form submission.
  • Refactor
    • Tutorial page is now accessible without authentication.

Walkthrough

AuthContext no longer renders loading UI; instead, Loading is displayed per-page during form submission. GuestOnlyRoute returns null during authentication state checking. TutorialPage access control is removed. AdminSignUp function is exposed through AuthContext.

Changes

Loading State Refactoring & Context API Updates

Layer / File(s) Summary
Context API
logify-frontend/src/contexts/AuthContext.jsx
Removed Loading component rendering from AuthContext; added adminSignUp to the context value exposed to consumers.
Route Guard Adjustments
logify-frontend/src/pages/auth/GuestOnlyRoute.jsx
GuestOnlyRoute now returns null during auth state checking instead of rendering a loading spinner.
Page-Level Loading UI
logify-frontend/src/pages/LoginPage.jsx, AdminSignupPage.jsx, StudentSignupPage.jsx, SupervisorSignupPage.jsx
Each page component imports and conditionally renders Loading during form submission (isSubmitting).
Access Control Removal
logify-frontend/src/pages/TutorialPage.jsx
Removed GuestOnlyRoute wrapper and its import; TutorialPage now renders without authentication gating.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 The spinner hops from nest to nest,
No longer guards the context's quest,
Each page now tends its loading dance,
While Tutorial takes its chance!
AdminSignup joins the auth parade,
A refactored, swifter trade.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Joshkovu Joshkovu merged commit cb4fe7b into main May 6, 2026
6 of 8 checks passed
@Joshkovu Joshkovu review requested due to automatic review settings May 6, 2026 09:11
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.

1 participant