Skip to content
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
20 changes: 0 additions & 20 deletions docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1160,18 +1160,6 @@ _Returns_

- `boolean`: True if multi-selecting, false if not.

### isNavigationMode

Returns whether the navigation mode is enabled.

_Parameters_

- _state_ `Object`: Editor state.

_Returns_

- `boolean`: Is navigation mode enabled.

### isSelectionEnabled

Selector that returns if multi-selection is enabled or not.
Expand Down Expand Up @@ -1702,14 +1690,6 @@ _Parameters_
- _clientId_ `string`: The block's clientId.
- _hasControlledInnerBlocks_ `boolean`: True if the block's inner blocks are controlled.

### setNavigationMode

Action that enables or disables the navigation mode.

_Parameters_

- _isNavigationMode_ `boolean`: Enable/Disable navigation mode.

### setTemplateValidity

Action that resets the template validity.
Expand Down
3 changes: 0 additions & 3 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ function gutenberg_enable_experiments() {
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-media-processing', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalMediaProcessing = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-editor-write-mode', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEditorWriteMode = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-content-only-pattern-insertion', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalContentOnlyPatternInsertion = true', 'before' );
}
Expand Down
12 changes: 0 additions & 12 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,6 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-editor-write-mode',
__( 'Simplified site editing', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enables Write mode in the Site Editor for a simplified editing experience.', 'gutenberg' ),
'id' => 'gutenberg-editor-write-mode',
)
);

add_settings_field(
'gutenberg-full-page-client-side-navigation',
__( 'Interactivity API: Full-page client-side navigation', 'gutenberg' ),
Expand Down
4 changes: 0 additions & 4 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,6 @@ _Related_

- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore>

### ToolSelector

Undocumented declaration.

### transformStyles

Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export function useShowBlockTools() {
getBlock,
getBlockMode,
getSettings,
__unstableGetEditorMode,
isTyping,
isBlockInterfaceHidden,
} = unlock( select( blockEditorStore ) );
Expand All @@ -32,19 +31,13 @@ export function useShowBlockTools() {
getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();

const block = getBlock( clientId );
const editorMode = __unstableGetEditorMode();
const hasSelectedBlock = !! clientId && !! block;
const isEmptyDefaultBlock =
hasSelectedBlock &&
isUnmodifiedDefaultBlock( block, 'content' ) &&
getBlockMode( clientId ) !== 'html';
const _showEmptyBlockSideInserter =
clientId &&
! isTyping() &&
// Hide the block inserter on the navigation mode.
// See https://github.com/WordPress/gutenberg/pull/66636#discussion_r1824728483.
editorMode !== 'navigation' &&
isEmptyDefaultBlock;
clientId && ! isTyping() && isEmptyDefaultBlock;
const _showBlockToolbarPopover =
! isBlockInterfaceHidden() &&
! getSettings().hasFixedToolbar &&
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export {
RichTextToolbarButton,
__unstableRichTextInputEvent,
} from './rich-text';
export { default as ToolSelector } from './tool-selector';
export { default as __experimentalUnitControl } from './unit-control';
export { default as URLInput } from './url-input';
export { default as URLInputButton } from './url-input/button';
Expand Down
107 changes: 0 additions & 107 deletions packages/block-editor/src/components/tool-selector/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/block-editor/src/components/tool-selector/style.scss

This file was deleted.

13 changes: 0 additions & 13 deletions packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1665,19 +1665,6 @@ export const __unstableMarkAutomaticChange =
} );
};

/**
* Action that enables or disables the navigation mode.
*
* @param {boolean} isNavigationMode Enable/Disable navigation mode.
*/
export const setNavigationMode =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any backwards compat concerns here? I searched wpdirectory and it looks like there'll be next to no disruption

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt it because both action and selectors actually doing anything was dependent on the experiment being enabled, so it would be of no use for extenders.

( isNavigationMode = true ) =>
( { dispatch } ) => {
dispatch.__unstableSetEditorMode(
isNavigationMode ? 'navigation' : 'edit'
);
};

/**
* Action that sets the editor mode
*
Expand Down
4 changes: 1 addition & 3 deletions packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,11 @@ function getEnabledClientIdsTreeUnmemoized( state, rootClientId ) {
*
* @return {Object[]} Tree of block objects with only clientID and innerBlocks set.
*/
export const getEnabledClientIdsTree = createRegistrySelector( ( select ) =>
export const getEnabledClientIdsTree = createRegistrySelector( () =>
createSelector( getEnabledClientIdsTreeUnmemoized, ( state ) => [
state.blocks.order,
state.derivedBlockEditingModes,
state.derivedNavModeBlockEditingModes,
state.blockEditingModes,
select( STORE_NAME ).__unstableGetEditorMode( state ),
] )
);

Expand Down
Loading