-
Notifications
You must be signed in to change notification settings - Fork 0
feat: use mailto to send formatted emails #18
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
feat: use mailto to send formatted emails #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a new mailto-based email system to replace the previous server-side email sending functionality through bal-admin. The changes remove CAPTCHA validation and server-side email handling in favor of generating pre-formatted emails that users can send through their email clients.
- Removes server-side email sending functionality and CAPTCHA validation
- Implements mailto URL generation for pre-formatted emails
- Refactors forms to use the new mailto system instead of direct submission
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/signalement.utils.ts | Adds function to browse to external signalement system |
| src/types/signalement.types.ts | Defines new SignalementType enum for different location operations |
| src/types/APIGeo.types.ts | Adds interface for commune API responses |
| src/pages/commune/index.tsx | Extracts commune fetching logic to separate module |
| src/lib/api-geo.ts | Creates dedicated module for geo API functions |
| src/lib/api-depot.ts | Creates dedicated module for depot API functions |
| src/hooks/useMailToForm.ts | Implements new hook for mailto form handling |
| src/hooks/useContactForm.ts | Removes old contact form hook with server submission |
| src/hooks/useCommuneInfos.tsx | Updates to use extracted API functions |
| src/hooks/useBALAdmin.ts | Removes email sending methods |
| src/hooks/useAPIDepot.ts | Removes deprecated hook, functionality moved to api-depot module |
| src/components/particulier/ParticulierTroubleshooting/ParticulierTroubleshooting.tsx | Updates address handling and integrates with signalement system |
| src/components/particulier/AdresseProblemForm/mailto-signalement.template.ts | Adds email template for signalement emails |
| src/components/particulier/AdresseProblemForm/AdresseProblemForm.tsx | Refactors to use mailto system instead of server submission |
| src/components/particulier/AdresseNotFoundInBAN/AdresseNotFoundInBAN.tsx | Updates address type structure |
| src/components/particulier/AdresseFoundInBAN/AdresseFoundInBAN.tsx | Adds integration with signalement system for found addresses |
| src/components/common/ContactForm/ContactForm.tsx | Converts to mailto system with commune autocomplete |
| src/components/common/ContactForm/ContactForm.styles.tsx | Removes CAPTCHA-related styling |
| src/components/common/Autocomplete/Autocomplete.tsx | Adds value prop and clear functionality |
| package.json | Removes CAPTCHA dependency |
| README.md | Removes CAPTCHA environment variable documentation |
| .github/workflows/deploy.yml | Removes CAPTCHA environment variable from deployment |
| .env.sample | Removes CAPTCHA environment variable from sample |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Features :