Skip to content

Commit

Permalink
Navigation: Remove from experimental (#18594)
Browse files Browse the repository at this point in the history
* Navigation: Remove from experimental

* Remove from transforms test.

* navigation: remove `category` from block def

* navigation: add category in block index
  • Loading branch information
obenland committed Nov 20, 2019
1 parent c4ba262 commit 3bbea89
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 24 deletions.
13 changes: 0 additions & 13 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ function gutenberg_initialize_experiments_settings() {
'id' => 'gutenberg-widget-experiments',
)
);
add_settings_field(
'gutenberg-menu-block',
__( 'Menu Block', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enable Navigation Menu Block', 'gutenberg' ),
'id' => 'gutenberg-menu-block',
)
);
add_settings_field(
'gutenberg-block-directory',
__( 'Block Directory', 'gutenberg' ),
Expand Down Expand Up @@ -132,10 +121,8 @@ function gutenberg_display_experiment_section() {
function gutenberg_experiments_editor_settings( $settings ) {
$experiments_settings = array(
'__experimentalEnableLegacyWidgetBlock' => gutenberg_is_experiment_enabled( 'gutenberg-widget-experiments' ),
'__experimentalEnableMenuBlock' => gutenberg_is_experiment_enabled( 'gutenberg-menu-block' ),
'__experimentalBlockDirectory' => gutenberg_is_experiment_enabled( 'gutenberg-block-directory' ),
'__experimentalEnableFullSiteEditing' => gutenberg_is_experiment_enabled( 'gutenberg-full-site-editing' ),

);

$gradient_presets = current( (array) get_theme_support( '__experimental-editor-gradient-presets' ) );
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ _Properties_
- _showInserterHelpPanel_ `boolean`: Whether or not the inserter help panel is shown
- _\_\_experimentalCanUserUseUnfilteredHTML_ `boolean`: Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.
- _\_\_experimentalEnableLegacyWidgetBlock_ `boolean`: Whether the user has enabled the Legacy Widget Block
- _\_\_experimentalEnableMenuBlock_ `boolean`: Whether the user has enabled the Menu Block
- _\_\_experimentalBlockDirectory_ `boolean`: Whether the user has enabled the Block Directory
- _\_\_experimentalEnableFullSiteEditing_ `boolean`: Whether the user has enabled Full Site Editing

Expand Down
2 changes: 0 additions & 2 deletions packages/block-editor/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const PREFERENCES_DEFAULTS = {
* @property {boolean} showInserterHelpPanel Whether or not the inserter help panel is shown
* @property {boolean} __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.
* @property {boolean} __experimentalEnableLegacyWidgetBlock Whether the user has enabled the Legacy Widget Block
* @property {boolean} __experimentalEnableMenuBlock Whether the user has enabled the Menu Block
* @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory
* @property {boolean} __experimentalEnableFullSiteEditing Whether the user has enabled Full Site Editing
*/
Expand Down Expand Up @@ -152,7 +151,6 @@ export const SETTINGS_DEFAULTS = {
showInserterHelpPanel: true,
__experimentalCanUserUseUnfilteredHTML: false,
__experimentalEnableLegacyWidgetBlock: false,
__experimentalEnableMenuBlock: false,
__experimentalBlockDirectory: false,
__experimentalEnableFullSiteEditing: false,
gradients: [
Expand Down
5 changes: 2 additions & 3 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ export const registerCoreBlocks = () => {
latestPosts,
missing,
more,
navigation,
navigationLink,
nextpage,
preformatted,
pullquote,
Expand Down Expand Up @@ -172,14 +174,11 @@ export const __experimentalRegisterExperimentalCoreBlocks =
( settings ) => {
const {
__experimentalEnableLegacyWidgetBlock,
__experimentalEnableMenuBlock,
__experimentalEnableFullSiteEditing,
} = settings

;[
__experimentalEnableLegacyWidgetBlock ? legacyWidget : null,
__experimentalEnableMenuBlock ? navigation : null,
__experimentalEnableMenuBlock ? navigationLink : null,
socialLinks,
...socialLink.sites,

Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export const settings = {

keywords: [ __( 'menu' ), __( 'navigation' ), __( 'links' ) ],

category: 'layout',

supports: {
align: [ 'wide', 'full' ],
anchor: true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ function register_block_core_navigation() {
register_block_type(
'core/navigation',
array(
'category' => 'layout',
'attributes' => array(
'className' => array(
'type' => 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ describe( 'Block transforms', () => {
beforeAll( async () => {
await enableExperimentalFeatures( [
'#gutenberg-widget-experiments',
'#gutenberg-menu-block',
'#gutenberg-full-site-editing',
] );
await createNewPost();
Expand All @@ -131,7 +130,6 @@ describe( 'Block transforms', () => {
async () => {
await disableExperimentalFeatures( [
'#gutenberg-widget-experiments',
'#gutenberg-menu-block',
'#gutenberg-full-site-editing',
] );
}
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class EditorProvider extends Component {
'titlePlaceholder',
'onUpdateDefaultBlockStyles',
'__experimentalEnableLegacyWidgetBlock',
'__experimentalEnableMenuBlock',
'__experimentalBlockDirectory',
'__experimentalEnableFullSiteEditing',
'showInserterHelpPanel',
Expand Down
1 change: 0 additions & 1 deletion test/integration/full-content/full-content.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe( 'full post content fixture', () => {
unstable__bootstrapServerSideBlockDefinitions( require( './server-registered.json' ) );
const settings = {
__experimentalEnableLegacyWidgetBlock: true,
__experimentalEnableMenuBlock: true,
__experimentalEnableFullSiteEditing: true,
};
// Load all hooks that modify blocks
Expand Down

0 comments on commit 3bbea89

Please sign in to comment.