From b4bc4fc0d3b150c47786966dae2f5639a3a1dc1e Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 1 Sep 2020 13:26:59 +0300 Subject: [PATCH 1/4] Add gradient, color, line height and font size support in Quote --- packages/block-library/src/quote/block.json | 8 +++++++- packages/block-library/src/quote/theme.scss | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index d828557e145808..899f748a65b42d 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -20,6 +20,12 @@ } }, "supports": { - "anchor": true + "anchor": true, + "__experimentalColor": { + "gradients": true, + "linkColor": true + }, + "__experimentalLineHeight": true, + "__experimentalFontSize": true } } diff --git a/packages/block-library/src/quote/theme.scss b/packages/block-library/src/quote/theme.scss index dc13aaf48546fa..c4245fa38acde3 100644 --- a/packages/block-library/src/quote/theme.scss +++ b/packages/block-library/src/quote/theme.scss @@ -29,4 +29,8 @@ &.is-large { border: none; } + + .has-background & { + padding: $block-bg-padding--v $block-bg-padding--h; + } } From a6464d0b9d990a23816c948e2a5d866f90a461c8 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 1 Sep 2020 17:39:50 +0300 Subject: [PATCH 2/4] remove quote deprecated test --- .../blocks/core__quote__deprecated-1.html | 6 ------ .../blocks/core__quote__deprecated-1.json | 14 ------------- .../core__quote__deprecated-1.parsed.json | 20 ------------------- .../core__quote__deprecated-1.serialized.html | 3 --- 4 files changed, 43 deletions(-) delete mode 100644 packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.html delete mode 100644 packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.json delete mode 100644 packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.parsed.json delete mode 100644 packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.serialized.html diff --git a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.html b/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.html deleted file mode 100644 index ade24a270ceaf5..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.html +++ /dev/null @@ -1,6 +0,0 @@ - -
-

Testing deprecated quote block...

-
...with a caption
-
- diff --git a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.json b/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.json deleted file mode 100644 index aa920966ae06ba..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "clientId": "_clientId_0", - "name": "core/quote", - "isValid": true, - "attributes": { - "value": "

Testing deprecated quote block...

", - "citation": "...with a caption", - "style": 1 - }, - "innerBlocks": [], - "originalContent": "
\n\t

Testing deprecated quote block...

\n\t
...with a caption
\n
" - } -] diff --git a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.parsed.json b/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.parsed.json deleted file mode 100644 index 107d6a15672137..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.parsed.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "blockName": "core/quote", - "attrs": {}, - "innerBlocks": [], - "innerHTML": "\n
\n\t

Testing deprecated quote block...

\n\t
...with a caption
\n
\n", - "innerContent": [ - "\n
\n\t

Testing deprecated quote block...

\n\t
...with a caption
\n
\n" - ] - }, - { - "blockName": null, - "attrs": {}, - "innerBlocks": [], - "innerHTML": "\n", - "innerContent": [ - "\n" - ] - } -] diff --git a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.serialized.html b/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.serialized.html deleted file mode 100644 index d865a5f09d9011..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__quote__deprecated-1.serialized.html +++ /dev/null @@ -1,3 +0,0 @@ - -

Testing deprecated quote block...

...with a caption
- From 6aaeba2f4acc28680882c79c2ace0550a5b568c5 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 1 Sep 2020 19:25:07 +0300 Subject: [PATCH 3/4] remove broken deprecation --- .../block-library/src/quote/deprecated.js | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/packages/block-library/src/quote/deprecated.js b/packages/block-library/src/quote/deprecated.js index f74236f7f5a263..1dee4b5a4c180e 100644 --- a/packages/block-library/src/quote/deprecated.js +++ b/packages/block-library/src/quote/deprecated.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import { omit } from 'lodash'; - /** * WordPress dependencies */ @@ -43,44 +38,6 @@ const deprecated = [ ); }, }, - { - attributes: { - ...blockAttributes, - style: { - type: 'number', - default: 1, - }, - }, - - migrate( attributes ) { - if ( attributes.style === 2 ) { - return { - ...omit( attributes, [ 'style' ] ), - className: attributes.className - ? attributes.className + ' is-style-large' - : 'is-style-large', - }; - } - - return attributes; - }, - - save( { attributes } ) { - const { align, value, citation, style } = attributes; - - return ( -
- - { ! RichText.isEmpty( citation ) && ( - - ) } -
- ); - }, - }, { attributes: { ...blockAttributes, From 750b5c29b698667e7b06970068c4e15594fdd18a Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Thu, 3 Sep 2020 11:52:17 +0300 Subject: [PATCH 4/4] remove typography support --- packages/block-library/src/quote/block.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/block-library/src/quote/block.json b/packages/block-library/src/quote/block.json index 899f748a65b42d..45589d6ad7c70f 100644 --- a/packages/block-library/src/quote/block.json +++ b/packages/block-library/src/quote/block.json @@ -24,8 +24,6 @@ "__experimentalColor": { "gradients": true, "linkColor": true - }, - "__experimentalLineHeight": true, - "__experimentalFontSize": true + } } }