Document newsletter-modal fixes in the README

Error-clears-on-interaction behavior and the modal photo no longer
resizing when the already-subscribed/format-error message appears.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Marco
2026-07-25 20:19:44 +00:00
parent 8a910f7ff8
commit 8d4ee75cfb
+15
View File
@@ -1227,6 +1227,21 @@ unsynced.
also needs `BREVO_DOUBLE_OPTIN_TEMPLATE_ID` (no safe default — every
signup silently no-ops without it) and optionally
`BREVO_DOI_REDIRECT_URL`.
- **The already-subscribed error now clears on the next interaction**
(2026-07-25), matching standard form-validation behavior instead of
sitting there until the next submit — `useNewsletterSignup.ts`'s
`handleEmailChange`/new `handleConsentChange` both call a shared
`clearSubmitError()` that resets `status`/`error` back to idle. This
replaced the hook's previously-exposed raw `setConsent` with
`handleConsentChange` in its return value — all 4 consuming forms
updated to match.
- **`NewsletterModal.tsx`'s photo no longer resizes when the error
appears** (2026-07-25) — the modal's left photo stretches
(`items-stretch`, `md:aspect-auto`) to match the right column's height,
so the emailError/already-subscribed messages growing that column used
to visibly grow the photo along with it. Both messages are now always
rendered with a reserved `min-h-[1.05rem]` instead of conditionally
mounted, so toggling them no longer changes the column's height at all.
## Orders & customer accounts