Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave help text regardless of zoom state #67132

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading