Skip to content

Commit

Permalink
implemented so as to not be a concern for the block implementer
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Oct 1, 2019
1 parent 4db19b6 commit 3cc07b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
7 changes: 3 additions & 4 deletions packages/block-editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,7 @@ function BlockListBlock( {
isSelected &&
! showEmptyBlockSideInserter &&
! isPartOfMultiSelection &&
! isTypingWithinBlock &&
! horizontalMover;
! isTypingWithinBlock;
const shouldShowBreadcrumb =
( isSelected && isNavigationMode ) ||
( ! isNavigationMode && ! isFocusMode && isHovered && ! isEmptyDefaultBlock );
Expand Down Expand Up @@ -483,7 +482,6 @@ function BlockListBlock( {
clientId={ clientId }
isSelectionEnabled={ isSelectionEnabled }
toggleSelection={ toggleSelection }
blockMover={ horizontalMover ? blockMover : null }
/>
);
if ( mode !== 'visual' ) {
Expand Down Expand Up @@ -534,7 +532,7 @@ function BlockListBlock( {
/>
) }
<div className="editor-block-list__block-edit block-editor-block-list__block-edit">
{ shouldRenderMovers && blockMover }
{ shouldRenderMovers && ! horizontalMover && blockMover }
{ shouldShowBreadcrumb && (
<BlockBreadcrumb
clientId={ clientId }
Expand Down Expand Up @@ -574,6 +572,7 @@ function BlockListBlock( {
{ isValid && mode === 'html' && (
<BlockHtml clientId={ clientId } />
) }
{ shouldRenderMovers && horizontalMover && blockMover }
{ ! isValid && [
<BlockInvalidWarning
key="invalid-warning"
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@

.block-editor-block-list__block-edit {
position: relative;
& > div {
display: flex;
}

&::before {
z-index: z-index(".block-editor-block-list__block-edit::before");
Expand Down
4 changes: 4 additions & 0 deletions packages/block-editor/src/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
grid-template-columns: 1fr 1fr;
width: auto;
min-height: auto;
height: $icon-button-size-small;
position: relative;
top: $block-padding;
margin-left: $block-padding;

.block-editor-block-mover__control-drag-handle {
display: none;
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/navigation-menu-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ function NavigationMenuItemEdit( {
isSelected,
isParentOfSelectedBlock,
setAttributes,
blockMover,
} ) {
const plainTextRef = useRef( null );
const onEditLableClicked = useCallback(
Expand All @@ -62,7 +61,6 @@ function NavigationMenuItemEdit( {
aria-label={ __( 'Navigation Label' ) }
maxRows={ 1 }
/>
{ blockMover }
<Dropdown
contentClassName="wp-block-navigation-menu-item__dropdown-content"
position="bottom left"
Expand Down

0 comments on commit 3cc07b2

Please sign in to comment.