Skip to content

Commit

Permalink
Remove unused ListViewBlockSlot and ListViewEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Oct 8, 2021
1 parent ddc9dd9 commit 1665384
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 161 deletions.
2 changes: 0 additions & 2 deletions packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -32,8 +30,6 @@ const ListViewBlockContents = forwardRef(
},
ref
) => {
const { __experimentalFeatures } = useListViewContext();

const { clientId } = block;

const { blockMovingClientId, selectedBlockInBlockEditor } = useSelect(
Expand All @@ -52,10 +48,6 @@ const ListViewBlockContents = forwardRef(
[ clientId ]
);

const SelectButton = __experimentalFeatures
? ListViewBlockSlot
: ListViewBlockSelectButton;

const isBlockMoveTarget =
blockMovingClientId && selectedBlockInBlockEditor === clientId;

Expand All @@ -66,7 +58,7 @@ const ListViewBlockContents = forwardRef(
return (
<BlockDraggable clientIds={ [ block.clientId ] }>
{ ( { draggable, onDragStart, onDragEnd } ) => (
<SelectButton
<ListViewBlockSelectButton
ref={ ref }
className={ className }
block={ block }
Expand Down
120 changes: 0 additions & 120 deletions packages/block-editor/src/components/list-view/block-slot.js

This file was deleted.

29 changes: 0 additions & 29 deletions packages/block-editor/src/components/list-view/editor.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1665384

Please sign in to comment.