Skip to content

Commit

Permalink
test no block selection
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Oct 5, 2022
1 parent 10b8190 commit b8a8cc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function ListViewBlockSelectButton(
'block-editor-list-view-block-select-button',
className
) }
onClick={ onClick }
onClick={ () => null }
onKeyDown={ onKeyDownHandler }
ref={ ref }
tabIndex={ tabIndex }
Expand Down
45 changes: 3 additions & 42 deletions packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ import {
__experimentalRecursionProvider as RecursionProvider,
__experimentalUseHasRecursion as useHasRecursion,
store as blockEditorStore,
BlockEditorProvider,
withColors,
PanelColorSettings,
ContrastChecker,
getColorClassName,
Warning,
__experimentalUseBlockOverlayActive as useBlockOverlayActive,
} from '@wordpress/block-editor';
import {
useEntityBlockEditor,
EntityProvider,
store as coreStore,
} from '@wordpress/core-data';
import { EntityProvider, store as coreStore } from '@wordpress/core-data';

import { useDispatch } from '@wordpress/data';
import {
Expand Down Expand Up @@ -219,12 +214,6 @@ function Navigation( {
hasResolvedCanUserCreateNavigationMenu,
} = useNavigationMenu( ref );

const [ navigationInnerBlocks, onInput, onChange ] = useEntityBlockEditor(
'postType',
'wp_navigation',
{ id: ref }
);

const navMenuResolvedButMissing =
hasResolvedNavigationMenus && isNavigationMenuMissing;

Expand Down Expand Up @@ -669,16 +658,7 @@ function Navigation( {
/* translators: %s: The name of a menu. */
actionLabel={ __( "Switch to '%s'" ) }
/>
<BlockEditorProvider
value={ navigationInnerBlocks }
onChange={ onChange }
onInput={ onInput }
>
<ListView
blocks={ navigationInnerBlocks }
isExpanded={ true }
/>
</BlockEditorProvider>
<ListView blocks={ innerBlocks } isExpanded={ true } />
</PanelBody>
</InspectorControls>
{ stylingInspectorControls }
Expand Down Expand Up @@ -748,16 +728,6 @@ function Navigation( {
/* translators: %s: The name of a menu. */
actionLabel={ __( "Switch to '%s'" ) }
/>
<BlockEditorProvider
value={ navigationInnerBlocks }
onChange={ onChange }
onInput={ onInput }
>
<ListView
blocks={ navigationInnerBlocks }
isExpanded={ true }
/>
</BlockEditorProvider>
</PanelBody>
</InspectorControls>
<Warning>
Expand Down Expand Up @@ -862,16 +832,7 @@ function Navigation( {
/* translators: %s: The name of a menu. */
actionLabel={ __( "Switch to '%s'" ) }
/>
<BlockEditorProvider
value={ navigationInnerBlocks }
onChange={ onChange }
onInput={ onInput }
>
<ListView
blocks={ navigationInnerBlocks }
isExpanded={ true }
/>
</BlockEditorProvider>
<ListView blocks={ innerBlocks } isExpanded={ true } />
</PanelBody>
</InspectorControls>
{ stylingInspectorControls }
Expand Down

0 comments on commit b8a8cc8

Please sign in to comment.