Skip to content

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

Merged
mehul-m-prajapati merged 3 commits into
GitMetricsLab:mainfrom
yuvraj-k-singh:feature/improve-contactpage
May 26, 2026
Merged

Improve Contact Us Page UI/UX and Theme Consistency#441
mehul-m-prajapati merged 3 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

    • Unified contact form submission with disabled submit state while sending and a bottom-right dismissible success toast.
  • UI/UX Improvements

    • Redesigned contact page into a glassmorphism card with a left-side contact badges panel and right-side form console.
    • Dynamic radial glow that responds to focused fields and a reordered submission row for clearer actions.
  • Bug Fixes

    • Submission state reliably resets on failure to prevent stuck buttons.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 23, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 7b29b04
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a15e136d586dc0008b34b7e
😎 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

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 69e72bff-74d0-44c6-ac22-e8518a6ad48c

📥 Commits

Reviewing files that changed from the base of the PR and between d382fa8 and 7b29b04.

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

📝 Walkthrough

Walkthrough

The Contact page was rebuilt with controlled form state and unified async submit handling, a visual redesign into a glassmorphism card with a badge sidebar and dynamic radial glow, and a bottom-right auto-dismissing success toast.

Changes

Contact Page Redesign

Layer / File(s) Summary
Imports, form state, and submission logic
src/pages/Contact/Contact.tsx
Updated imports; added focusedField and formData state; handleInputChange and handleSubmit manage controlled inputs, set isSubmitting, simulate async delay with try/catch/finally, clear form, show popup, and auto-dismiss via useEffect with cleanup.
Layout, grid overlay, and radial glow
src/pages/Contact/Contact.tsx
Page layout replaced by a glassmorphism card with a grid background overlay and a left sidebar rendering communication badges; dynamic radial glow responds to focusedField.
Controlled form console and submit row
src/pages/Contact/Contact.tsx
Right-side form wired to formData with focus/blur updating focusedField; subject dropdown uses explicit values; submit button moved to a dedicated row and disables while isSubmitting.
Bottom-right success toast
src/pages/Contact/Contact.tsx
Success notification changed to a floating bottom-right toast with success icon, updated message text, auto-dismiss timer, and close button that sets showPopup to false.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 In a glassy card I hop and hum,
Fields blink and glow where fingers come—
Badges whisper, dropdowns sing,
A toast drifts in upon a spring—
Hooray, the Contact form is done!

🚥 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
@mehul-m-prajapati mehul-m-prajapati merged commit c0de146 into GitMetricsLab:main May 26, 2026
4 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉🎉 Thank you for your contribution! Your PR #441 has been merged! 🎉🎉

@coderabbitai coderabbitai Bot mentioned this pull request May 31, 2026
5 tasks
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