Skip to content

Smoother email preview updates - #574

Draft
dblatcher wants to merge 8 commits into
mainfrom
dblatcher/smoother-email-preview-updates
Draft

dblatcher wants to merge 8 commits into
mainfrom
dblatcher/smoother-email-preview-updates

Conversation

@dblatcher

Copy link
Copy Markdown
Collaborator

What does this change?

Changes the component that loads and renders the preview of the Newsletter content to:

  • update the HTML in the page without using an iframe's srcdoc, so changes to the headline etc do not cause the preview to flash as the whole iframe is repainted
  • use inline messages to display when a preview hasn't loaded (eg because an audience needs to be selected) rather than rendering the message in place of the HTML content.

How has this change been tested?

Ran locally, added stories for the updated component.

How can we measure success?

Better user experience for email previews

Have we considered potential risks?

We don't have specific designs for this component, or its loading/error/placeholder state - should get this version looked over

In theory, it is more secure to renderer arbitrary HTML string in an iframe, but in practise, we are fetching content from our own rendering service, so can expect it to be safe.

Images

before after
Screenshot 2026-09-15 at 14 26 30 Screenshot 2026-09-15 at 14 26 42
Screenshot 2026-09-15 at 14 27 40 Screenshot 2026-09-15 at 14 27 31

Accessibility

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant