From 36d22b8044940e21d469f2a66deb4c1cd1391206 Mon Sep 17 00:00:00 2001 From: Sami Keijonen Date: Thu, 3 May 2018 16:47:55 +0300 Subject: [PATCH 1/2] Add Hide teaser help text in More block. --- packages/block-library/src/more/edit.js | 13 ++++++++++--- packages/block-library/src/more/index.js | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/more/edit.js b/packages/block-library/src/more/edit.js index 1c207d5b16c98..54347bbdbc6fd 100644 --- a/packages/block-library/src/more/edit.js +++ b/packages/block-library/src/more/edit.js @@ -40,11 +40,17 @@ export default class MoreEdit extends Component { } } + getHideExcerptHelp( checked ) { + return checked ? + __( 'The excerpt is hidden.' ) : + __( 'The excerpt is visible.' ); + } + render() { const { customText, noTeaser } = this.props.attributes; const { setAttributes } = this.props; - const toggleNoTeaser = () => setAttributes( { noTeaser: ! noTeaser } ); + const toggleHideExcerpt = () => setAttributes( { noTeaser: ! noTeaser } ); const { defaultText } = this.state; const value = customText !== undefined ? customText : defaultText; const inputLength = value.length + 1; @@ -54,9 +60,10 @@ export default class MoreEdit extends Component { diff --git a/packages/block-library/src/more/index.js b/packages/block-library/src/more/index.js index f51b9ef971e45..58878cbe160e4 100644 --- a/packages/block-library/src/more/index.js +++ b/packages/block-library/src/more/index.js @@ -25,7 +25,7 @@ export const name = 'core/more'; export const settings = { title: _x( 'More', 'block name' ), - description: __( 'Mark the excerpt of this content. Content before this block will be shown in the excerpt on your archives page.' ), + description: __( 'Content before this block will be shown in the excerpt on your archives page.' ), icon: , From 3fc81a361cd87387c7a23ee9cfbc59ce683ae7f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Fri, 1 Feb 2019 09:17:13 +0100 Subject: [PATCH 2/2] Update snapshort for the unit test covering More block --- .../block-library/src/more/test/__snapshots__/edit.js.snap | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/more/test/__snapshots__/edit.js.snap b/packages/block-library/src/more/test/__snapshots__/edit.js.snap index 7c03b45fa5df2..ace475450948e 100644 --- a/packages/block-library/src/more/test/__snapshots__/edit.js.snap +++ b/packages/block-library/src/more/test/__snapshots__/edit.js.snap @@ -6,7 +6,8 @@ exports[`core/more/edit should match snapshot when noTeaser is false 1`] = ` @@ -31,7 +32,8 @@ exports[`core/more/edit should match snapshot when noTeaser is true 1`] = `