From 20d281d27db48a39fc8cf0054816f9eceeedb771 Mon Sep 17 00:00:00 2001 From: Max Garceau Date: Wed, 18 Dec 2024 17:22:09 -0500 Subject: [PATCH 1/5] Add transform for shortcodes to block --- includes/blocks/mailchimp/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/blocks/mailchimp/index.js b/includes/blocks/mailchimp/index.js index 98b1f18..01eb104 100644 --- a/includes/blocks/mailchimp/index.js +++ b/includes/blocks/mailchimp/index.js @@ -6,6 +6,14 @@ import Icon from './icon'; registerBlockType(metadata, { icon: Icon, + transforms: { + from: [ + { + type: 'shortcode', + tag: 'mailchimpsf_form', + }, + ], + }, edit: BlockEdit, save: () => null, }); From 1bedf6d4e294bac40c245918125109c05840f2bd Mon Sep 17 00:00:00 2001 From: Max Garceau Date: Thu, 19 Dec 2024 10:07:15 -0500 Subject: [PATCH 2/5] Fix JS error by adding attributes property --- includes/blocks/mailchimp/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/blocks/mailchimp/index.js b/includes/blocks/mailchimp/index.js index 01eb104..3538f28 100644 --- a/includes/blocks/mailchimp/index.js +++ b/includes/blocks/mailchimp/index.js @@ -11,6 +11,9 @@ registerBlockType(metadata, { { type: 'shortcode', tag: 'mailchimpsf_form', + attributes: { + // No attributes, but attributes property is required + }, }, ], }, From 9689fc92399377b1d02866a2adde0d541b3a555e Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 19 Dec 2024 10:53:23 -0700 Subject: [PATCH 3/5] Try fixing our E2E tests by installing SVN --- .github/workflows/build-release-zip.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index ffdb3b6..d389693 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -39,6 +39,11 @@ jobs: run: | npm run build + - name: Install SVN + run: | + sudo apt-get update + sudo apt-get install subversion + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable env: From baafa893ea37426add8dd2fc35ce7f860c0aaa1f Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 19 Dec 2024 10:54:35 -0700 Subject: [PATCH 4/5] Update branch name for testing --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 65c8ffa..9e1bff8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,7 +11,7 @@ on: jobs: build: - uses: mailchimp/wordpress/.github/workflows/build-release-zip.yml@develop + uses: mailchimp/wordpress/.github/workflows/build-release-zip.yml@enhancement/shortcode-conversion-to-block cypress: needs: build From 7828cc0ea5654dc376f6d0ef9a441c27af8c1421 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 19 Dec 2024 11:00:52 -0700 Subject: [PATCH 5/5] Switch branch back now that we've tested things --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9e1bff8..65c8ffa 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,7 +11,7 @@ on: jobs: build: - uses: mailchimp/wordpress/.github/workflows/build-release-zip.yml@enhancement/shortcode-conversion-to-block + uses: mailchimp/wordpress/.github/workflows/build-release-zip.yml@develop cypress: needs: build