From a2eb262781dcb24ed955b8cb6f3282fac67a9da4 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 5 Aug 2021 23:03:21 -0500 Subject: [PATCH 1/4] Set the httpMethod to POST again For some reason I removed this, maybe experimenting, but I accidentally committed it. --- js/src/block-editor/components/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/block-editor/components/edit.js b/js/src/block-editor/components/edit.js index 5f9fdc9f..919ddecb 100644 --- a/js/src/block-editor/components/edit.js +++ b/js/src/block-editor/components/edit.js @@ -106,7 +106,7 @@ const Edit = ( { blockProps, block } ) => { block={ `genesis-custom-blocks/${ block.name }` } attributes={ attributes } className="genesis-custom-blocks-editor__ssr" - urlQueryArgs={ { innerContent: 'Here is something' } } + httpMethod="POST" /> ) } From 6e3326fdb504370df3b56558dfc5c13091b38722 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Thu, 5 Aug 2021 23:19:00 -0500 Subject: [PATCH 2/4] Revert "Update e2e tests for WP 5.8" This reverts commit 97a42be6a43c3d471626518a9799de3ae64b2465. --- package-lock.json | 74 +++++++++++++++++------------------ package.json | 4 +- tests/e2e/specs/all-fields.js | 2 +- tests/e2e/specs/no-field.js | 2 +- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51d63745..815fc64f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2700,9 +2700,9 @@ } }, "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", + "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", "dev": true, "requires": { "defer-to-connect": "^2.0.0" @@ -2946,9 +2946,9 @@ } }, "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", + "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", "dev": true, "requires": { "@types/http-cache-semantics": "*", @@ -2992,9 +2992,9 @@ } }, "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", + "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==", "dev": true }, "@types/istanbul-lib-coverage": { @@ -3044,9 +3044,9 @@ "dev": true }, "@types/keyv": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.2.tgz", - "integrity": "sha512-/FvAK2p4jQOaJ6CGDHJTqZcUtbZe820qIeTg7o0Shg7drB4JHeL+V/dhSaly7NXx6u8eSee+r7coT+yuJEvDLg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", + "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", "dev": true, "requires": { "@types/node": "*" @@ -5323,9 +5323,9 @@ } }, "@wordpress/env": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-4.1.0.tgz", - "integrity": "sha512-wp3WP/KuUmdHRwWMRHd6m+3uWqCSRqHvJ56K3B4SjFMS4OZEBTPTcvG4rvw0ECH8x3pVXiua1QJm0acLfiIN4w==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-4.0.4.tgz", + "integrity": "sha512-PmxtLrJfAOngEYWHDVbeT2wby6EiPjsCFP70CkmV4AgyjN/boM5fAH27ty4DIaW8t4CiNRCMmapLvLy6db9YGw==", "dev": true, "requires": { "chalk": "^4.0.0", @@ -5352,9 +5352,9 @@ } }, "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -6848,6 +6848,12 @@ "icss-utils": "^5.0.0" } }, + "prettier": { + "version": "npm:wp-prettier@2.2.1-beta-1", + "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", + "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", + "dev": true + }, "sass-loader": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.2.0.tgz", @@ -9431,9 +9437,9 @@ } }, "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz", + "integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==", "dev": true, "requires": { "clone-response": "^1.0.2", @@ -9441,7 +9447,7 @@ "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", + "normalize-url": "^4.1.0", "responselike": "^2.0.0" }, "dependencies": { @@ -15101,9 +15107,9 @@ } }, "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -19954,9 +19960,9 @@ "dev": true }, "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", "dev": true }, "normalize-wheel": { @@ -21897,12 +21903,6 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "prettier": { - "version": "npm:wp-prettier@2.2.1-beta-1", - "resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-2.2.1-beta-1.tgz", - "integrity": "sha512-+JHkqs9LC/JPp51yy1hzs3lQ7qeuWCwOcSzpQNeeY/G7oSpnF61vxt7hRh87zNRTr6ob2ndy0W8rVzhgrcA+Gw==", - "dev": true - }, "prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", @@ -24142,9 +24142,9 @@ "dev": true }, "simple-git": { - "version": "2.42.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.42.0.tgz", - "integrity": "sha512-illpUX0bcrdB3AyvBGLz0ToRVP7lXNJOGVybGVuVk7PpivPNK5YKJx2aagKdKbveaMtt0DCLK4/jfjDb6b2M2g==", + "version": "2.39.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.39.0.tgz", + "integrity": "sha512-VOsrmc3fpp1lGVIpo+1SKNqJzrdVJeSGZCeenPKnJPNo5UouAlSkWFc037pfm9wRYtfxBdwp2deVJGCG8J6C8A==", "dev": true, "requires": { "@kwsites/file-exists": "^1.1.1", diff --git a/package.json b/package.json index 751b3c7a..93ff0508 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,12 @@ "@wordpress/dependency-extraction-webpack-plugin": "3.1.3", "@wordpress/dom": "3.0.0", "@wordpress/dom-ready": "3.0.0", - "@wordpress/e2e-test-utils": "5.4.1", + "@wordpress/e2e-test-utils": "5.1.4", "@wordpress/e2e-tests": "2.1.6", "@wordpress/edit-post": "4.0.0", "@wordpress/editor": "10.0.0", "@wordpress/element": "3.0.0", - "@wordpress/env": "4.1.0", + "@wordpress/env": "4.0.4", "@wordpress/eslint-plugin": "9.0.5", "@wordpress/hooks": "3.0.0", "@wordpress/html-entities": "3.0.0", diff --git a/tests/e2e/specs/all-fields.js b/tests/e2e/specs/all-fields.js index 72534e5c..2e73f9cf 100644 --- a/tests/e2e/specs/all-fields.js +++ b/tests/e2e/specs/all-fields.js @@ -154,7 +154,7 @@ describe( 'AllFields', () => { await ( await findByLabelText( $editBlockDocument, /choices/i ) ).type( fields.radio.choices ); await ( await findByText( $editBlockDocument, /publish/i ) ).click(); - await findByText( $editBlockDocument, /update/i ); + await findAllByText( $editBlockDocument, /published/i ); // Ensure there's no console error in the 'Editor Preview' display. await ( await findByText( $editBlockDocument, 'Editor Preview' ) ).click(); diff --git a/tests/e2e/specs/no-field.js b/tests/e2e/specs/no-field.js index 582b55e6..d5c69b82 100644 --- a/tests/e2e/specs/no-field.js +++ b/tests/e2e/specs/no-field.js @@ -23,7 +23,7 @@ describe( 'NoField', () => { const $editBlockDocument = await getDocument( page ); await ( await findByLabelText( $editBlockDocument, /category/i ) ).select( 'media' ); ( await findByText( $editBlockDocument, /publish/i ) ).click(); - await findByText( $editBlockDocument, /update/i ); + await findAllByText( $editBlockDocument, /published/i ); // Create a new post and add the new block. await createNewPost(); From e8e7bb3a8d3510dcbb32275377d59f3e7b3647f6 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 25 Aug 2021 13:54:05 -0500 Subject: [PATCH 3/4] Fix the check for the update notice --- tests/e2e/specs/all-fields.js | 2 +- tests/e2e/specs/no-field.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/all-fields.js b/tests/e2e/specs/all-fields.js index 70cdc970..1a7880c1 100644 --- a/tests/e2e/specs/all-fields.js +++ b/tests/e2e/specs/all-fields.js @@ -154,7 +154,7 @@ describe( 'AllFields', () => { await ( await findByLabelText( $editBlockDocument, /choices/i ) ).type( fields.radio.choices ); await ( await findByText( $editBlockDocument, /publish/i ) ).click(); - await findAllByText( $editBlockDocument, /published/i ); + await findByText( $editBlockDocument, /update/i ); // Ensure there's no console error in the 'Editor Preview' display. await ( await findByText( $editBlockDocument, 'Editor Preview' ) ).click(); diff --git a/tests/e2e/specs/no-field.js b/tests/e2e/specs/no-field.js index c45e2086..94d442ff 100644 --- a/tests/e2e/specs/no-field.js +++ b/tests/e2e/specs/no-field.js @@ -23,7 +23,7 @@ describe( 'NoField', () => { const $editBlockDocument = await getDocument( page ); await ( await findByLabelText( $editBlockDocument, /category/i ) ).select( 'media' ); ( await findByText( $editBlockDocument, /publish/i ) ).click(); - await findAllByText( $editBlockDocument, /published/i ); + await findByText( $editBlockDocument, /update/i ); // Create a new post and add the new block. await createNewPost(); From 318911367705ec20f67e594f364e944cd986b931 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Wed, 25 Aug 2021 14:00:37 -0500 Subject: [PATCH 4/4] Bump the version to 1.3.1 and add a CHANGELOG entry This is a simple release, with a bugfix and e2e test improvements. --- CHANGELOG.md | 7 +++++ README.md | 2 +- genesis-custom-blocks.php | 2 +- package-lock.json | 60 ++++----------------------------------- package.json | 2 +- 5 files changed, 16 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b93601..52fbb607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## Changelog ## +### 1.3.1 - 2021-08-26 ### + +Fix for fields with long strings + +* Fix a regression that caused editor errors for fields with long strings. [PR 89](https://github.com/studiopress/genesis-custom-blocks/pull/89) +* Update e2e tests for WP 5.8. [PR 87](https://github.com/studiopress/genesis-custom-blocks/pull/87) + ### 1.3.0 - 2021-07-20 ### InnerBlocks, File field, WP 5.8 compatibility diff --git a/README.md b/README.md index ad9c01fa..8e2a52e0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Tags: gutenberg, blocks, block editor, fields, template Requires at least: 5.4 Tested up to: 5.8 Requires PHP: 5.6 -Stable tag: 1.3.0 +Stable tag: 1.3.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl diff --git a/genesis-custom-blocks.php b/genesis-custom-blocks.php index 714d5790..b4e7dcef 100644 --- a/genesis-custom-blocks.php +++ b/genesis-custom-blocks.php @@ -8,7 +8,7 @@ * * Plugin Name: Genesis Custom Blocks * Description: The easy way to build custom blocks for Gutenberg. - * Version: 1.3.0 + * Version: 1.3.1 * Author: Genesis Custom Blocks * Author URI: https://studiopress.com * License: GPL2 diff --git a/package-lock.json b/package-lock.json index 6c3057a6..c86194af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "genesis-custom-blocks", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5055,64 +5055,16 @@ } }, "@wordpress/e2e-test-utils": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-5.4.1.tgz", - "integrity": "sha512-FixAC2Kyspv/FCSC9NPDpZzbohioO42n0fG6pq9Vj2DW8kIc2NobapGW/7Uke2V4KlqMvWrD9uaiX6Gp/eaGRg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils/-/e2e-test-utils-5.1.4.tgz", + "integrity": "sha512-2ex6XvMtCLZymzOhmtDDO+zMVal+04yyl/+jKPeP35t5RpFqxeYHdRjvcTXA3L3Rx2Rib/z5U7IHvZHMlcAUzA==", "dev": true, "requires": { "@babel/runtime": "^7.13.10", - "@wordpress/keycodes": "^3.2.1", - "@wordpress/url": "^3.2.1", + "@wordpress/keycodes": "^3.0.0", + "@wordpress/url": "^3.0.0", "lodash": "^4.17.21", "node-fetch": "^2.6.0" - }, - "dependencies": { - "@wordpress/hooks": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.2.0.tgz", - "integrity": "sha512-nVR6V9kPxl8+aYQzQJdoDt+aKBKHHD0zplcYZbu2MHxjmHMvppAeL9mjzVhQZj/3n10NR2Ftk94mHQzHWfhCCg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.13.10" - } - }, - "@wordpress/i18n": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.2.1.tgz", - "integrity": "sha512-56TW1rGRTgBZd2wZiMVxTuSi+1z5INpbQrLFjPwqhQJNiasDAUuUFzu4dRojkyBexJbB+1McYA1gv9xZlsJ8lg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.13.10", - "@wordpress/hooks": "^3.2.0", - "gettext-parser": "^1.3.1", - "lodash": "^4.17.21", - "memize": "^1.1.0", - "sprintf-js": "^1.1.1", - "tannin": "^1.2.0" - } - }, - "@wordpress/keycodes": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.2.1.tgz", - "integrity": "sha512-mjJu6a7bmWR4y2mrWUMIfJIkqF50u09y8seP9o1YDdecrJBon8VAOjVmfh+N4W6L/bVLHfTq4/6IZQaVKCy3xw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.13.10", - "@wordpress/i18n": "^4.2.1", - "lodash": "^4.17.21" - } - }, - "@wordpress/url": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.2.1.tgz", - "integrity": "sha512-+AJt74qWz+iXkT05sBUBjx5EF3niFkvr1CqaIbWCew9/j47de6r0AHjaFhaiCCsq5fg1eqRe74sZKHrMmIWKQQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.13.10", - "lodash": "^4.17.21", - "react-native-url-polyfill": "^1.1.2" - } - } } }, "@wordpress/e2e-tests": { diff --git a/package.json b/package.json index c709ebdb..7c05ab21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "genesis-custom-blocks", "title": "Genesis Custom Blocks", - "version": "1.3.0", + "version": "1.3.1", "description": "WordPress plugin with a simple templating system for building custom blocks.", "author": "Genesis Custom Blocks", "license": "GPL-2.0-or-later",