From ecbc39289e3a2f131916f8774a072c2537756cb1 Mon Sep 17 00:00:00 2001 From: Stu Feldt Date: Sun, 8 Oct 2017 14:42:01 -0500 Subject: [PATCH 1/2] Show block description for gallery block regardless of how many images are selected --- blocks/library/gallery/block.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/blocks/library/gallery/block.js b/blocks/library/gallery/block.js index 19712352623a9..34d8b0e2a0bdf 100644 --- a/blocks/library/gallery/block.js +++ b/blocks/library/gallery/block.js @@ -97,6 +97,22 @@ class GalleryBlock extends Component { render() { const { attributes, focus, className } = this.props; const { images, columns = defaultColumnsNumber( attributes ), align, imageCrop, linkTo } = attributes; + + const blockDescription = ( + +

+ {__("Image galleries are a great way to share groups of pictures on your site.")} +

+
+ ); + + const inspectorControls = ( + focus && ( + + {blockDescription} + + ) + ); const controls = ( focus && ( @@ -133,6 +149,7 @@ class GalleryBlock extends Component { return [ controls, + inspectorControls, 1 && ( - -

{ __( 'Image galleries are a great way to share groups of pictures on your site.' ) }

-
+ {blockDescription}

{ __( 'Gallery Settings' ) }

Date: Sun, 8 Oct 2017 15:01:30 -0500 Subject: [PATCH 2/2] Updated formatting --- blocks/library/gallery/block.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/library/gallery/block.js b/blocks/library/gallery/block.js index 34d8b0e2a0bdf..951ded42e5ec9 100644 --- a/blocks/library/gallery/block.js +++ b/blocks/library/gallery/block.js @@ -97,13 +97,13 @@ class GalleryBlock extends Component { render() { const { attributes, focus, className } = this.props; const { images, columns = defaultColumnsNumber( attributes ), align, imageCrop, linkTo } = attributes; - + const blockDescription = (

- {__("Image galleries are a great way to share groups of pictures on your site.")} + {__( 'Image galleries are a great way to share groups of pictures on your site.' )}

-
+ ); const inspectorControls = (