diff --git a/packages/block-editor/src/components/block-switcher/index.js b/packages/block-editor/src/components/block-switcher/index.js
index f28d0e49333817..c8ee422091ad1f 100644
--- a/packages/block-editor/src/components/block-switcher/index.js
+++ b/packages/block-editor/src/components/block-switcher/index.js
@@ -181,6 +181,21 @@ function BlockSwitcherDropdownMenuContents( {
);
}
+const BlockIndicator = ( { icon, showTitle, blockTitle } ) => (
+ <>
+
+ { showTitle && blockTitle && (
+
+ { blockTitle }
+
+ ) }
+ >
+);
+
export const BlockSwitcher = ( { clientIds, disabled, isUsingBindings } ) => {
const {
canRemove,
@@ -247,6 +262,7 @@ export const BlockSwitcher = ( { clientIds, disabled, isUsingBindings } ) => {
: __( 'Multiple blocks selected' );
const hideDropdown = disabled || ( ! hasBlockStyles && ! canRemove );
+
if ( hideDropdown ) {
return (
@@ -255,14 +271,11 @@ export const BlockSwitcher = ( { clientIds, disabled, isUsingBindings } ) => {
className="block-editor-block-switcher__no-switcher-icon"
title={ blockSwitcherLabel }
icon={
- <>
-
- { ( isReusable || isTemplate ) && (
-
- { blockTitle }
-
- ) }
- >
+
}
/>
@@ -292,18 +305,11 @@ export const BlockSwitcher = ( { clientIds, disabled, isUsingBindings } ) => {
className: 'block-editor-block-switcher__popover',
} }
icon={
- <>
-
- { ( isReusable || isTemplate ) && (
-
- { blockTitle }
-
- ) }
- >
+
}
toggleProps={ {
description: blockSwitcherDescription,
diff --git a/packages/block-editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss
index afcb576bd8db49..287afaed4055c6 100644
--- a/packages/block-editor/src/components/block-switcher/style.scss
+++ b/packages/block-editor/src/components/block-switcher/style.scss
@@ -46,12 +46,11 @@
}
// Even when the block switcher does not have any transformations, it still serves as a block indicator.
-.components-button.block-editor-block-switcher__no-switcher-icon:disabled {
- opacity: 1;
+.components-button.block-editor-block-switcher__no-switcher-icon[aria-disabled="true"] {
+ color: $gray-900;
// Since it's not clickable, though, don't show a hover state.
- &,
- .block-editor-block-icon.has-colors {
+ &:hover {
color: $gray-900;
}
}
diff --git a/packages/block-editor/src/components/block-toolbar/index.js b/packages/block-editor/src/components/block-toolbar/index.js
index 6c6acd662ed962..21dfb619b7eaf7 100644
--- a/packages/block-editor/src/components/block-toolbar/index.js
+++ b/packages/block-editor/src/components/block-toolbar/index.js
@@ -59,6 +59,7 @@ export function PrivateBlockToolbar( {
const {
blockClientId,
blockClientIds,
+ isContentOnlyEditingMode,
isDefaultEditingMode,
blockType,
toolbarKey,
@@ -83,8 +84,8 @@ export function PrivateBlockToolbar( {
const firstParentClientId = parents[ parents.length - 1 ];
const parentBlockName = getBlockName( firstParentClientId );
const parentBlockType = getBlockType( parentBlockName );
- const _isDefaultEditingMode =
- getBlockEditingMode( selectedBlockClientId ) === 'default';
+ const editingMode = getBlockEditingMode( selectedBlockClientId );
+ const _isDefaultEditingMode = editingMode === 'default';
const _blockName = getBlockName( selectedBlockClientId );
const isValid = selectedBlockClientIds.every( ( id ) =>
isBlockValid( id )
@@ -99,6 +100,7 @@ export function PrivateBlockToolbar( {
return {
blockClientId: selectedBlockClientId,
blockClientIds: selectedBlockClientIds,
+ isContentOnlyEditingMode: editingMode === 'contentOnly',
isDefaultEditingMode: _isDefaultEditingMode,
blockType: selectedBlockClientId && getBlockType( _blockName ),
shouldShowVisualToolbar: isValid && isVisual,
@@ -168,7 +170,9 @@ export function PrivateBlockToolbar( {
isLargeViewport &&
isDefaultEditingMode && }
{ ( shouldShowVisualToolbar || isMultiToolbar ) &&
- ( isDefaultEditingMode || isSynced ) && (
+ ( isDefaultEditingMode ||
+ isContentOnlyEditingMode ||
+ isSynced ) && (