Skip to content

Commit

Permalink
Fix: Widgets screen block toolbar overlaps the Block accordion (#16765)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Aug 5, 2019
1 parent 1fcc646 commit 71db908
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/block-editor/src/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
sortBy,
throttle,
} from 'lodash';
import classnames from 'classnames';

/**
* WordPress dependencies
Expand Down Expand Up @@ -191,6 +192,7 @@ class BlockList extends Component {

render() {
const {
className,
blockClientIds,
rootClientId,
isDraggable,
Expand All @@ -202,7 +204,12 @@ class BlockList extends Component {
} = this.props;

return (
<div className="editor-block-list__layout block-editor-block-list__layout">
<div className={
classnames(
'editor-block-list__layout block-editor-block-list__layout',
className
)
}>
{ blockClientIds.map( ( clientId ) => {
const isBlockInSelection = hasMultiSelection ?
multiSelectedBlockClientIds.includes( clientId ) :
Expand Down
4 changes: 3 additions & 1 deletion packages/edit-widgets/src/components/widget-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ function WidgetArea( {
</Sidebar.Inspector>
<WritingFlow>
<ObserveTyping>
<BlockList />
<BlockList
className="edit-widgets-main-block-list"
/>
</ObserveTyping>
</WritingFlow>
</BlockEditorProvider>
Expand Down
3 changes: 3 additions & 0 deletions packages/edit-widgets/src/components/widget-area/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
max-width: $content-width;
margin: 0 auto 30px;
}
.edit-widgets-main-block-list {
padding-top: $block-toolbar-height + 2 * $grid-size;
}

0 comments on commit 71db908

Please sign in to comment.