batchCooking/apps/web/src/layouts/nav-icons.tsx
Nicolas a252640fe6
Some checks failed
CI / build (push) Successful in 2m22s
CI / lint (push) Successful in 2m26s
CI / intent-service-test (push) Successful in 4m8s
CI / e2e (push) Successful in 12m40s
CI / test (push) Failing after 15m4s
CI / build-android (push) Has been skipped
feat(contact): modèle + POST /contact + formulaire utilisateur (#80)
Formulaire in-app de remontée de bug / suggestion pour les utilisateurs
connectés (PR 1/2 de l'issue #80).

- Modèle Prisma `ContactMessage` (+ relation inverse sur `UserProfile`) et
  migration `20260908120000_contact_message` — table neuve, aucun backfill.
  `authorId` nullable + `onDelete: SetNull` : un signalement survit à la
  suppression de son compte.
- Contrat partagé `schemas/contact.ts` : `CONTACT_MESSAGE_TYPES`,
  `submitContactMessageSchema` (type enum, message 10-5000 trim, pageUrl /
  appVersion optionnels — jamais le user-agent).
- Module API `contact` : `POST /contact` (`requireAuth`, monté `/contact`),
  `204` sans corps. Le user-agent est lu de l'en-tête de requête, jamais du
  corps. Émet `analytics.recordEvent(contact.submitted, …)`.
- Page `/parametres/contact` (`ContactPage` + `contact.ts` + `.scss`) :
  select de type, textarea, validation cliente via le schéma partagé, états
  succès / erreur (`ErrorMessageService`, jamais `err.message`). Entrée de
  nav « Nous contacter » dans `SETTINGS_ITEMS` + clé i18n + icône.
  `apiClient.submitContactMessage(input)` ajoute `pageUrl` / `appVersion`.
- Tests : `apps/api/test/contact.test.ts` (Mocha — insertion, en-tête UA,
  champs nullables, message trop court / trop long, type inconnu),
  `contact.feature` + steps (Cypress e2e — envoi + confirmation + contexte),
  `contact-page.cy.ts` (rendu + garde `RequireAuth` + label d'erreur).
- Docs : `batch-cooking-modele.md`, `backend-architecture.md`,
  `frontend-architecture.md`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 08:26:47 +02:00

44 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Sidebar/nav icon set — thin, named re-exports of lucide-react glyphs
// rather than importing `lucide-react` directly in every consumer. Keeps a
// single place documenting "which glyph stands for which app concept"
// (the mapping itself, decided once, isn't obvious from a bare `Settings`
// or `Home` import) and keeps consumer diffs small if a glyph ever needs
// to change. Previously a hand-drawn custom SVG set (24×24, stroke-based,
// no fill) — lucide-react uses the same stroke-based "line icon" language
// (default `strokeWidth={2}`, round caps/joins) so the switch is visually
// a no-op, just swaps who draws the paths.
//
// Every one of these is always paired with visible text (the nav label, or
// a `title` tooltip when the sidebar is collapsed) — purely decorative, so
// every consumer passes `aria-hidden="true"` itself (unlike the old custom
// `Icon` wrapper, lucide doesn't set this by default).
export {
BookOpen as RecipesIcon,
Calendar as PlanningIcon,
ChevronLeft as ChevronLeftIcon,
ExternalLink as SourceLinkIcon,
Globe as PublicIcon,
Home as HouseholdIcon,
Info as CreditsIcon,
Leaf as DietPreferencesIcon,
// The mobile bottom nav's catch-all "Plus" tab (Paramètres + Compte,
// see AppLayout.tsx's `MobileBottomNav`) — a hamburger reads as "more"
// even in a bottom-tab position, unlike on desktop where it usually
// means "open a side drawer".
Menu as MoreIcon,
// "Contact" settings entry (issue #80) — the in-app bug/suggestion form.
// A speech bubble reads as "send us a message"; distinct from the Rss
// "Sources" feed glyph and the generic Settings cog.
MessageSquare as ContactIcon,
Palette as UserPreferencesIcon,
Rss as SourcesIcon,
Settings as SettingsIcon,
ShoppingCart as ShoppingListIcon,
// "Paramètres d'application" (issue #86) — distinct from the generic
// Settings glyph (already the "Paramètres" section toggle itself) and
// from UserPreferencesIcon (theme/tutorials): this one is specifically
// about the app installation (version, updates, app-open behavior).
Smartphone as AppSettingsIcon,
Star as FavoriteIcon,
User as AccountIcon,
} from "lucide-react";