Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b67218c to
2fc597d
Compare
0a0517c to
137dc14
Compare
This lets staff switch between editing and previewing welcome emails without saving first, keeps the preview synced with unsaved changes, and adds focused coverage for preview rendering, stale-response handling, and browser behavior.
137dc14 to
6654797
Compare
|



ref https://linear.app/ghost/issue/NY-1228/add-the-frontend-editpreview-toggle-to-the-welcome-email-edit-modal
What this changes
Edit/Previewtoggle to the welcome email modal in AdminWhy
The welcome email editor previously only exposed the raw editing experience, which made it harder to verify the final email output before saving. This change adds an in-context preview flow so admins can check both copy and rendered layout while keeping their draft intact.
The follow-up race-condition fix is included because overlapping preview requests could otherwise show stale content after quick Edit/Preview toggling on a slow connection.
Implementation notes
usePreviewWelcomeEmailmutation and preview response types inadmin-x-frameworkTesting
pnpm exec playwright test test/acceptance/membership/member-welcome-emails.test.ts -g "Preview ignores out-of-order responses"pnpm lint:js src/components/settings/membership/member-emails/welcome-email-modal.tsx test/acceptance/membership/member-welcome-emails.test.ts