Skip to content

Conversation

@zlateska
Copy link
Contributor

Proposed changes

This PR updates the WonderBlocks plugin to be compatible with WordPress 6.8+ and ensures full support for the iframe editor introduced in WordPress 6.3. It addresses multiple deprecation warnings and fixes compatibility issues.

Changes

Deprecation Fixes

  • SelectControl: Added __next40pxDefaultSize prop to all SelectControl instances to opt into the new 40px default size (replaces deprecated 36px)

  • SearchControl: Added __nextHasNoMarginBottom prop to opt into new margin styles

  • Block API: Updated block apiVersion from 2 to 3 for iframe editor compatibility

  • Data Store: Replaced deprecated select('core/edit-site').getEditedPostType() with select('core/editor').getCurrentPostType()

Iframe Editor Compatibility

  • Block Category Registration: Fixed import order to register category before block registration

    • Moved register-category import before block import in wonder-blocks.js
  • CSS Enqueuing: Fixed CSS loading for iframe editor

    • Added enqueue_block_assets hook in Admin.php to ensure styles load in both parent and iframe
    • Added style field to block.json referencing the registered style handle
Screenshot 2025-12-22 at 12 35 48 PM Screenshot 2025-12-22 at 12 35 15 PM

Type of Change

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Visual

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copilot AI review requested due to automatic review settings December 22, 2025 17:36
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

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 updates the WonderBlocks plugin for WordPress 6.8+ compatibility and adds support for the iframe editor introduced in WordPress 6.3, addressing deprecation warnings and fixing critical compatibility issues.

  • Updated WordPress component props to use new standardized sizes and spacing (__next40pxDefaultSize, __nextHasNoMarginBottom)
  • Fixed block category registration order and CSS loading for iframe editor compatibility
  • Refactored toolbar button logic into a dedicated component with improved iframe handling

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/wonder-blocks.js Reordered imports to register block category before blocks; refactored toolbar button to use new component; removed unused constants
src/components/Modal/Sidebar/Categories.jsx Added __next40pxDefaultSize prop to SelectControl for WordPress 6.8+ compatibility
src/components/Modal/Modal.jsx Updated data store selector from deprecated core/edit-site to core/editor
src/components/Modal/Content/KeywordFilter.jsx Added __nextHasNoMarginBottom prop to SearchControl for updated margin behavior
src/components/AddToolbarButton.jsx New component handling toolbar button addition with iframe editor support and retry logic
src/blocks/inspector-control.js Added __next40pxDefaultSize to SelectControl instances; removed deprecated theme color UI
src/blocks/block.json Updated apiVersion to 3 for iframe compatibility; added style field for CSS loading
includes/Library/Admin.php Changed hook from enqueue_block_editor_assets to enqueue_block_assets; added validation and duplicate registration checks

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

@newfold-labs newfold-labs deleted a comment from Copilot AI Dec 22, 2025
@newfold-labs newfold-labs deleted a comment from Copilot AI Dec 22, 2025
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.

2 participants