Skip to content

fix: iframe Editor Compatibility#2025

Merged
chickenn00dle merged 4 commits intotrunkfrom
fix/iframe-editor-compatibility
Feb 24, 2026
Merged

fix: iframe Editor Compatibility#2025
chickenn00dle merged 4 commits intotrunkfrom
fix/iframe-editor-compatibility

Conversation

@chickenn00dle
Copy link
Contributor

@chickenn00dle chickenn00dle commented Feb 3, 2026

All Submissions:

Changes proposed in this Pull Request:

Closes https://linear.app/a8c/issue/NPPM-2586/newspack-newsletters-iframe-editor-compatibility

How to test the changes in this Pull Request:

  1. Ensure ONLY the main plugin, blocks, newsletters, and popups are the only Newspack extensions active and are all on the fix/iframe-editor-compatibility branch.
  2. Smoke test blocks in the editor + frontend (You can find a list in the linked linear issue)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@chickenn00dle chickenn00dle force-pushed the fix/iframe-editor-compatibility branch from a02ca1b to 34e4bdd Compare February 10, 2026 20:53
@chickenn00dle chickenn00dle changed the title chore: iframe Editor Compatibility fix: iframe Editor Compatibility Feb 10, 2026
@chickenn00dle chickenn00dle marked this pull request as ready for review February 10, 2026 21:22
@chickenn00dle chickenn00dle requested a review from a team as a code owner February 10, 2026 21:22
Copilot AI review requested due to automatic review settings February 10, 2026 21:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve Gutenberg iframe-based editor compatibility for Newspack Newsletters blocks by aligning block registration/assets with block.json + API v3 patterns and by switching editor asset enqueueing to a hook that runs inside the iframe.

Changes:

  • Migrate the Share block to block.json metadata-based registration (apiVersion 3).
  • Update Posts Inserter editor wrapper to use useBlockProps and add block.json schema/apiVersion.
  • Switch editor-related asset enqueues from enqueue_block_editor_assets to enqueue_block_assets (with is_admin() guards), and bump some blocks to apiVersion: 3.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/editor/blocks/share/index.js Switches Share block registration to metadata/settings pattern using block.json.
src/editor/blocks/share/block.json Adds Share block metadata/attributes/supports (apiVersion 3).
src/editor/blocks/posts-inserter/index.js Uses useBlockProps + classnames for consistent wrapper props/classes.
src/editor/blocks/posts-inserter/block.json Adds $schema and apiVersion: 3 to metadata.
src/editor/blocks/ad/block.json Bumps block API version to 3.
src/blocks/subscribe/block.json Bumps block API version to 3.
includes/class-newspack-newsletters-editor.php Moves editor assets enqueue hook to enqueue_block_assets and renames method accordingly.
includes/class-newspack-newsletters-blocks.php Moves blocks assets enqueue hook to enqueue_block_assets and renames method accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chickenn00dle chickenn00dle merged commit cd15c02 into trunk Feb 24, 2026
19 checks passed
@chickenn00dle chickenn00dle deleted the fix/iframe-editor-compatibility branch February 24, 2026 20:57
@github-actions
Copy link

Hey @chickenn00dle, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Mar 5, 2026
# [3.29.0-alpha.1](v3.28.6...v3.29.0-alpha.1) (2026-03-05)

### Bug Fixes

* iframe editor compatibility ([#2025](#2025)) ([cd15c02](cd15c02))
* improve error handling in upsert contact method ([#2031](#2031)) ([89a5937](89a5937))
* no parallel post-release jobs ([#2037](#2037)) ([8e4a738](8e4a738))

### Features

* **init-modal:** apply new modal style to init screen in editor ([#2041](#2041)) ([3caafdc](3caafdc))
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

🎉 This PR is included in version 3.29.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

[Status] Approved Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants