From d479589c3afebe3fc76a99cfb672b574a8101ac4 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 24 Jun 2020 11:00:20 +0100 Subject: [PATCH] changes per review --- .../block-editor/src/components/inserter/quick-inserter.js | 3 +++ packages/block-editor/src/components/inserter/search-form.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/inserter/quick-inserter.js b/packages/block-editor/src/components/inserter/quick-inserter.js index 3f4ff7b8f4c96..40a8c8b865c8a 100644 --- a/packages/block-editor/src/components/inserter/quick-inserter.js +++ b/packages/block-editor/src/components/inserter/quick-inserter.js @@ -147,6 +147,9 @@ function QuickInserter( { // Announce search results on change useEffect( () => { + if ( ! filterValue ) { + return; + } const count = filteredBlockTypes.length + filteredBlockPatterns.length; const resultsFoundMessage = sprintf( /* translators: %d: number of results. */ diff --git a/packages/block-editor/src/components/inserter/search-form.js b/packages/block-editor/src/components/inserter/search-form.js index b233c6b692506..bae5092d95eca 100644 --- a/packages/block-editor/src/components/inserter/search-form.js +++ b/packages/block-editor/src/components/inserter/search-form.js @@ -4,7 +4,7 @@ import { useInstanceId } from '@wordpress/compose'; import { __ } from '@wordpress/i18n'; import { VisuallyHidden, Button } from '@wordpress/components'; -import { Icon, search, close } from '@wordpress/icons'; +import { Icon, search, closeSmall } from '@wordpress/icons'; import { useRef } from '@wordpress/element'; function InserterSearchForm( { onChange, value } ) { @@ -37,7 +37,7 @@ function InserterSearchForm( { onChange, value } ) {
{ !! value && (