diff --git a/packages/block-library/src/media-text/deprecated.js b/packages/block-library/src/media-text/deprecated.js index 45f3636906a5e..b81e1632188d3 100644 --- a/packages/block-library/src/media-text/deprecated.js +++ b/packages/block-library/src/media-text/deprecated.js @@ -77,7 +77,24 @@ export default [ // Version with CSS grid { attributes: { - ...baseAttributes, + align: { + type: 'string', + default: 'wide', + }, + mediaAlt: { + type: 'string', + source: 'attribute', + selector: 'figure img', + attribute: 'alt', + default: '', + }, + mediaPosition: { + type: 'string', + default: 'left', + }, + mediaId: { + type: 'number', + }, mediaUrl: { type: 'string', source: 'attribute', @@ -114,6 +131,20 @@ export default [ selector: 'figure a', attribute: 'class', }, + mediaType: { + type: 'string', + }, + mediaWidth: { + type: 'number', + default: 50, + }, + mediaSizeSlug: { + type: 'string', + }, + isStackedOnMobile: { + type: 'boolean', + default: true, + }, verticalAlignment: { type: 'string', }, @@ -124,6 +155,15 @@ export default [ type: 'object', }, }, + supports: { + anchor: true, + align: [ 'wide', 'full' ], + html: false, + color: { + gradients: true, + link: true, + }, + }, save( { attributes } ) { const { isStackedOnMobile, diff --git a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.html b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.html deleted file mode 100644 index e1cf266649efa..0000000000000 --- a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.html +++ /dev/null @@ -1,12 +0,0 @@ - -
-
- -

My video

- -
-
- -
-
- \ No newline at end of file diff --git a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.html b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.html new file mode 100644 index 0000000000000..075af9162b98f --- /dev/null +++ b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.html @@ -0,0 +1,12 @@ + +
+
+ +
+
+ +

My video

+ +
+
+ diff --git a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.json b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.json similarity index 97% rename from test/integration/fixtures/blocks/core__media-text__media-right-custom-width.json rename to test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.json index 624fc18c18394..280b695c5e5a2 100644 --- a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.json +++ b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.json @@ -9,8 +9,7 @@ "mediaUrl": "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=", "mediaType": "video", "mediaWidth": 41, - "isStackedOnMobile": true, - "className": "alignfull" + "isStackedOnMobile": true }, "innerBlocks": [ { diff --git a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.parsed.json b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.parsed.json similarity index 69% rename from test/integration/fixtures/blocks/core__media-text__media-right-custom-width.parsed.json rename to test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.parsed.json index 07c20c0103273..15121433aecdd 100644 --- a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.parsed.json +++ b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.parsed.json @@ -5,8 +5,7 @@ "align": "full", "mediaPosition": "right", "mediaType": "video", - "mediaWidth": 41, - "className": "alignfull" + "mediaWidth": 41 }, "innerBlocks": [ { @@ -23,11 +22,11 @@ ] } ], - "innerHTML": "\n
\n\t
\n\t\t\n
\n
\n\t\n
\n
\n", + "innerHTML": "\n
\n\t
\n\t\t\n\t
\n\t
\n\t\t\n\t
\n
\n", "innerContent": [ - "\n
\n\t
\n\t\t", + "\n
\n\t
\n\t\t\n\t
\n\t
\n\t\t", null, - "\n
\n
\n\t\n
\n
\n" + "\n\t
\n
\n" ] } ] diff --git a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.serialized.html b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.serialized.html similarity index 97% rename from test/integration/fixtures/blocks/core__media-text__media-right-custom-width.serialized.html rename to test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.serialized.html index bf22e0e1a492a..bfeaedaadf047 100644 --- a/test/integration/fixtures/blocks/core__media-text__media-right-custom-width.serialized.html +++ b/test/integration/fixtures/blocks/core__media-text__media-right-custom-width__deprecated.serialized.html @@ -1,4 +1,4 @@ - +

My video