Skip to content

Conversation

@Biki-dev
Copy link

@Biki-dev Biki-dev commented Nov 22, 2025

Pull Request Description

🎯 Issue

Closes #567

πŸ“ Summary

This PR adds a contact form to the Contact Us page using Formspree integration and improves the layout of contact method cards.

✨ Changes Made

Contact Form

  • βœ… Added comprehensive contact form with Formspree integration
  • βœ… Implemented form fields:
    • Name (required text input)
    • Email (required with validation)
    • Subject (required text input)
    • User Role (optional dropdown: Educator/Student/Developer/Contributor/Other)
    • Message (required textarea)
  • βœ… Added form validation and loading states
  • βœ… Implemented success/error message handling with animations
  • βœ… Form auto-resets after successful submission
  • βœ… Async form submission without page reload

Layout Updates

  • βœ… Updated contact methods section to display 2 cards (By Mail, By Phone)
  • βœ… Removed "By Email" card (now replaced by the contact form below)
  • βœ… Maintained responsive design for mobile and desktop and Dark-Light Both theme

UX Improvements

  • βœ… Success message with green alert appears on successful submission
  • βœ… Error message with fallback instructions if submission fails
  • βœ… Smooth animations using Framer Motion
  • βœ… Full dark mode support

πŸ”§ Technical Details

  • Used Formspree API for form handling
  • Maintained existing design system (red accent colors, rounded corners, shadows)
  • All form inputs include proper accessibility labels
  • TypeScript types updated for form state management

πŸ“‹ Setup Required

Important: Replace 'YOUR_FORM_ID' in ContactUs.tsx line 74 with the actual Formspree form ID after creating a form at https://formspree.io by required receiving email address of maintainer's

const response = await fetch('https://formspree.io/f/YOUR_FORM_ID', {

πŸ–ΌοΈ Screenshots

Screenshot 2025-11-22 184151 Screenshot 2025-11-22 184200 Screenshot 2025-11-22 184237 Screenshot 2025-11-22 180443

βœ… Testing Checklist

  • Form submits successfully with valid data
  • Form validation works for required fields
  • Email validation works correctly
  • Form resets after successful submission
  • Responsive design works on mobile devices
  • Dark mode displays correctly
  • All animations work smoothly

πŸ“¦ Dependencies

No new dependencies added (uses existing Framer Motion)


Issue #567 Reference

Original Issue Description

Title: Feature Request: Add a "Contact Us" Form to the Sugar Labs Website

Description:
The Sugar Labs website currently does not include a Contact Us form, which makes it difficult for users, educators, contributors, and partners to reach out. Adding this feature will significantly improve communication and accessibility.

@github-actions
Copy link

❌ Checks Failed

Status: 🚫 Not ready to merge

Please fix the following issues before merging:

πŸ“ Code Linting Failed

Issue: Code formatting or style violations detected.

Specific problems:

β€’ Code formatting issues detected

How to fix:

Platform Command Description
🐧 Unix/macOS/Linux npm run format Auto-fix all formatting issues
πŸͺŸ Windows npm run format:file <filename> Fix specific files
πŸ” Check Only npm run format:check Check formatting without fixing

Need help with linting? Check out the Linting Guide for Windows Users for detailed instructions.


πŸ› οΈ Next Steps

  1. Fix the issues mentioned above
  2. Test locally to ensure everything works
  3. Push your fixes to this branch
  4. Wait for re-check - This bot will automatically run again

πŸ€– This comment will be updated automatically when you push new commits

@github-actions
Copy link

πŸŽ‰ All Checks Passed!

Status: βœ… Ready to merge

βœ… Completed Workflows

Workflow Status Details
πŸ”¨ Continuous Integration βœ… Passed Build completed successfully
πŸ“ Code Linting βœ… Passed All formatting and style checks passed

πŸš€ This PR is ready for review and can be safely merged to main branch!

Great work! Your code meets all quality standards. πŸ‘

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.

πŸš€ Feature Request: Add a "Contact Us" Form to the Sugar Labs Website

1 participant