Skip to content

Commit

Permalink
Edit Post: Remove SlotFillProvider as rendered by block editor
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Mar 29, 2019
1 parent 35b8e8e commit 53be3f2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
10 changes: 4 additions & 6 deletions packages/block-editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { Component } from '@wordpress/element';
import { DropZoneProvider, SlotFillProvider } from '@wordpress/components';
import { DropZoneProvider } from '@wordpress/components';
import { withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';

Expand Down Expand Up @@ -110,11 +110,9 @@ class BlockEditorProvider extends Component {
const { children } = this.props;

return (
<SlotFillProvider>
<DropZoneProvider>
{ children }
</DropZoneProvider>
</SlotFillProvider>
<DropZoneProvider>
{ children }
</DropZoneProvider>
);
}
}
Expand Down
30 changes: 16 additions & 14 deletions packages/edit-post/src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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 } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -87,19 +87,21 @@ class Editor extends Component {

return (
<StrictMode>
<EditorProvider
settings={ editorSettings }
post={ post }
initialEdits={ initialEdits }
useSubRegistry={ false }
{ ...props }
>
<ErrorBoundary onError={ onError }>
<Layout />
<KeyboardShortcuts shortcuts={ preventEventDiscovery } />
</ErrorBoundary>
<PostLockedModal />
</EditorProvider>
<SlotFillProvider>
<EditorProvider
settings={ editorSettings }
post={ post }
initialEdits={ initialEdits }
useSubRegistry={ false }
{ ...props }
>
<ErrorBoundary onError={ onError }>
<Layout />
<KeyboardShortcuts shortcuts={ preventEventDiscovery } />
</ErrorBoundary>
<PostLockedModal />
</EditorProvider>
</SlotFillProvider>
</StrictMode>
);
}
Expand Down

0 comments on commit 53be3f2

Please sign in to comment.