Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block editor: refactor effect.js to controls #27298

Merged
merged 4 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions docs/designers-developers/developers/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1134,10 +1134,6 @@ _Parameters_
- _firstBlockClientId_ `string`: Client ID of the first block to merge.
- _secondBlockClientId_ `string`: Client ID of the second block to merge.

_Returns_

- `Object`: Action object.

<a name="moveBlocksDown" href="#moveBlocksDown">#</a> **moveBlocksDown**

Undocumented declaration.
Expand Down Expand Up @@ -1179,10 +1175,6 @@ _Parameters_
- _start_ `string`: First block of the multi selection.
- _end_ `string`: Last block of the multiselection.

_Returns_

- `Object`: Action object.

<a name="receiveBlocks" href="#receiveBlocks">#</a> **receiveBlocks**

Returns an action object used in signalling that blocks have been received.
Expand Down Expand Up @@ -1273,10 +1265,6 @@ _Parameters_

- _blocks_ `Array`: Array of blocks.

_Returns_

- `Object`: Action object.

<a name="resetSelection" href="#resetSelection">#</a> **resetSelection**

Returns an action object used in signalling that selection state should be
Expand Down Expand Up @@ -1540,5 +1528,16 @@ _Returns_

- `Object`: Action object

<a name="validateBlocksToTemplate" href="#validateBlocksToTemplate">#</a> **validateBlocksToTemplate**

Block validity is a function of blocks state (at the point of a
reset) and the template setting. As a compromise to its placement
across distinct parts of state, it is implemented here as a side-
effect of the block reset action.

_Parameters_

- _blocks_ `Array`: Array of blocks.


<!-- END TOKEN(Autogenerated actions|../../../../packages/block-editor/src/store/actions.js) -->
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@wordpress/components": "file:../components",
"@wordpress/compose": "file:../compose",
"@wordpress/data": "file:../data",
"@wordpress/data-controls": "file:../data-controls",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/dom": "file:../dom",
"@wordpress/element": "file:../element",
Expand Down Expand Up @@ -64,7 +65,6 @@
"react-transition-group": "^2.9.0",
"reakit": "1.1.0",
"redux-multi": "^0.1.12",
"refx": "^3.0.0",
"rememo": "^3.0.0",
"tinycolor2": "^1.4.1",
"traverse": "^0.6.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { createHigherOrderComponent } from '@wordpress/compose';
* Internal dependencies
*/
import { storeConfig } from '../../store';
import applyMiddlewares from '../../store/middlewares';

const withRegistryProvider = createHigherOrderComponent(
( WrappedComponent ) => {
Expand All @@ -28,12 +27,10 @@ const withRegistryProvider = createHigherOrderComponent(
const [ subRegistry, setSubRegistry ] = useState( null );
useEffect( () => {
const newRegistry = createRegistry( {}, registry );
const store = newRegistry.registerStore(
newRegistry.registerStore(
'core/block-editor',
storeConfig
);
// This should be removed after the refactoring of the effects to controls.
applyMiddlewares( store );
setSubRegistry( newRegistry );
}, [ registry ] );

Expand Down
Loading