diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index 15e4a9de6b0a80..2d97dd70be0c25 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -1,3 +1,9 @@ +## Master + +### Breaking Changes + +- `BlockEditorProvider` no longer renders a wrapping `SlotFillProvider` or `DropZoneProvider` (from `@wordpress/components`). For custom block editors, you should render your own as wrapping the `BlockEditorProvider`. A future release will include a new `BlockEditor` component for simple, standard usage. `BlockEditorProvider` will serve the simple purpose of establishing its own context for block editors. + ## 2.2.0 (2019-06-12) ### Internal diff --git a/packages/block-editor/src/components/provider/index.js b/packages/block-editor/src/components/provider/index.js index 43f336325434db..6d06246ca9170a 100644 --- a/packages/block-editor/src/components/provider/index.js +++ b/packages/block-editor/src/components/provider/index.js @@ -2,7 +2,6 @@ * WordPress dependencies */ import { Component } from '@wordpress/element'; -import { DropZoneProvider, SlotFillProvider } from '@wordpress/components'; import { withDispatch } from '@wordpress/data'; import { compose } from '@wordpress/compose'; @@ -120,13 +119,7 @@ class BlockEditorProvider extends Component { render() { const { children } = this.props; - return ( - - - { children } - - - ); + return children; } } diff --git a/packages/edit-post/src/editor.js b/packages/edit-post/src/editor.js index ea48a3a1d8e358..88eb7c4a6113fd 100644 --- a/packages/edit-post/src/editor.js +++ b/packages/edit-post/src/editor.js @@ -10,7 +10,11 @@ import { size, map, without } from 'lodash'; import { withSelect } from '@wordpress/data'; import { EditorProvider, ErrorBoundary, PostLockedModal } from '@wordpress/editor'; import { StrictMode, Component } from '@wordpress/element'; -import { KeyboardShortcuts } from '@wordpress/components'; +import { + KeyboardShortcuts, + SlotFillProvider, + DropZoneProvider, +} from '@wordpress/components'; /** * Internal dependencies @@ -87,19 +91,23 @@ class Editor extends Component { return ( - - - - - - - + + + + + + + + + + + ); } diff --git a/playground/src/index.js b/playground/src/index.js index 3f125282c49090..d230f202243c23 100644 --- a/playground/src/index.js +++ b/playground/src/index.js @@ -10,7 +10,11 @@ import { WritingFlow, ObserveTyping, } from '@wordpress/block-editor'; -import { Popover } from '@wordpress/components'; +import { + Popover, + SlotFillProvider, + DropZoneProvider, +} from '@wordpress/components'; import { registerCoreBlocks } from '@wordpress/block-library'; import '@wordpress/format-library'; @@ -37,20 +41,24 @@ function App() {

Gutenberg Playground

- -
- - - - - -
- -
+ + + +
+ + + + + +
+ +
+
+
);