[Sprint 10] feat: Create contact form submission callback #93

Open
opened 2026-02-01 18:17:57 +00:00 by lmiranda · 0 comments
Owner

Overview

Implement Dash callback to POST contact form data to Formspree endpoint with proper error handling.

Files to Create/Modify

  • Create: portfolio_app/callbacks/contact.py
  • Modify: portfolio_app/callbacks/__init__.py

Acceptance Criteria

  • Callback submits form data to Formspree (https://formspree.io/f/mqelqzpd)
  • Loading state shown during submission (button loading prop)
  • Success message displayed: "Thank you for your message! I'll get back to you soon."
  • Error message displayed if submission fails
  • Honeypot field (_gotcha) included in POST for spam protection
  • Callback registered in init.py

Technical Notes

  • Use requests library for HTTP POST
  • Headers: Content-Type: application/json, Accept: application/json
  • Formspree fields: name, email, subject, message, _gotcha
  • Return dmc.Alert components for feedback (color="green" for success, color="red" for error)
  • Apply graceful error handling pattern

Labels

type/enhancement scope/frontend priority/medium size/S

Dependencies

Depends on Issue #92 (component IDs must exist first)

## Overview Implement Dash callback to POST contact form data to Formspree endpoint with proper error handling. ## Files to Create/Modify - Create: `portfolio_app/callbacks/contact.py` - Modify: `portfolio_app/callbacks/__init__.py` ## Acceptance Criteria - [ ] Callback submits form data to Formspree (https://formspree.io/f/mqelqzpd) - [ ] Loading state shown during submission (button loading prop) - [ ] Success message displayed: "Thank you for your message\! I'll get back to you soon." - [ ] Error message displayed if submission fails - [ ] Honeypot field (_gotcha) included in POST for spam protection - [ ] Callback registered in __init__.py ## Technical Notes - Use `requests` library for HTTP POST - Headers: `Content-Type: application/json`, `Accept: application/json` - Formspree fields: name, email, subject, message, _gotcha - Return dmc.Alert components for feedback (color="green" for success, color="red" for error) - Apply graceful error handling pattern ## Labels `type/enhancement` `scope/frontend` `priority/medium` `size/S` ## Dependencies Depends on Issue #92 (component IDs must exist first)
Sign in to join this conversation.