-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update block editor store to make the block interface API properly ex…
…perimental
- Loading branch information
Showing
6 changed files
with
39 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Returns an action object used in signalling that the block interface, eg. toolbar, outline, etc. should be hidden. | ||
* | ||
* @return {Object} Action object. | ||
*/ | ||
export function __experimentalHideBlockInterface() { | ||
return { | ||
type: '__experimental_HIDE_BLOCK_INTERFACE', | ||
}; | ||
} | ||
|
||
/** | ||
* Returns an action object used in signalling that the block interface, eg. toolbar, outline, etc. should be shown. | ||
* | ||
* @return {Object} Action object. | ||
*/ | ||
export function __experimentalShowBlockInterface() { | ||
return { | ||
type: '__experimental_SHOW_BLOCK_INTERFACE', | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Returns true if the the block interface should be hidden, or false otherwise. | ||
* | ||
* @param {Object} state Global application state. | ||
* | ||
* @return {boolean} Whether the block toolbar is hidden. | ||
*/ | ||
export function __experimentalIsBlockInterfaceHidden( state ) { | ||
return state.isBlockInterfaceHidden; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters