Skip to content

Commit

Permalink
Enable list view (#29936)
Browse files Browse the repository at this point in the history
* enable listview, reorder items

* removes the hasListViewModal prop as it is not used anymore

Co-authored-by: Andrei Draganescu <github@andreidraganescu.info>
  • Loading branch information
draganescu and Andrei Draganescu authored Mar 22, 2021
1 parent 1c2c0ae commit 2e4a284
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions packages/block-library/src/navigation/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function Navigation( {
className,
hasSubmenuIndicatorSetting = true,
hasItemJustificationControls = attributes.orientation === 'horizontal',
hasListViewModal = true,
} ) {
const [ isPlaceholderShown, setIsPlaceholderShown ] = useState(
! hasExistingNavItems
Expand Down Expand Up @@ -124,11 +123,9 @@ function Navigation( {
} }
/>
) }
{ hasListViewModal && (
<ToolbarGroup>{ navigatorToolbarButton }</ToolbarGroup>
) }
<ToolbarGroup>{ navigatorToolbarButton }</ToolbarGroup>
</BlockControls>
{ hasListViewModal && navigatorModal }
{ navigatorModal }
<InspectorControls>
{ hasSubmenuIndicatorSetting && (
<PanelBody title={ __( 'Display settings' ) }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const addMenuNameEditor = createHigherOrderComponent(
}
return (
<>
<BlockEdit { ...props } />
<NameDisplay />
<BlockEdit { ...props } />
</>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const removeNavigationBlockEditUnsupportedFeatures = createHigherOrderComponent(
{ ...props }
hasSubmenuIndicatorSetting={ false }
hasItemJustificationControls={ false }
hasListViewModal={ false }
/>
);
},
Expand Down

0 comments on commit 2e4a284

Please sign in to comment.