Repository navigation
Conversation
…ost in the editor Adds a Preview email button and modal (desktop and mobile views, from, subject and preview text, sandboxed inert frame), a REST route that syncs a linked beehiiv draft from the saved post and fetches the rendered email, and the draft lifecycle it needs: created on first preview, updated in place, recreated when the publication or template changes, kept across status changes, removed when Send to newsletter is turned off or the post is deleted.
…d on publish or schedule
…nstead of waiting in PHP
…t read, and fix the preview E2E expectations
…rge stale locks, memoize the inert email, and cover the new paths
…lass and lengthen the preview lock
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds an in-editor preview of the real beehiiv email for a saved post (Teamwork 19813218, Brief 862095db).
POST beehiiv/v1/email-preview(edit + publish rights, enforced server-side).Not included / known gaps
test.fixmefor it).data.content.free.emailshape is taken from the docs).Test plan
vendor/bin/phpcs,npm run lint:js,npm run lint:css,npm run buildcleanemail-preview.spec.jspasses (AC-004 untestable without a live account; one AC-010 notice test fixme)