Skip to content

Commit

Permalink
Leave help text in patterns flyout regardless of zoom state (#67132)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored Nov 20, 2024
1 parent 776b9e0 commit fa675a7
Showing 1 changed file with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
__experimentalText as Text,
FlexBlock,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';

/**
* Internal dependencies
Expand All @@ -34,8 +33,6 @@ import {
starterPatternsCategory,
INSERTER_PATTERN_TYPES,
} from './utils';
import { store as blockEditorStore } from '../../../store';
import { unlock } from '../../../lock-unlock';

const noop = () => {};

Expand All @@ -46,10 +43,6 @@ export function PatternCategoryPreviews( {
category,
showTitlesAsTooltip,
} ) {
const isZoomOutMode = useSelect(
( select ) => unlock( select( blockEditorStore ) ).isZoomOut(),
[]
);
const [ allPatterns, , onClickPattern ] = usePatternsState(
onInsert,
rootClientId,
Expand Down Expand Up @@ -179,15 +172,13 @@ export function PatternCategoryPreviews( {
</VStack>
{ currentCategoryPatterns.length > 0 && (
<>
{ isZoomOutMode && (
<Text
size="12"
as="p"
className="block-editor-inserter__help-text"
>
{ __( 'Drag and drop patterns into the canvas.' ) }
</Text>
) }
<Text
size="12"
as="p"
className="block-editor-inserter__help-text"
>
{ __( 'Drag and drop patterns into the canvas.' ) }
</Text>
<BlockPatternsList
ref={ scrollContainerRef }
blockPatterns={ pagingProps.categoryPatterns }
Expand Down

0 comments on commit fa675a7

Please sign in to comment.