Skip to content

Comments

Fix/registration flow and UI#12

Merged
ManasMalla merged 7 commits intodsc-gitam:mainfrom
CH-JASWANTH-KUMAR:fix/registration-flow-and-ui
Dec 29, 2025
Merged

Fix/registration flow and UI#12
ManasMalla merged 7 commits intodsc-gitam:mainfrom
CH-JASWANTH-KUMAR:fix/registration-flow-and-ui

Conversation

@CH-JASWANTH-KUMAR
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 29, 2025 17:51
Copy link

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 fixes the registration flow and improves UI consistency, particularly for dark mode support. The changes focus on migrating old users who were stuck in legacy registration states, enhancing form styling, and improving the overall user experience.

Key Changes:

  • Migrates users from legacy registration states (paymentPending, notYetTeamMember) by auto-updating their database records and redirecting them to the dashboard
  • Adds comprehensive dark mode styling support across registration forms, profile pages, and timeline with proper text colors and backgrounds
  • Makes images responsive by hiding decorative background images on smaller screens (below lg breakpoint)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/components/Hero.tsx Adds ProfileModal import and state (currently unused), updates link styling for dark mode, and hides background images on mobile/tablet devices
src/app/timeline/page.tsx Attempts to add dark mode background (but incorrectly sets it to white)
src/app/register/style.css Adds dark mode support for input fields and select dropdowns with proper color schemes
src/app/register/page.tsx Implements user migration logic to auto-update legacy registration states, makes email field read-only, and adds comprehensive dark mode text styling to form inputs
src/app/profile/page.tsx Improves dark mode support for profile page text elements and tab navigation
src/app/dashboard/page.tsx Separates routing logic for incompleteRegistration and notYetTeamMember states

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

Comment on lines +10 to +16
import ProfileModal from './ProfileModal';

export default function Hero() {
const [user, setUser] = useState<User | null>(null);
const [userProgress, setUserProgress] = useState<Progress | null>(null);
const [loading, setLoading] = useState(true);
const [showProfileModal, setShowProfileModal] = useState(false);
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The showProfileModal state is initialized but never set to true anywhere in the component. This means the ProfileModal will never be displayed. Consider either removing this unused state and the ProfileModal component, or implementing the logic to trigger the modal (e.g., on first login or after certain user actions).

Suggested change
import ProfileModal from './ProfileModal';
export default function Hero() {
const [user, setUser] = useState<User | null>(null);
const [userProgress, setUserProgress] = useState<Progress | null>(null);
const [loading, setLoading] = useState(true);
const [showProfileModal, setShowProfileModal] = useState(false);
export default function Hero() {
const [user, setUser] = useState<User | null>(null);
const [userProgress, setUserProgress] = useState<Progress | null>(null);
const [loading, setLoading] = useState(true);

Copilot uses AI. Check for mistakes.
export default function TimelinePage() {
return (
<div className="min-h-screen bg-white dark:bg-black">
<div className="min-h-screen bg-white dark:bg-white">
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The dark mode class is set to dark:bg-white, which is the same as the light mode background. This defeats the purpose of dark mode. It should be dark:bg-black or another dark color to provide proper dark mode styling.

Suggested change
<div className="min-h-screen bg-white dark:bg-white">
<div className="min-h-screen bg-white dark:bg-black">

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +58
updateDoc(doc(db, "registrations", user.uid), {
payment_status: "captured",
isTeamMember: 0, // Ensure they are not stuck in "notYetTeamMember"
}).then(() => {
window.location.href = "/dashboard";
});
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The database update operations lack error handling. If the update fails, the user will be left in an inconsistent state without any feedback. Add error handling to catch potential failures and inform the user appropriately.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +75
updateDoc(doc(db, "registrations", user.uid), {
isTeamMember: 0,
}).then(() => {
window.location.href = "/dashboard";
});
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The database update operation lacks error handling. If the update fails, the user will be left in an inconsistent state without any feedback. Add error handling to catch potential failures and inform the user appropriately.

Copilot uses AI. Check for mistakes.
value={formState.email}
onChange={handleChange}
className="register-input grow md:w-1/2 "
className="register-input grow md:w-1/2 text-gray-900 dark:text-white placeholder:text-gray-500 dark:placeholder:text-gray-400 opacity-70 cursor-not-allowed bg-gray-100 dark:bg-gray-800"
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The email input field is now set to readOnly, which improves user experience by preventing accidental email changes. However, the styling includes cursor-not-allowed and visual indicators of being disabled. Consider whether the field should be truly disabled (with the disabled attribute) instead of just readOnly, as readOnly fields are still focusable and may confuse users who see the disabled styling but can still interact with the field.

Suggested change
className="register-input grow md:w-1/2 text-gray-900 dark:text-white placeholder:text-gray-500 dark:placeholder:text-gray-400 opacity-70 cursor-not-allowed bg-gray-100 dark:bg-gray-800"
className="register-input grow md:w-1/2 text-gray-900 dark:text-white placeholder:text-gray-500 dark:placeholder:text-gray-400 bg-gray-100 dark:bg-gray-800"

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +38

case Progress.notYetTeamMember:
router.push("/profile");
break;
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The routing logic is inconsistent with the register page migration logic. The register page now automatically updates users in notYetTeamMember state (isTeamMember: -1) to isTeamMember: 0 and redirects them to /dashboard. However, the dashboard then redirects users with notYetTeamMember status to /profile, creating a potential inconsistency. Since the register page is migrating these users by setting isTeamMember: 0, they should no longer be in the notYetTeamMember state. Consider removing the notYetTeamMember case here, or ensure the migration logic in register page is also reflected in the GetUserProgress function.

Suggested change
case Progress.notYetTeamMember:
router.push("/profile");
break;

Copilot uses AI. Check for mistakes.
Comment on lines +340 to +342
<p className="mt-3 text-lg text-gray-700 dark:text-gray-300">24-25th March 2026</p>

<p className="opacity-60 text-gray-700 dark:text-gray-300">Gandhi Institute of Technology and Management, Visakhapatnam</p>
<p className="text-gray-700 dark:text-gray-300">Gandhi Institute of Technology and Management, Visakhapatnam</p>
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The removal of opacity-60 from these text elements improves readability. However, the paragraph elements lack sufficient distinction from the heading. Consider adding some visual hierarchy through subtle opacity, font weight, or color variations to maintain a clear information hierarchy.

Copilot uses AI. Check for mistakes.
@ManasMalla ManasMalla merged commit 79fc2f1 into dsc-gitam:main Dec 29, 2025
7 checks passed
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