From f630096cfa5d4239db94c6e23bb4d2a415073996 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 15 Aug 2019 16:24:47 +0100 Subject: [PATCH] RegistryProvider is absorbed by BlockEditorProvider --- packages/block-library/src/block/edit.js | 31 +++++++++--------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 97fd719dbdd21..8be303df2eeca 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -11,16 +11,12 @@ import { Placeholder, Spinner, Disabled } from '@wordpress/components'; import { withSelect, withDispatch, - withRegistry, - RegistryProvider, - createRegistry, } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { BlockEditorProvider, BlockList, WritingFlow, - storeConfig, } from '@wordpress/block-editor'; import { compose } from '@wordpress/compose'; import { parse, serialize } from '@wordpress/blocks'; @@ -32,7 +28,7 @@ import ReusableBlockEditPanel from './edit-panel'; import ReusableBlockIndicator from './indicator'; class ReusableBlockEdit extends Component { - constructor( { reusableBlock, registry } ) { + constructor( { reusableBlock } ) { super( ...arguments ); this.startEditing = this.startEditing.bind( this ); @@ -56,8 +52,6 @@ class ReusableBlockEdit extends Component { blocks: [], }; } - - this.registry = createRegistry( { 'core/block-editor': storeConfig }, registry ); } componentDidMount() { @@ -123,18 +117,16 @@ class ReusableBlockEdit extends Component { } let element = ( - - - - - - - + + + + + ); if ( ! isEditing ) { @@ -200,5 +192,4 @@ export default compose( [ onSave: partial( saveReusableBlock, ref ), }; } ), - withRegistry, ] )( ReusableBlockEdit );