Skip to content

Commit

Permalink
Selecting parents: Try clickthrough.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joen Asmussen authored and gziolo committed May 13, 2019
1 parent eea04cf commit 1a12713
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
3 changes: 1 addition & 2 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
14 changes: 1 addition & 13 deletions packages/block-library/src/columns/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 1a12713

Please sign in to comment.