Skip to content

Commit

Permalink
Remove link to parent from block hover breadcrumb. (#18795)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill authored and youknowriad committed Nov 28, 2019
1 parent e32400c commit 353b384
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
13 changes: 1 addition & 12 deletions packages/block-editor/src/components/block-list/breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { Toolbar, Button } from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import { useDispatch } from '@wordpress/data';
import { forwardRef } from '@wordpress/element';

/**
Expand All @@ -20,21 +20,10 @@ import BlockTitle from '../block-title';
*/
const BlockBreadcrumb = forwardRef( ( { clientId }, ref ) => {
const { setNavigationMode } = useDispatch( 'core/block-editor' );
const { rootClientId } = useSelect( ( select ) => {
return {
rootClientId: select( 'core/block-editor' ).getBlockRootClientId( clientId ),
};
} );

return (
<div className="editor-block-list__breadcrumb block-editor-block-list__breadcrumb">
<Toolbar>
{ rootClientId && (
<>
<BlockTitle clientId={ rootClientId } />
<span className="editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow" />
</>
) }
<Button ref={ ref } onClick={ () => setNavigationMode( false ) }>
<BlockTitle clientId={ clientId } />
</Button>
Expand Down
10 changes: 0 additions & 10 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1097,16 +1097,6 @@
}
}

.block-editor-block-list__descendant-arrow::before {
content: "";
display: inline-block;
padding: 0 4px;

.rtl & {
content: "";
}
}

.block-editor-block-list__block {
@include break-small {
// Increase the hover and selection area around blocks.
Expand Down

0 comments on commit 353b384

Please sign in to comment.