Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove parent block title from block hover title. #18795

Merged
merged 1 commit into from Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 1 addition & 12 deletions packages/block-editor/src/components/block-list/breadcrumb.js
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
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