From 1d4c945adad2e16231c3ee76b49d57de49d1748b Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 23 May 2022 13:07:32 +0100 Subject: [PATCH 1/2] Form Block: Makese the button an element button --- packages/block-library/src/file/edit.js | 6 +++++- packages/block-library/src/file/save.js | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/file/edit.js b/packages/block-library/src/file/edit.js index 48fb352f9ba180..2476e141600b1e 100644 --- a/packages/block-library/src/file/edit.js +++ b/packages/block-library/src/file/edit.js @@ -22,6 +22,7 @@ import { RichText, useBlockProps, store as blockEditorStore, + __experimentalElementButtonClassName, } from '@wordpress/block-editor'; import { useEffect } from '@wordpress/element'; import { useCopyToClipboard } from '@wordpress/compose'; @@ -301,7 +302,10 @@ function FileEdit( { From 53d2f7fcdd851d0f2d4d93529041239875c96853 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 23 May 2022 18:56:32 +0100 Subject: [PATCH 2/2] update fixtures --- test/integration/fixtures/blocks/core__file__new-window.html | 2 +- .../fixtures/blocks/core__file__new-window.parsed.json | 4 ++-- .../fixtures/blocks/core__file__new-window.serialized.html | 2 +- .../core__file__new-window__deprecated-1.serialized.html | 2 +- .../integration/fixtures/blocks/core__file__no-text-link.html | 2 +- .../fixtures/blocks/core__file__no-text-link.parsed.json | 4 ++-- .../fixtures/blocks/core__file__no-text-link.serialized.html | 2 +- .../core__file__no-text-link__deprecated-1.serialized.html | 2 +- test/integration/fixtures/blocks/core__file__pdf-preview.html | 2 +- .../fixtures/blocks/core__file__pdf-preview.parsed.json | 4 ++-- .../fixtures/blocks/core__file__pdf-preview.serialized.html | 2 +- .../core__file__pdf-preview__deprecated-1.serialized.html | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/integration/fixtures/blocks/core__file__new-window.html b/test/integration/fixtures/blocks/core__file__new-window.html index 76337c5531dc4c..6e1f4e2a22b4fd 100644 --- a/test/integration/fixtures/blocks/core__file__new-window.html +++ b/test/integration/fixtures/blocks/core__file__new-window.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__new-window.parsed.json b/test/integration/fixtures/blocks/core__file__new-window.parsed.json index f96b58eeb33631..f7c77a22292f41 100644 --- a/test/integration/fixtures/blocks/core__file__new-window.parsed.json +++ b/test/integration/fixtures/blocks/core__file__new-window.parsed.json @@ -6,9 +6,9 @@ "showDownloadButton": true }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] } ] diff --git a/test/integration/fixtures/blocks/core__file__new-window.serialized.html b/test/integration/fixtures/blocks/core__file__new-window.serialized.html index 59200f48dce6ad..1aa95245062e39 100644 --- a/test/integration/fixtures/blocks/core__file__new-window.serialized.html +++ b/test/integration/fixtures/blocks/core__file__new-window.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__new-window__deprecated-1.serialized.html b/test/integration/fixtures/blocks/core__file__new-window__deprecated-1.serialized.html index 32e45ba306d0bc..0cddc60068cb43 100644 --- a/test/integration/fixtures/blocks/core__file__new-window__deprecated-1.serialized.html +++ b/test/integration/fixtures/blocks/core__file__new-window__deprecated-1.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__no-text-link.html b/test/integration/fixtures/blocks/core__file__no-text-link.html index 22bae9ce86a8ab..f2ab2527561435 100644 --- a/test/integration/fixtures/blocks/core__file__no-text-link.html +++ b/test/integration/fixtures/blocks/core__file__no-text-link.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__no-text-link.parsed.json b/test/integration/fixtures/blocks/core__file__no-text-link.parsed.json index bbb6cfed0234a9..600f1b93fc29a6 100644 --- a/test/integration/fixtures/blocks/core__file__no-text-link.parsed.json +++ b/test/integration/fixtures/blocks/core__file__no-text-link.parsed.json @@ -6,9 +6,9 @@ "showDownloadButton": true }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] } ] diff --git a/test/integration/fixtures/blocks/core__file__no-text-link.serialized.html b/test/integration/fixtures/blocks/core__file__no-text-link.serialized.html index b872fd5de21b00..dda853803bd852 100644 --- a/test/integration/fixtures/blocks/core__file__no-text-link.serialized.html +++ b/test/integration/fixtures/blocks/core__file__no-text-link.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__no-text-link__deprecated-1.serialized.html b/test/integration/fixtures/blocks/core__file__no-text-link__deprecated-1.serialized.html index b872fd5de21b00..dda853803bd852 100644 --- a/test/integration/fixtures/blocks/core__file__no-text-link__deprecated-1.serialized.html +++ b/test/integration/fixtures/blocks/core__file__no-text-link__deprecated-1.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__pdf-preview.html b/test/integration/fixtures/blocks/core__file__pdf-preview.html index 9b973746c4b716..464535b2243458 100644 --- a/test/integration/fixtures/blocks/core__file__pdf-preview.html +++ b/test/integration/fixtures/blocks/core__file__pdf-preview.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__pdf-preview.parsed.json b/test/integration/fixtures/blocks/core__file__pdf-preview.parsed.json index 9a0169cc41992c..1a50277aacbfb7 100644 --- a/test/integration/fixtures/blocks/core__file__pdf-preview.parsed.json +++ b/test/integration/fixtures/blocks/core__file__pdf-preview.parsed.json @@ -7,9 +7,9 @@ "previewHeight": 370 }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] } ] diff --git a/test/integration/fixtures/blocks/core__file__pdf-preview.serialized.html b/test/integration/fixtures/blocks/core__file__pdf-preview.serialized.html index 9b973746c4b716..464535b2243458 100644 --- a/test/integration/fixtures/blocks/core__file__pdf-preview.serialized.html +++ b/test/integration/fixtures/blocks/core__file__pdf-preview.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/test/integration/fixtures/blocks/core__file__pdf-preview__deprecated-1.serialized.html b/test/integration/fixtures/blocks/core__file__pdf-preview__deprecated-1.serialized.html index 730b548ce40f4f..60a5d044d1957d 100644 --- a/test/integration/fixtures/blocks/core__file__pdf-preview__deprecated-1.serialized.html +++ b/test/integration/fixtures/blocks/core__file__pdf-preview__deprecated-1.serialized.html @@ -1,3 +1,3 @@ - +