diff --git a/packages/block-editor/src/components/index.js b/packages/block-editor/src/components/index.js index 34f5a7aaff262..528108cd558eb 100644 --- a/packages/block-editor/src/components/index.js +++ b/packages/block-editor/src/components/index.js @@ -70,8 +70,6 @@ export { default as __experimentalLinkControlSearchResults } from './link-contro export { default as __experimentalLinkControlSearchItem } from './link-control/search-item'; export { default as LineHeightControl } from './line-height-control'; export { default as __experimentalListView } from './list-view'; -export { ListViewBlockFill as __experimentalListViewBlockFill } from './list-view/block-slot'; -export { default as __experimentalListViewEditor } from './list-view/editor'; export { default as MediaReplaceFlow } from './media-replace-flow'; export { default as MediaPlaceholder } from './media-placeholder'; export { default as MediaUpload } from './media-upload'; diff --git a/packages/block-editor/src/components/list-view/block-contents.js b/packages/block-editor/src/components/list-view/block-contents.js index 831e94c779671..61e221b77f106 100644 --- a/packages/block-editor/src/components/list-view/block-contents.js +++ b/packages/block-editor/src/components/list-view/block-contents.js @@ -12,8 +12,6 @@ import { forwardRef } from '@wordpress/element'; /** * Internal dependencies */ -import { useListViewContext } from './context'; -import ListViewBlockSlot from './block-slot'; import ListViewBlockSelectButton from './block-select-button'; import BlockDraggable from '../block-draggable'; import { store as blockEditorStore } from '../../store'; @@ -32,8 +30,6 @@ const ListViewBlockContents = forwardRef( }, ref ) => { - const { __experimentalFeatures } = useListViewContext(); - const { clientId } = block; const { blockMovingClientId, selectedBlockInBlockEditor } = useSelect( @@ -52,10 +48,6 @@ const ListViewBlockContents = forwardRef( [ clientId ] ); - const SelectButton = __experimentalFeatures - ? ListViewBlockSlot - : ListViewBlockSelectButton; - const isBlockMoveTarget = blockMovingClientId && selectedBlockInBlockEditor === clientId; @@ -66,7 +58,7 @@ const ListViewBlockContents = forwardRef( return ( { ( { draggable, onDragStart, onDragEnd } ) => ( - `ListViewBlock-${ clientId }`; - -function ListViewBlockSlot( props, ref ) { - const { clientId } = props.block; - const { name } = useSelect( - ( select ) => select( blockEditorStore ).getBlockName( clientId ), - [ clientId ] - ); - const instanceId = useInstanceId( ListViewBlockSlot ); - - return ( - - { ( fills ) => { - if ( ! fills.length ) { - return ( - - ); - } - - const { - className, - isSelected, - position, - siblingBlockCount, - level, - tabIndex, - onFocus, - onToggleExpanded, - } = props; - - const blockType = getBlockType( name ); - const descriptionId = `list-view-block-slot__${ instanceId }`; - const blockPositionDescription = getBlockPositionDescription( - position, - siblingBlockCount, - level - ); - - const forwardedFillProps = { - // Ensure that the component in the slot can receive - // keyboard navigation. - tabIndex, - onFocus, - ref, - // Give the element rendered in the slot a description - // that describes its position. - 'aria-describedby': descriptionId, - }; - - return ( - <> -
- - - { Children.map( fills, ( fill ) => - cloneElement( fill, { - ...fill.props, - ...forwardedFillProps, - } ) - ) } - { isSelected && ( - - { __( '(selected block)' ) } - - ) } -
- { blockPositionDescription } -
-
- - ); - } } -
- ); -} - -export default forwardRef( ListViewBlockSlot ); - -export const ListViewBlockFill = ( props ) => { - const { clientId } = useContext( BlockListBlockContext ); - return ; -}; diff --git a/packages/block-editor/src/components/list-view/editor.js b/packages/block-editor/src/components/list-view/editor.js deleted file mode 100644 index 1d3df28a61083..0000000000000 --- a/packages/block-editor/src/components/list-view/editor.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ -import { RichText } from '../'; -import { ListViewBlockFill } from './block-slot'; - -export default function ListViewEditor( { value, onChange } ) { - return ( - - - - ); -} diff --git a/packages/block-editor/src/components/list-view/style.scss b/packages/block-editor/src/components/list-view/style.scss index 5b9bbda01fde3..032c45d446f14 100644 --- a/packages/block-editor/src/components/list-view/style.scss +++ b/packages/block-editor/src/components/list-view/style.scss @@ -244,7 +244,6 @@ } } -.block-editor-list-view-block-slot__description, .block-editor-list-view-block-select-button__description, .block-editor-list-view-appender__description { display: none;