[pull] main from TryGhost:main#1086
Merged
Merged
Conversation
no refs There should be no user-facing impact to this change. This blob report is sometimes generated when running e2e tests locally, but shouldn't be committed.
ref https://linear.app/ghost/issue/NY-1234/flaky-member-welcome-emails-e2e-test This test has been flaky recently. Skipping it for now to avoid disrupting CI while I work on a fix.
ref https://linear.app/ghost/issue/NY-1228/add-the-frontend-editpreview-toggle-to-the-welcome-email-edit-modal ## What this changes - adds an `Edit` / `Preview` toggle to the welcome email modal in Admin - lets admins preview unsaved subject and body changes before saving - loads the preview from the automated email preview endpoint and renders it in an iframe sized to the email content - preserves unsaved draft state when switching between edit and preview - shows inline validation and preview loading/error states in the modal - ignores stale out-of-order preview responses so older requests cannot overwrite a newer draft ## Why 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. ## Implementation notes - adds a dedicated `usePreviewWelcomeEmail` mutation and preview response types in `admin-x-framework` - updates the modal header layout to host the segmented mode switch - normalizes preview HTML links to open safely in a new tab - measures iframe height so the modal owns scrolling instead of the preview document - extends acceptance and browser E2E coverage for preview rendering and draft preservation --------- Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )