From 1a12713a61006bb84def824e43732b7646be552a Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Thu, 9 May 2019 11:52:22 +0200 Subject: [PATCH] Selecting parents: Try clickthrough. Clickthrough has you select the parent before you can select the child. This is already in place on the mobile breakpoints, this just expands it to desktop as well. It is a work in progress, right now it is not working as intended: once you have "unlocked" the deepest level, it becomes immediately locked and you have to click through the layers again to unlock it again. The deepest layer should always be unlocked until you deselect all blocks again. --- .../src/components/inner-blocks/index.js | 3 +-- packages/block-library/src/columns/editor.scss | 14 +------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 2a69e5305fc3f..1137f6e5c10c6 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -106,14 +106,13 @@ class InnerBlocks extends Component { render() { const { clientId, - isSmallScreen, isSelectedBlockInRoot, renderAppender, } = this.props; const { templateInProcess } = this.state; const classes = classnames( 'editor-inner-blocks block-editor-inner-blocks', { - 'has-overlay': isSmallScreen && ! isSelectedBlockInRoot, + 'has-overlay': ! isSelectedBlockInRoot, } ); return ( diff --git a/packages/block-library/src/columns/editor.scss b/packages/block-library/src/columns/editor.scss index c771c79f5f9d3..6277ee7ee180c 100644 --- a/packages/block-library/src/columns/editor.scss +++ b/packages/block-library/src/columns/editor.scss @@ -164,17 +164,5 @@ div.block-core-columns.is-vertically-aligned-bottom { */ [data-type="core/column"] > .editor-block-list__block-edit > .editor-block-list__breadcrumb { right: 0; -} - -// The empty state of a columns block has the default appenders. -// Since those appenders are not blocks, the parent, actual block, appears "hovered" when hovering the appenders. -// Because the column shouldn't be hovered as part of this temporary passthrough, we unset the hover style. -.wp-block-columns [data-type="core/column"].is-hovered { - > .block-editor-block-list__block-edit::before { - content: none; - } - - .block-editor-block-list__breadcrumb { - display: none; - } + left: auto; }