Skip to content
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

Fix Signup Form Alignment and Improve Styling #2428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 83 additions & 31 deletions src/User/pages/UserAuth/UserAuth.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,84 @@
.parent-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f0f5f0;
padding: 20px;
}

.flip-container {
perspective: 1000px;
width: 100%;
height: 100%;
}

.flip-container.flipped .flipper {
transform: rotateY(180deg);
}

.flipper {
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
}

.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
}

.front {
z-index: 2;
transform: rotateY(0deg);
}

.back {
transform: rotateY(180deg);
}
perspective: 1000px;
width: 400px;
height: 500px;
position: relative;
}
Comment on lines +11 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Consider using responsive dimensions for the flip container.

The fixed width of 400px might cause overflow on mobile devices with smaller screens.

Suggest implementing responsive width:

 .flip-container {
   perspective: 1000px;
-  width: 400px;  
-  height: 500px; 
+  width: min(400px, 90%);
+  min-height: 500px;
   position: relative;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
perspective: 1000px;
width: 400px;
height: 500px;
position: relative;
}
perspective: 1000px;
width: min(400px, 90%);
min-height: 500px;
position: relative;
}


.flip-container.flipped .flipper {
transform: rotateY(180deg);
}

.flipper {
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
width: 100%;
height: 100%;
}

.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.front {
z-index: 2;
transform: rotateY(0deg);
}

.back {
transform: rotateY(180deg);
}

.signup-container {
background-color: #1f2b38;
border-radius: 8px;
padding: 30px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
Comment on lines +47 to +52
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Color contrast issues detected in signup form

The dark background (#1f2b38) is used with:

  • White text for the button (sufficient contrast)
  • #007bff blue for links (insufficient contrast ratio, below WCAG AA standards)

Consider:

  • Using a lighter shade of blue (e.g., #4B9EFF) for links to meet WCAG AA contrast requirements
  • Adding explicit text color definition for the form labels and input text to ensure readability
🔗 Analysis chain

Verify color contrast for accessibility.

The dark background (#1f2b38) needs sufficient contrast with text colors for WCAG compliance.


Let me generate another script to find the text colors specifically used within the UserAuth component to verify the contrast with the dark background (#1f2b38).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any color definitions in the codebase to verify contrast
rg -g '*.css' '(color:|background-color:).*#[0-9a-fA-F]{3,6}'

Length of output: 3248


Script:

#!/bin/bash
# Search for color-related styles in UserAuth.css and any imported stylesheets
rg -g 'UserAuth.css' '(color:|background-color:).*#[0-9a-fA-F]{3,6}' -A 2 -B 2

Length of output: 1205


.signup-container input {
width: 100%;
margin-bottom: 15px;
padding: 12px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
}
Comment on lines +54 to +61
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add focus states and transitions for better UX.

Input fields and buttons lack focus states and smooth transitions for interactive elements.

Add focus states and transitions:

 .signup-container input {
   width: 100%;
   margin-bottom: 15px;
   padding: 12px;
   border-radius: 5px;
   border: 1px solid #ccc;
   font-size: 16px;
+  transition: border-color 0.3s ease;
+  outline: none;
 }
+
+.signup-container input:focus {
+  border-color: #007bff;
+  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
+}

 .signup-container button {
   width: 100%;
   padding: 12px;
   background-color: #007bff;
   color: white;
   border: none;
   border-radius: 5px;
   cursor: pointer;
   font-size: 18px;
+  transition: background-color 0.3s ease;
+}
+
+.signup-container button:hover {
+  background-color: #0056b3;
+}
+
+.signup-container button:disabled {
+  background-color: #cccccc;
+  cursor: not-allowed;
+}

Also applies to: 63-72


.signup-container button {
width: 100%;
padding: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 18px;
}

.signup-container a {
display: block;
text-align: center;
margin-top: 10px;
color: #007bff;
text-decoration: none;
}

.signup-container a:hover {
text-decoration: underline;
}
Comment on lines +74 to +84
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add focus state for keyboard navigation.

Links should have a visible focus state for accessibility.

Add focus state styling:

 .signup-container a {
   display: block;
   text-align: center;
   margin-top: 10px;
   color: #007bff;
   text-decoration: none;
+  outline: none;
 }

-.signup-container a:hover {
+.signup-container a:hover,
+.signup-container a:focus {
   text-decoration: underline;
+  outline: 2px solid #007bff;
+  outline-offset: 2px;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.signup-container a {
display: block;
text-align: center;
margin-top: 10px;
color: #007bff;
text-decoration: none;
}
.signup-container a:hover {
text-decoration: underline;
}
.signup-container a {
display: block;
text-align: center;
margin-top: 10px;
color: #007bff;
text-decoration: none;
outline: none;
}
.signup-container a:hover,
.signup-container a:focus {
text-decoration: underline;
outline: 2px solid #007bff;
outline-offset: 2px;
}