Repository navigation
feat(newsletter-publishing): convert top-level Columns blocks to beehiiv columns - #199
Merged
Merged
Conversation
…iiv columns Feature: newsletter-publishing/block-conversion/structured-content-blocks Implements: - US-006: A Columns block in a post becomes one beehiiv columns block Verified: - AC-008, AC-011 to AC-019 covered by PHPUnit tests - Up to 3 columns per block; more columns, or columns nested in a column, put their inner blocks at the top level - px/em/rem widths become a share of the row; percent widths round per column
Covers structured-content-blocks (AC-001 to AC-019) and block-conversion-framework (AC-001 to AC-008). Two specs assert known gaps and currently fail: table background color (AC-010) and a non-breaking-space paragraph (AC-005).
A table with a block background color sent no color. The color is now read from the block attributes, the table tag, or the figure wrapper, and sent as visual settings the same way lists and paragraphs send it.
…king space A paragraph with only a non-breaking space was still sent as a text block. The check now treats non-breaking spaces as blank.
…id image The PRD says a Media & Text block with no valid image URL is omitted. The converter kept the text column instead. The whole block is now omitted.
…iv sidebar is open The marker adds a class and tooltip to the block's own element instead of wrapping the block, shows only while the beehiiv sidebar is open, keeps the hidden-eye icon visible, and also covers posts linked to a scheduled newsletter.
…ollows the send warning text
…umns and mark them in the editor A Columns block with more than 3 columns was sent as top-level blocks. It is now omitted from the newsletter, and the editor marks it and counts it in the omitted blocks notice, the same as other blocks the newsletter leaves out. The column limit is shared with the editor through the block support config.
…mns block's visual settings A Columns block's background color, text color, padding, margin and border are now sent as the visual settings of the beehiiv columns block, the same way a Group's styling is sent for its section. Colors come from custom values or the theme palette. Padding and margin are sent in whole pixels per side as inner and outer spacing, and rem and em convert at 16 pixels. The border sends its color, width, style and radius, and a border with a color or width and no style is sent as solid. Sides, styles and units beehiiv cannot take are left out so it keeps its default. The styling code is a self-contained copy of the Group version, so this branch does not depend on the Group branch. The two can share one class after both land.
…ling beehiiv holds a container's styling on a section, so a Columns block with a background color, text color, padding, margin or border that beehiiv can take is now sent as a section with those visual settings, holding the plain columns block. A Columns block with no styling that converts stays a plain columns block, and a Columns block with more than 3 columns, or with nothing convertible inside, is still not sent.
… its styling" This reverts commit 34dd1c4.
…the columns block's visual settings" This reverts commit 2a5305b.
phpbits
marked this pull request as ready for review
November 12, 2026 13:14
…4725-columns-block-support # Conflicts: # includes/Newsletter/BlockConverter.php # includes/Newsletter/SupportedBlocks.php # tests/e2e/specs/block-conversion-framework.spec.js
…ter the release merge
Merged
phpbits
added a commit
that referenced
this pull request
Nov 16, 2026
* feat(editor-integration): preview the real beehiiv email in the post editor (#195) * feat(editor-integration): preview the real beehiiv email of a saved post 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. * fix(newsletter-publishing): import WP_Error in the sender * chore: revert unrelated whitespace change in the publication send test * fix(newsletter-publishing): replace a previewed draft with a real send on publish or schedule * fix(newsletter-publishing): lock simultaneous previews so only one draft is created * fix(editor-integration): poll for the preview email from the editor instead of waiting in PHP * refactor(editor-integration): harden the preview frame, share the post read, and fix the preview E2E expectations * refactor(editor-integration): share one preview eligibility check, purge stale locks, memoize the inert email, and cover the new paths * refactor(editor-integration): move preview eligibility into its own class and lengthen the preview lock * Meet WordPress VIP Integration Center conformance checks (#196) * feat: meet WordPress VIP Integration Center conformance checks Add vip-manifest.yaml, run PHPUnit and Playwright from composer test, and widen the CI matrix to WP 6.9/7.0 and PHP 8.2-8.5. * feat: read WordPress VIP runtime config Read the VIP_BEEHIIV_CONFIG array for the API base URL, falling back to the wp-config constant and the default. Missing or invalid config is ignored. Add fixtures, tests, and README examples. * test(e2e): add demo walkthrough recorder and four demo scripts (#202) * test(e2e): add intake demo recording scripts Playwright config, helpers and per-intake walkthrough scripts that record one captioned demo video per intake. Output goes to the gitignored tests/e2e/test-results/demo/ folder. * test(e2e): add demo walkthrough for the require-template-choice intake Records the settings toggle, the empty template field, the blocked send and the unblocked send on the feature/19814561-settings-require-template build. * test(e2e): show the pre-publish panel notice in the require-template demo * test(e2e): add demo walkthrough for the email preview intake Records the Preview email control, the sandboxed preview modal, the save-before-preview rule, a failed preview with retry, and the unavailable state on an already scheduled post. * test(e2e): add mobile view to the email preview demo * test(e2e): add demo walkthrough for the subscriber gating intake * test(e2e): add demo walkthrough for the Group section intake * Convert Group blocks to beehiiv sections (#200) * feat(newsletter-publishing): convert Group blocks to beehiiv sections Feature: newsletter-publishing/block-conversion/block-conversion-framework Implements: - US-006: A Group block becomes a beehiiv section holding its converted inner blocks Posts first synced with this change keep sections on later syncs. Posts synced before it keep omitting Group blocks. * test(e2e): cover block conversion framework acceptance criteria * fix(newsletter-publishing): omit Groups nested in a Group from the beehiiv payload beehiiv rejects a section inside a section, so the post failed to sync. A Group inside a Group is now omitted with its inner blocks, and the editor counts it in the omitted-block notice and marks it with the hidden icon. * test(e2e): cover the editor notice for a Group nested in a Group * fix(editor): show the omitted-block notice on scheduled posts linked to beehiiv A linked post turns Send to newsletter off, which hid the notice and the hidden-block icon while its newsletter was still scheduled and syncing edits. * style(editor): remove the top margin on the omitted-block notice * fix(editor): mark omitted blocks on the block element and only while the beehiiv sidebar is open The marker no longer wraps the block in an extra element. The hidden-eye icon is drawn on the block itself and stays visible without hovering. * style(editor): add a gap above the omitted-blocks line only when it follows the send warning text * Send a Group's background color, text color and padding as the section's visual settings Colors come from custom values or the theme palette. Padding is sent in whole pixels per side; rem and em convert at 16 pixels, and sides in percent or fluid units keep beehiiv's default. Borders and other Group styling are not sent yet. * Send a Group's border color, width, style and radius as the section's visual settings A border with a color or width and no style is sent as solid. Palette colors, including the var:preset|color|slug values the editor stores on a border with a different width on each side, are sent as their color value. Styles beehiiv does not accept, colors and styles that differ by side, and widths or radii in percent are not sent. * Send a Group's margin as outer spacing and resolve theme and fluid spacing sizes A Group's margin is sent as the section's outer spacing, next to padding as inner spacing. A size chosen by name from the theme is read from the theme's own definition: presets are applied in WordPress's order (default, theme, custom), and the default sizes and colors are skipped when the theme turns them off, so a theme that redefines a default name no longer gets WordPress's default value. A fluid size (clamp, min or max) is sent at its widest fixed value. * Add setting to require editors to choose a post template (#198) * feat(admin-interface): add require-template-choice setting Feature: admin-interface/settings-page/publication-template-config Implements: - US-007: Require editors to choose a template (setting only; enforcement and editor display live in other PRDs) Verified: - AC-014: toggle with the agreed label - AC-015: off by default - AC-016: saved state persists - AC-017: help text covers the three points - AC-018: shown in the existing connected-only section - AC-019: publication and template selections unchanged * test(admin-interface): cover require-template-choice setting in e2e * feat(newsletter-publishing): block sending until an editor chooses a template Feature: newsletter-publishing/newsletter-template-selection/post-template-selection Implements: - US-004: Require an editor-chosen template (send-time rule) Verified: - AC-009: default used when setting off or post already sent - AC-012: no automatic template when the rule applies - AC-013: send blocked even with a site default - AC-014: agreed message, no beehiiv request - AC-015: all roles - AC-016: sent posts exempt - AC-017: chosen template continues - AC-018: setting off behaves as before * test(newsletter-publishing): cover required-template rule in e2e * feat(editor-integration): ask editors to choose a template when required Feature: editor-integration/editor-sidebar/newsletter-template-selection Implements: - US-007: Required template prompt in the editor sidebar Verified: - AC-002: default behavior unchanged when the setting is off or the post was sent - AC-014: empty field with the Choose a template prompt - AC-015: no pre-selected template and no default label - AC-016: help text under the empty field - AC-017: blocked send shows the message through the existing error notice - AC-018: prompt and help clear once a template is chosen - AC-019: unchanged when the setting is off or the post was sent * test(editor-integration): cover required-template prompt in e2e * fix(editor-integration): show required-template notice as an error in the publish panel Open the pre-publish panel when the newsletter still needs a template, show the required-template message as an error, and add top spacing to beehiiv notices outside the sidebar. * fix(editor-integration): meet template picker ACs and update tests for the new setting Show help text for the default template, a loading spinner while templates load, and an unavailable label for deleted templates. Add publish-panel e2e tests, and update the settings storage and validation e2e specs for the new require-template setting. * feat(newsletter-publishing): convert top-level Columns blocks to beehiiv columns (#199) * feat(newsletter-publishing): convert top-level Columns blocks to beehiiv columns Feature: newsletter-publishing/block-conversion/structured-content-blocks Implements: - US-006: A Columns block in a post becomes one beehiiv columns block Verified: - AC-008, AC-011 to AC-019 covered by PHPUnit tests - Up to 3 columns per block; more columns, or columns nested in a column, put their inner blocks at the top level - px/em/rem widths become a share of the row; percent widths round per column * test(newsletter-publishing): add E2E specs for block conversion PRDs Covers structured-content-blocks (AC-001 to AC-019) and block-conversion-framework (AC-001 to AC-008). Two specs assert known gaps and currently fail: table background color (AC-010) and a non-breaking-space paragraph (AC-005). * fix(newsletter-publishing): send table block background color to beehiiv A table with a block background color sent no color. The color is now read from the block attributes, the table tag, or the figure wrapper, and sent as visual settings the same way lists and paragraphs send it. * fix(newsletter-publishing): omit paragraphs that hold only a non-breaking space A paragraph with only a non-breaking space was still sent as a text block. The check now treats non-breaking spaces as blank. * fix(newsletter-publishing): omit Media & Text blocks that have no valid image The PRD says a Media & Text block with no valid image URL is omitted. The converter kept the text column instead. The whole block is now omitted. * feat(editor): mark omitted blocks on the block itself while the beehiiv sidebar is open The marker adds a class and tooltip to the block's own element instead of wrapping the block, shows only while the beehiiv sidebar is open, keeps the hidden-eye icon visible, and also covers posts linked to a scheduled newsletter. * style(editor): add a gap above the omitted-blocks line only when it follows the send warning text * feat(newsletter-publishing): omit Columns blocks with more than 3 columns and mark them in the editor A Columns block with more than 3 columns was sent as top-level blocks. It is now omitted from the newsletter, and the editor marks it and counts it in the omitted blocks notice, the same as other blocks the newsletter leaves out. The column limit is shared with the editor through the block support config. * Send a Columns block's colors, padding, margin and border as the columns block's visual settings A Columns block's background color, text color, padding, margin and border are now sent as the visual settings of the beehiiv columns block, the same way a Group's styling is sent for its section. Colors come from custom values or the theme palette. Padding and margin are sent in whole pixels per side as inner and outer spacing, and rem and em convert at 16 pixels. The border sends its color, width, style and radius, and a border with a color or width and no style is sent as solid. Sides, styles and units beehiiv cannot take are left out so it keeps its default. The styling code is a self-contained copy of the Group version, so this branch does not depend on the Group branch. The two can share one class after both land. * Wrap a styled Columns block in a beehiiv section that carries its styling beehiiv holds a container's styling on a section, so a Columns block with a background color, text color, padding, margin or border that beehiiv can take is now sent as a section with those visual settings, holding the plain columns block. A Columns block with no styling that converts stays a plain columns block, and a Columns block with more than 3 columns, or with nothing convertible inside, is still not sent. * Revert "Wrap a styled Columns block in a beehiiv section that carries its styling" This reverts commit 34dd1c4. * Revert "Send a Columns block's colors, padding, margin and border as the columns block's visual settings" This reverts commit 2a5305b. * Use theme palette colors and a full title replace in the e2e specs after the release merge * Pin the E2E job to Ubuntu 24.04 and fix a Prettier error in the structured content spec * Prepare the 1.2.0 release: bump the version, add the changelog, fill in @SInCE tags, and refresh the POT file * Keep Group sections when a preview draft is refreshed * Use a palette slug that Twenty Twenty-Five defines in the Group border and nested list color specs
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
A WordPress Columns block at the top level of a post now converts to one beehiiv
columnsblock. Before, Columns was skipped and its content was lost. Media & Text already used the same conversion.Teamwork task: https://fueled.teamwork.com/app/tasks/19814725
Closes #167
How it converts
core/columnbecomes one column. Its inner blocks go underblocks, in order.verticalAlign.stackOnMobileis true by default, as for Media & Text, and false only when the WordPress block opts out.core/columnsis now a supported block andcore/columnis nested-only, so the editor no longer lists them as omitted.Known difference
A ticket comment (2026-10-21) asked for an error message when a row has more than 3 columns. This PR follows the intake instead: the content is sent as top-level blocks and the editor shows no omitted-block warning.
Also fixed (found by the independent QA run, separate commits)
eb847c0).711d803).238514a).Tests
caa9ecd.lint:js,lint:cssandlint:phppass on PHP 7.4 to 8.5.Open questions