diff --git a/packages/block-editor/src/components/block-patterns-list/index.js b/packages/block-editor/src/components/block-patterns-list/index.js index 4b8c37846bad84..4d2c565f4bfede 100644 --- a/packages/block-editor/src/components/block-patterns-list/index.js +++ b/packages/block-editor/src/components/block-patterns-list/index.js @@ -45,6 +45,7 @@ function BlockPattern( { pattern, onClick, onHover, + showTitle = true, showTooltip, } ) { const [ isDragging, setIsDragging ] = useState( false ); @@ -122,25 +123,27 @@ function BlockPattern( { viewportWidth={ viewportWidth } /> - - { pattern.type === - INSERTER_PATTERN_TYPES.user && - ! pattern.syncStatus && ( -
- + { showTitle && ( + + { pattern.type === + INSERTER_PATTERN_TYPES.user && + ! pattern.syncStatus && ( +
+ +
+ ) } + { ( ! showTooltip || + pattern.type === + INSERTER_PATTERN_TYPES.user ) && ( +
+ { pattern.title }
) } - { ( ! showTooltip || - pattern.type === - INSERTER_PATTERN_TYPES.user ) && ( -
- { pattern.title } -
- ) } -
+ + ) } { !! pattern.description && ( @@ -170,6 +173,7 @@ function BlockPatternsList( onClickPattern, orientation, label = __( 'Block patterns' ), + showTitle = true, showTitlesAsTooltip, pagingProps, }, @@ -203,6 +207,7 @@ function BlockPatternsList( onClick={ onClickPattern } onHover={ onHover } isDraggable={ isDraggable } + showTitle={ showTitle } showTooltip={ showTitlesAsTooltip } /> ) : ( diff --git a/packages/block-library/src/template-part/edit/index.js b/packages/block-library/src/template-part/edit/index.js index cf816fbc602e35..ba5446e9fa01fa 100644 --- a/packages/block-library/src/template-part/edit/index.js +++ b/packages/block-library/src/template-part/edit/index.js @@ -91,6 +91,7 @@ function TemplatesList( { availableTemplates, onSelect } ) { blockPatterns={ availableTemplates } shownPatterns={ shownTemplates } onClickPattern={ onSelect } + showTitle={ false } /> ); }