Skip to content

Improve Contact Us Page UI/UX and Theme Consistency#441

Open
yuvraj-k-singh wants to merge 2 commits into
GitMetricsLab:mainfrom
yuvraj-k-singh:feature/improve-contactpage
Open

Improve Contact Us Page UI/UX and Theme Consistency#441
yuvraj-k-singh wants to merge 2 commits into
GitMetricsLab:mainfrom
yuvraj-k-singh:feature/improve-contactpage

Conversation

@yuvraj-k-singh
Copy link
Copy Markdown
Contributor

@yuvraj-k-singh yuvraj-k-singh commented May 23, 2026

Related Issue


Description

This PR completely overhauls the Contact Us page to elevate its UI/UX and establish comprehensive dark/light theme consistency across the platform.

Key improvements include:

  • Layout Restructuring: Shifted from a fragmented split layout to a single, unified glassmorphism dashboard canvas that cuts down eye tracking fatigue and improves desktop/mobile scannability.
  • Interactive Micro-Glows: Implemented a state-aware ambient radial background blur that changes color fluidly depending on which form field the user is actively engaging with.
  • Form Component Polish:
    • Standardized input field heights (h-11) to prevent vertical layout compression.
    • Refactored custom <select> drop-down styles to hide native system arrows and perfectly match text input line heights.
    • Decoupled the form action button out of the absolute bounds of the textarea to ensure user input strings never wrap beneath elements.
  • State Control Optimization: Converted form input nodes to fully controlled state fields (formData) so payload metrics can be cleanly captured and dispatched to core platform handlers.

How Has This Been Tested?

  • Manual Visual Review: Verified across standard monitor resolutions, tablet dimensions, and small screen configurations to ensure cards wrap responsively without layout clipping.
  • Accessibility & Focus State Testing: Evaluated with focus tab triggers to confirm rings expand uniformly and the dynamic backdrop aura triggers as expected.
  • Theme Inversion Checks: Checked with the local ThemeContext mode switch to guarantee optimal text contrast (placeholder-slate-500 against deep #0c101d panel slots) for flawless dark mode legibility.

Screenshots (if applicable)

Before:
image


After:
image


Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Enhanced contact form submission with auto-dismissing success notification.
  • UI/UX Improvements

    • Redesigned contact form with glassmorphism card layout and new sidebar design.
    • Added dynamic visual glow effect that responds to user interaction with form fields.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 23, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 6de7ab8
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a1112b4265920000835ed53
😎 Deploy Preview https://deploy-preview-441--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

Warning

Review limit reached

@yuvraj-k-singh, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 22 minutes and 40 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f8ba5d9d-7455-4c0f-9360-81d3fa42b309

📥 Commits

Reviewing files that changed from the base of the PR and between d382fa8 and 6de7ab8.

📒 Files selected for processing (1)
  • src/pages/Contact/Contact.tsx
📝 Walkthrough

Walkthrough

The Contact page has been substantially redesigned with a controlled form state system, unified submit handler with async simulation and auto-dismissing success toast, and a new glassmorphism layout featuring a left sidebar with communication badges and a right-aligned form with dynamic radial glow effects.

Changes

Contact Page Redesign

Layer / File(s) Summary
Form state and submission logic
src/pages/Contact/Contact.tsx
formData state object (name, email, subject, message) and focusedField tracking replace individual field states; unified handleSubmit prevents default form submission, simulates async delay with isSubmitting flag, resets form fields, shows success popup, and schedules auto-dismiss after 5 seconds with proper timer cleanup.
Layout redesign and controlled form fields
src/pages/Contact/Contact.tsx
Page layout converted from two-column grid to glassmorphism card with sidebar "communication badges" rendered from array; form inputs/select/textarea converted to controlled components wired to formData state; focus/blur handlers update focusedField to drive dynamic radial glow effect positioned behind form; submit button disabled during submission and conditionally displayed with send icon.
Success notification UI
src/pages/Contact/Contact.tsx
Success popup redesigned as floating bottom-right toast with themed container, success icon, updated message copy, and close button that sets showPopup to false for manual dismissal.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #318: Contact page form state and UX modifications align with the vector-matched issue's Contact.tsx changes regarding form submission flow and layout improvements.

Possibly related PRs

  • GitMetricsLab/github_tracker#196: Both PRs modify src/pages/Contact/Contact.tsx with overlapping success popup/toast styling and responsiveness adjustments, though this PR further refactors the form to fully controlled state and overhauls the submit flow architecture.

Suggested labels

level:intermediate, quality:clean, type:accessibility

Poem

🐰 A form that once spread wild and free,
Now dances under glassy decree—
With badges gleaming, glow aflame,
Each keystroke feeds the radial flame,
Success floats down like morning dew,
The Contact page is shiny new! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve Contact Us Page UI/UX and Theme Consistency' directly and accurately summarizes the main change—a comprehensive redesign of the Contact page with updated styling and layout.
Description check ✅ Passed The description is comprehensive and covers all required template sections: Related Issue (#391), detailed Description with key improvements, How It's Been Tested with specific testing approaches, before/after Screenshots, and Type of Change selections.
Linked Issues check ✅ Passed The PR successfully addresses all objectives from #391: redesigned the Contact page layout to glassmorphism for theme consistency, implemented interactive micro-glows for form field engagement, improved form component polish with standardized heights and dropdown styling, optimized state control with formData, and tested responsiveness and theme compatibility across devices.
Out of Scope Changes check ✅ Passed All changes in the Contact.tsx file are directly aligned with the #391 objectives—no unrelated modifications detected. The substantial rewrite (208 additions, 268 deletions) focuses exclusively on Contact page redesign, layout restructuring, form state management, and UI/UX improvements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/pages/Contact/Contact.tsx (1)

36-48: ⚡ Quick win

Consider adding client-side validation.

The form relies solely on HTML5 required attributes. The Signup component shows explicit validation patterns (email regex, field-specific error messages). Consider adding similar validation here for better UX, especially for email format and subject selection.

♻️ Example validation pattern
const handleSubmit = async (e: React.FormEvent) => {
  e.preventDefault();
  
  // Validate email format
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email.trim())) {
    // Show error: "Enter a valid email"
    return;
  }
  
  // Validate subject selected
  if (!formData.subject) {
    // Show error: "Please select a subject"
    return;
  }
  
  setIsSubmitting(true);
  // ... rest of submission logic
};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Contact/Contact.tsx` around lines 36 - 48, The handleSubmit
function currently only relies on HTML required attributes; add client-side
validation inside handleSubmit before calling setIsSubmitting or awaiting the
delay: validate formData.email with a robust regex (e.g.,
/^[^\s@]+@[^\s@]+\.[^\s@]+$/) and ensure formData.subject is non-empty, set and
show field-specific errors via a local errors state (e.g., useState for errors)
and return early on validation failure so setIsSubmitting/setShowPopup are not
triggered; trim inputs (formData.email.trim()) and optionally focus the first
invalid field to improve UX, then proceed with the existing submission flow and
reset setFormData only after successful validation/submission.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/Contact/Contact.tsx`:
- Line 105: Update the image alt text in the Contact component: locate the <img>
with src "/crl-icon.png" (in Contact or Contact.tsx) and replace the generic
alt="Logo" with a more descriptive alt like "GitHub Tracker logo" so screen
readers get meaningful context.
- Around line 36-48: The handleSubmit async flow currently has no error
handling; wrap the simulated API delay and any future API call inside a
try/catch/finally in the handleSubmit function so failures are caught, an error
state is set or logged (e.g., setError or process the caught error), and
setIsSubmitting(false) is always executed in finally; only call
setShowPopup(true) and resetFormData (setFormData(...)) on success inside the
try block (follow the pattern used in Signup.tsx for try/catch/finally and error
state management).
- Around line 127-138: The badge elements currently rendered in Contact.tsx (the
block using label, Icon, detail) use a non-interactive <div> with cursor-pointer
and hover styles, which misleads users; change each badge to an interactive
element (wrap the outer <div key={label} ...> in a semantic <a> when linking
(mailto:, tel:, external URL) or a <button> when performing actions like
copy-to-clipboard), add the appropriate onClick handler (e.g., open mailto/tel
or copy detail), include accessible attributes (aria-label describing the
action, role if needed, and ensure keyboard focusability), and remove misleading
cursor styles when an item is intentionally static; update any event handlers to
reference label/detail/Icon so behavior matches the rendered content.
- Around line 50-54: The timeout cleanup in handleSubmit is incorrect because
returning a function there does nothing; move the timer logic into a useEffect
that watches showPopup (or store the timer ID in a ref and clear on unmount).
Specifically, remove the setTimeout/return cleanup from handleSubmit, add a
useEffect that when showPopup becomes true sets a timer to call
setShowPopup(false) after 5000ms and clears the timer in its cleanup, and/or
create a ref (e.g., popupTimerRef) to hold the timer ID and clear it in a
useEffect cleanup that runs on unmount; ensure you update references to
showPopup and setShowPopup accordingly.

---

Nitpick comments:
In `@src/pages/Contact/Contact.tsx`:
- Around line 36-48: The handleSubmit function currently only relies on HTML
required attributes; add client-side validation inside handleSubmit before
calling setIsSubmitting or awaiting the delay: validate formData.email with a
robust regex (e.g., /^[^\s@]+@[^\s@]+\.[^\s@]+$/) and ensure formData.subject is
non-empty, set and show field-specific errors via a local errors state (e.g.,
useState for errors) and return early on validation failure so
setIsSubmitting/setShowPopup are not triggered; trim inputs
(formData.email.trim()) and optionally focus the first invalid field to improve
UX, then proceed with the existing submission flow and reset setFormData only
after successful validation/submission.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a5d2d605-5055-4fe8-85ed-ec67082dcccf

📥 Commits

Reviewing files that changed from the base of the PR and between 9d34c19 and d382fa8.

📒 Files selected for processing (1)
  • src/pages/Contact/Contact.tsx

Comment thread src/pages/Contact/Contact.tsx Outdated
Comment thread src/pages/Contact/Contact.tsx Outdated
Comment thread src/pages/Contact/Contact.tsx Outdated
Comment thread src/pages/Contact/Contact.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Improve Contact Us Page UI/UX and Theme Consistency

2 participants