Skip to content

Commit

Permalink
Fix small visual glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 16, 2020
1 parent 187a372 commit 8102b10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
27 changes: 15 additions & 12 deletions packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,21 @@ function InserterMenu( {
onKeyDown={ onKeyDown }
>
<div className="block-editor-inserter__main-area">
<InserterSearchForm onChange={ setFilterValue } />
{ showPatterns && (
<InserterTabs>
{ ( tab ) => {
if ( tab.name === 'blocks' ) {
return blocksTab;
}
return patternsTab;
} }
</InserterTabs>
) }
{ ! showPatterns && blocksTab }
{ /* the following div is necessary to fix the sticky position of the search form */ }
<div className="block-editor-inserter__content">
<InserterSearchForm onChange={ setFilterValue } />
{ showPatterns && (
<InserterTabs>
{ ( tab ) => {
if ( tab.name === 'blocks' ) {
return blocksTab;
}
return patternsTab;
} }
</InserterTabs>
) }
{ ! showPatterns && blocksTab }
</div>
</div>
{ showInserterHelpPanel && hoveredItem && (
<div className="block-editor-inserter__preview-container">
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ $block-inserter-tabs-height: 44px;

.block-editor-inserter__quick-inserter-results {
padding-bottom: $grid-unit-20;
margin-top: -$grid-unit-10;

.block-editor-inserter__panel-header {
height: 0;
Expand Down

0 comments on commit 8102b10

Please sign in to comment.