From b11d587b12389a473cba961cf0a84e4e864c490e Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 12 Sep 2022 14:19:42 +0200 Subject: [PATCH 02/10] add changelog - 8.5.0 version --- plugins/woocommerce-blocks/readme.txt | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index b900e7e9c6a..a22847f9dd6 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -86,6 +86,34 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 8.5.0 - 2022-09-12 = + +#### Enhancements + +- Improve the alignment of the Remove button in the Filter by Attribute block. ([7088](https://github.com/woocommerce/woocommerce-blocks/pull/7088)) +- Enhance the display of the Active filters block changing the sizes of the text. ([7087](https://github.com/woocommerce/woocommerce-blocks/pull/7087)) +- Add loading placeholders to Active Filters block. ([7083](https://github.com/woocommerce/woocommerce-blocks/pull/7083)) +- Improved many of the labels to be less technical and more user-friendly. ([7045](https://github.com/woocommerce/woocommerce-blocks/pull/7045)) +- Featured Item Blocks: Remove inline default color so that custom colors from Global Styles are applied correctly. ([7036](https://github.com/woocommerce/woocommerce-blocks/pull/7036)) +- Update "remove filter" icon on the Active Filters block to use Icon component in both layouts. ([7035](https://github.com/woocommerce/woocommerce-blocks/pull/7035)) +- Update `filter by price` skeleton design. ([6997](https://github.com/woocommerce/woocommerce-blocks/pull/6997)) +- Update `filter by attribute` skeleton design. ([6990](https://github.com/woocommerce/woocommerce-blocks/pull/6990)) + +#### Bug Fixes + +- Fix checkbox label when count is zero. ([7073](https://github.com/woocommerce/woocommerce-blocks/pull/7073)) +- Fix incompatible Classic Template block notice in the Editor for Woo specific templates. ([7033](https://github.com/woocommerce/woocommerce-blocks/pull/7033)) +- Update - remove __experimentalDuotone from Featured Product and Featured Category blocks. ([7000](https://github.com/woocommerce/woocommerce-blocks/pull/7000)) + +#### Documentation + +- Add steps to retrieve products variations in Store API documentation. ([7076](https://github.com/woocommerce/woocommerce-blocks/pull/7076)) + +#### Dependencies + +- Bump commander from 9.3.0 to 9.4.0. ([6831](https://github.com/woocommerce/woocommerce-blocks/pull/6831)) +- Bump automattic/jetpack-autoloader from 2.11.6 to 2.11.7. ([6810](https://github.com/woocommerce/woocommerce-blocks/pull/6810)) + = 8.4.0 - 2022-08-29 = #### Enhancements From a1899fdf53ea588cf790cfa3e75cab4b8ba2790e Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 12 Sep 2022 14:50:29 +0200 Subject: [PATCH 03/10] Add testing instructions --- .../testing/releases/850.md | 162 ++++++++++++++++++ .../testing/releases/README.md | 1 + 2 files changed, 163 insertions(+) create mode 100644 plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md new file mode 100644 index 00000000000..88ab5d8c43b --- /dev/null +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md @@ -0,0 +1,162 @@ +# Testing notes and ZIP for release 8.5.0 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9548153/woocommerce-gutenberg-products-block.zip) + +## Feature plugin and package inclusion in WooCommerce + +### Improve the alignment of the Remove button in the Filter by Attribute block. ([7088](https://github.com/woocommerce/woocommerce-blocks/pull/7088)) + +1. Create a page with the filter blocks and the All Products block. Make sure to add two Filter by Attribute blocks with display style set to dropdown. One allowing single selection and the other one allowing multiple selection. +2. Add some attribute filters. +3. Verify the remove icons are properly aligned. +4. Try with different themes (e.g. Storefront and Twenty Twenty Two). + +| Before | After | +| ------ | ----- | +| | | + +### Enhance the display of the Active filters block changing the sizes of the text. ([7087](https://github.com/woocommerce/woocommerce-blocks/pull/7087)) + +1. Create a page with the filter blocks and the All Products block. +2. In the frontend add some filters. +3. Verify the active filters texts have a size which doesn't seem broken compared to other filter blocks. +4. Try changing the display style to chips and verify the same. +5. Try with different themes (e.g. Storefront and Twenty Twenty Two). + +#### List + +| Before | After | +| ------ | ----- | +| | | + +#### Chips + +| Before | After | +| ------ | ----- | +| | | + +### Add loading placeholders to Active Filters block. ([7083](https://github.com/woocommerce/woocommerce-blocks/pull/7083)) + +1. Enable TT2 theme. Create a new page with an `All Products` block and a `Active Filters` block with other filter blocks. Save the page. +2. Open the page in the frontend and check that the `Active Filters` block shows like the screenshot above while loading. +3. Try different combinations of settings (show the `Apply` button, Chips vs List etc) and make sure the loading state makes sense and there are no regressions. +4. Repeat steps 1-3 with the Storefront theme. + +### Featured Item Blocks: Remove inline default color so that custom colors from Global Styles are applied correctly. ([7036](https://github.com/woocommerce/woocommerce-blocks/pull/7036)) + +1. Ensure you have a block theme active (i.e., Twenty Twenty-Two). +2. Go to Appearance > Editor (Beta). +3. Click on the Global Styles panel and select the Blocks section. +4. Scroll down to the Featured Product or Featured Category block and edit the text and the background Global Styles. +5. Confirm that both the text and background colors reflect the changes from the sidebar controls. + +| Before | After | +| ------ | ----- | +| ![CleanShot 2022-09-01 at 14 31 05](https://user-images.githubusercontent.com/481776/187987970-e86aebfd-f7ae-4eda-a6fb-622ef53f5899.png) | ![CleanShot 2022-09-01 at 14 35 45](https://user-images.githubusercontent.com/481776/187988035-f413cc44-3f39-48bb-bf68-597bb5d81394.png) | + +### Update "remove filter" icon on the Active Filters block to use Icon component in both layouts. ([7035](https://github.com/woocommerce/woocommerce-blocks/pull/7035)) + +1. Add the Active Filters block, in List view alongside some other Filters blocks. +3. Apply some filters to the page. +4. Confirm the remove button matches the After screenshot above. Also confirm that the remove button is visually consistent with the remove button in Chips view. +5. Confirm the remove buttons for each active filter have a hover state of an alternate shade of grey - also confirm they function as expected. +6. Confirm no JS or PHP errors. + +| Before | After | +| ------ | ----- | +| ![CleanShot 2022-08-31 at 16 48 11](https://user-images.githubusercontent.com/481776/187812070-f2d2e861-8611-4fa9-9125-21e574635043.png) | ![CleanShot 2022-08-31 at 16 38 34](https://user-images.githubusercontent.com/481776/187812115-ac898c70-1b26-4f3f-ada3-fca71e170cf2.png) | + +### Update `filter by price` skeleton design. ([6997](https://github.com/woocommerce/woocommerce-blocks/pull/6997)) + +1. Enable TT2 theme. Create a new page with an `All Products` block and a `Filter by price` block. Save the page. +2. Open the page in the frontend and check that the `Filter by price` block shows like the screenshot while loading. +3. Try different combinations of settings (show the `Apply` button, make the inputs inline, and make the range price not editable, etc) and make sure the loading state makes sense and there are no regressions. +4. Repeat steps 1-3 with the Storefront theme. + +| Block | Loading | +| ------ | ----- | +| Screenshot 2022-08-29 at 15 00 51| Screenshot 2022-08-29 at 15 00 55| +| Screenshot 2022-08-29 at 15 01 15| Screenshot 2022-08-29 at 15 01 28| + +### Update `filter by attribute` skeleton design. ([6990](https://github.com/woocommerce/woocommerce-blocks/pull/6990)) + +1. Enable TT2 theme. Create a new page with an `All Products` block and a `Filter by attribute` block. Save the page. +2. Open the page in the frontend and check that the `Filter by attribute` block shows like the screenshot while loading. +3. Try different combinations of the block settings (dropdown, show apply button, etc) and make sure the loading state makes sense and there are no regressions. +4. Repeat steps 1-3 with the Storefront theme. + +| Block | Loading | +| ------ | ----- | +| Screenshot 2022-08-29 at 15 18 17| Screenshot 2022-09-02 at 15 50 16| + +### Fix checkbox label when count is zero. ([7073](https://github.com/woocommerce/woocommerce-blocks/pull/7073)) + +1. Make sure you don't have any product with `On backorder` status. +2. Create a page with an `All products` block and a `Filter by stock` block. +3. Save it, go to the page and append this param to the URL `?filter_stock_status=onbackorder`. +4. Check that the on backorder label shows `On backorder (0)`. + +| Before | After | +| ------ | ----- | +| Screenshot 2022-09-06 at 14 45 21 | Screenshot 2022-09-06 at 14 45 04 | + +### Fix incompatible Classic Template block notice in the Editor for Woo specific templates. ([7033](https://github.com/woocommerce/woocommerce-blocks/pull/7033)) + +1. Activate Gutenberg plugin. +2. Go to Appearance > Editor > Add New to add a new template. +3. Click "Single Item: Product" template and create a product specific template +4. The block should render the placeholder for the Single Product. +5. Make changes to this template, and save them. Make sure these are represented on the frontend. Then clear the customizations and do the same. +6. Complete steps 3-5 again but instead create Product Category and Product Tag templates. + +### Update - remove __experimentalDuotone from Featured Product and Featured Category blocks. ([7000](https://github.com/woocommerce/woocommerce-blocks/pull/7000)) + +1. Install a block theme (e.g., Twenty Twenty Two). +2. Open Appearance > Editor (beta). +3. Add a Featured Product and a Featured Category block. +4. Customize the global styles for those blocks (click on the Styles button on the top toolbar and then the Blocks section towards the bottom - _see screenshots below_). +5. Add some style adjustments and confirm they are reflected in the editor. +6. Save your changes and view a page driven by the modified Template on the front-end. +7. Confirm the adjusted styles are rendered to the front-end, as expected. + +| Global Styles Panel | Blocks Settings | +| ------ | ----- | +| ![CleanShot 2022-08-26 at 22 05 58](https://user-images.githubusercontent.com/481776/187010061-8c68fcb6-14f5-4509-99ce-2ad3bff43369.png) | ![CleanShot 2022-08-26 at 22 03 00](https://user-images.githubusercontent.com/481776/187009972-4c0bc853-4202-457e-8331-0f5b15d9f5e6.png) | + +_**Note:** the text color settings for this block are driven by inline styles that are added based on the Overlay and Color setting defaults. I imagine we want to keep those defaults in place so. To adjust this in the Editor, edit/remove those default settings on the block directly._ + + +### Add Apply button placeholders to filters and adjust title margins. ([7077](https://github.com/woocommerce/woocommerce-blocks/pull/7077)) + +1. Create a page with the filter blocks and the `All Products` block. Make sure to enable the `Show Apply filter button` setting on all of them. +2. Save and open the page on the front-end and make sure the placeholders show the apply button while loading and they look like the screenshot. + +| Before | After | +| ------ | ----- | +| Screenshot 2022-09-09 at 11 00 23 | Screenshot 2022-09-09 at 11 00 03 | + +### Fix pills in the Filter by Attribute block dropdown overlapping with the chevron. ([7039](https://github.com/woocommerce/woocommerce-blocks/pull/7039)) + +1. Add the `Filter by Attribute` block and the `All Products` block to a page. +2. Set the `Filter by Attribute` block display to dropdown and allow selecting multiple options. +3. Play around with the window size and the options you select, and make sure the pills inside the input don't overlap the chevron. + +| Before | After | +| ------ | ----- | +| Screenshot 2022-09-01 at 12 16 45| Screenshot 2022-09-01 at 12 17 05| + +### Fix stock filter placeholder. ([7009](https://github.com/woocommerce/woocommerce-blocks/pull/7009)) + +1. Create a new page with a 30/70 columns block, insert the `Filter by stock` block in the 30% column and the `All Products` block in the 70% columns. Save the page. +2. Open the page in the frontend and check that the `Filter by stock` block shows like the screenshot above while loading. +3. Remove all products in the store and refresh the page you created in step 1. Check that `Filter by stock` placeholder disappears if there are no products. + +| Before | After | +| ------ | ----- | +| Screenshot 2022-08-30 at 14 40 43 |Screenshot 2022-08-30 at 14 40 24| +| ![Screenshot 2022-08-30 at 12 06 52](https://user-images.githubusercontent.com/186112/187438707-ecafa77d-3915-4b78-8814-9f292d2e935f.png)| Screenshot 2022-08-30 at 14 38 54| + + + + + diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md index 67a6666229e..436dec217ae 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md @@ -88,6 +88,7 @@ Every release includes specific testing instructions for new features and bug fi - [8.3.0](./830.md) - [8.3.1](./831.md) - [8.4.0](./840.md) +- [8.5.0](./850.md) From 763d921d8376cbced2d20741e625f2bc64318034 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 12 Sep 2022 16:26:39 +0200 Subject: [PATCH 04/10] add missing screenshot --- .../docs/internal-developers/testing/releases/850.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md index 88ab5d8c43b..543d0617185 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md @@ -38,10 +38,15 @@ Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github. ### Add loading placeholders to Active Filters block. ([7083](https://github.com/woocommerce/woocommerce-blocks/pull/7083)) 1. Enable TT2 theme. Create a new page with an `All Products` block and a `Active Filters` block with other filter blocks. Save the page. -2. Open the page in the frontend and check that the `Active Filters` block shows like the screenshot above while loading. +2. Open the page in the frontend and check that the `Active Filters` block shows like the screenshot while loading. 3. Try different combinations of settings (show the `Apply` button, Chips vs List etc) and make sure the loading state makes sense and there are no regressions. 4. Repeat steps 1-3 with the Storefront theme. +| List | Chips | +| ------ | ----- | +|![Screenshot 2022-09-08 at 11 17 04](https://user-images.githubusercontent.com/8639742/189098324-940a2a66-9eb2-4025-9d6f-a770bb20c3a4.png) | ![Screenshot 2022-09-08 at 11 16 50](https://user-images.githubusercontent.com/8639742/189098368-f61594ff-6930-4b44-88df-8f5d06cacd2a.png) | + + ### Featured Item Blocks: Remove inline default color so that custom colors from Global Styles are applied correctly. ([7036](https://github.com/woocommerce/woocommerce-blocks/pull/7036)) 1. Ensure you have a block theme active (i.e., Twenty Twenty-Two). From 27e8dcbebb509074bba6099be7317efb03b65900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 13 Sep 2022 09:31:51 +0200 Subject: [PATCH 05/10] Fix pills in the Filter by Attribute block dropdown overlapping with the chevron (second attempt) (https://github.com/woocommerce/woocommerce-blocks/pull/7112) --- .../assets/js/blocks/attribute-filter/style.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/attribute-filter/style.scss b/plugins/woocommerce-blocks/assets/js/blocks/attribute-filter/style.scss index 853c4701096..2b17a57ffef 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/attribute-filter/style.scss +++ b/plugins/woocommerce-blocks/assets/js/blocks/attribute-filter/style.scss @@ -110,8 +110,12 @@ } } } - .is-single .wc-blocks-components-form-token-field-wrapper .components-form-token-field__input-container { + .wc-blocks-components-form-token-field-wrapper:not(.single-selection) .components-form-token-field__input-container { width: calc(100% - 50px); + + .components-form-token-field__suggestions-list { + width: calc(100% + 50px); + } } } From aaa480f0bbc8636172ceb419191199692c3a1bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 13 Sep 2022 09:32:11 +0200 Subject: [PATCH 06/10] Fix invisible Reset filter button in some themes (https://github.com/woocommerce/woocommerce-blocks/pull/7111) --- .../assets/js/base/components/filter-reset-button/style.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/base/components/filter-reset-button/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/filter-reset-button/style.scss index 3375f7c77e9..e9ac580bc4b 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/filter-reset-button/style.scss +++ b/plugins/woocommerce-blocks/assets/js/base/components/filter-reset-button/style.scss @@ -1,8 +1,6 @@ .wc-block-components-filter-reset-button { - background: transparent; - border: none; + @include text-button(); cursor: pointer; - font-size: inherit; &:not([disabled]):hover { text-decoration: underline; From be9ab04e2f3c91bdf33276839f3fc856fca125d4 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 13 Sep 2022 10:29:25 +0200 Subject: [PATCH 07/10] update link zip file --- .../docs/internal-developers/testing/releases/850.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md index 543d0617185..51bb4daf605 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/850.md @@ -1,6 +1,6 @@ # Testing notes and ZIP for release 8.5.0 -Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9548153/woocommerce-gutenberg-products-block.zip) +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9554999/woocommerce-gutenberg-products-block.zip) ## Feature plugin and package inclusion in WooCommerce From 56adbe912aae1d1be46613313e3ec9757646d2a5 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 13 Sep 2022 14:22:22 +0200 Subject: [PATCH 08/10] Bumping version strings to new version. --- plugins/woocommerce-blocks/package.json | 2 +- plugins/woocommerce-blocks/readme.txt | 2 +- plugins/woocommerce-blocks/src/Package.php | 2 +- .../woocommerce-blocks/woocommerce-gutenberg-products-block.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/woocommerce-blocks/package.json b/plugins/woocommerce-blocks/package.json index 81fe450e52f..d57b8ab35bb 100644 --- a/plugins/woocommerce-blocks/package.json +++ b/plugins/woocommerce-blocks/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "8.5.0-dev", + "version": "8.5.0", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index f1710f4b371..022bd4dbff9 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks Requires at least: 6.0 Tested up to: 6.0 Requires PHP: 7.0 -Stable tag: 8.5.0-dev +Stable tag: 8.5.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html diff --git a/plugins/woocommerce-blocks/src/Package.php b/plugins/woocommerce-blocks/src/Package.php index 6b11bb7e084..7ff4ce97595 100644 --- a/plugins/woocommerce-blocks/src/Package.php +++ b/plugins/woocommerce-blocks/src/Package.php @@ -115,7 +115,7 @@ class Package { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '8.5.0-dev'; + $version = '8.5.0'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php b/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php index fd4cbc641fa..dfd4b47ae3a 100644 --- a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php +++ b/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Blocks * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block * Description: WooCommerce blocks for the Gutenberg editor. - * Version: 8.5.0-dev + * Version: 8.5.0 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block From 0ea0985a225d60843523795c9883d616c5f666c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:29:20 +0200 Subject: [PATCH 10/10] Release: 8.5.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7212) * use full link for WordPress resources (https://github.com/woocommerce/woocommerce-blocks/pull/7211) Co-authored-by: Niels Lange * Empty commit for release pull request * update readme * add testing instructions * add zip file link * update testing instructions and changelog entry * Bumping version strings to new version. Co-authored-by: Seghir Nadir Co-authored-by: Niels Lange Co-authored-by: github-actions Co-authored-by: Luigi --- .../internal-developers/testing/releases/851.md | 13 +++++++++++++ .../testing/releases/README.md | 1 + plugins/woocommerce-blocks/package.json | 2 +- plugins/woocommerce-blocks/readme.txt | 8 +++++++- .../woocommerce-blocks/src/AssetsController.php | 16 +++++++++++++++- plugins/woocommerce-blocks/src/Package.php | 2 +- .../woocommerce-gutenberg-products-block.php | 2 +- 7 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 plugins/woocommerce-blocks/docs/internal-developers/testing/releases/851.md diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/851.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/851.md new file mode 100644 index 00000000000..4d02ffc2bdd --- /dev/null +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/851.md @@ -0,0 +1,13 @@ +# Testing notes and ZIP for release 8.5.1 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9633294/woocommerce-gutenberg-products-block.zip) + +## Feature plugin and package inclusion in WooCommerce + +### Fix a bug in which resource hinting was breaking cart in subfolder installs. ([7211](https://github.com/woocommerce/woocommerce-blocks/pull/7211)) + + +1. Make sure Gutenberg is disabled. +2. Add an item to cart. +3. Go to any frontend page, and view the page source. +4. In that source page, search for scripts starting with `/wp-includes`, you shouldn't see any relative links in them, e.g. /wp-includes/js/dist/vendor/lodash.min.js, but that everything starts with a full link, e.g. . diff --git a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md index 436dec217ae..8c1592785f3 100644 --- a/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md +++ b/plugins/woocommerce-blocks/docs/internal-developers/testing/releases/README.md @@ -89,6 +89,7 @@ Every release includes specific testing instructions for new features and bug fi - [8.3.1](./831.md) - [8.4.0](./840.md) - [8.5.0](./850.md) + - [8.5.1](./851.md) diff --git a/plugins/woocommerce-blocks/package.json b/plugins/woocommerce-blocks/package.json index d57b8ab35bb..44a58587895 100644 --- a/plugins/woocommerce-blocks/package.json +++ b/plugins/woocommerce-blocks/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "8.5.0", + "version": "8.5.1", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index 022bd4dbff9..671bfaebc5f 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks Requires at least: 6.0 Tested up to: 6.0 Requires PHP: 7.0 -Stable tag: 8.5.0 +Stable tag: 8.5.1 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -86,6 +86,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 8.5.1 - 2022-09-23 = + +#### Bug Fixes + +- Ensure that scripts are loaded using absolute URLs to prevent loading issues with subfolder installs. ([7211](https://github.com/woocommerce/woocommerce-blocks/pull/7211)) + = 8.5.0 - 2022-09-12 = #### Enhancements diff --git a/plugins/woocommerce-blocks/src/AssetsController.php b/plugins/woocommerce-blocks/src/AssetsController.php index cf1e3260a3e..85990ba61b8 100644 --- a/plugins/woocommerce-blocks/src/AssetsController.php +++ b/plugins/woocommerce-blocks/src/AssetsController.php @@ -163,7 +163,7 @@ final class AssetsController { $dependencies, function( $src, $handle ) use ( $wp_scripts ) { if ( isset( $wp_scripts->registered[ $handle ] ) ) { - $src[] = add_query_arg( 'ver', $wp_scripts->registered[ $handle ]->ver, $wp_scripts->registered[ $handle ]->src ); + $src[] = add_query_arg( 'ver', $wp_scripts->registered[ $handle ]->ver, $this->get_absolute_url( $wp_scripts->registered[ $handle ]->src ) ); $src = array_merge( $src, $this->get_script_dependency_src_array( $wp_scripts->registered[ $handle ]->deps ) ); } return $src; @@ -172,6 +172,20 @@ final class AssetsController { ); } + /** + * Returns an absolute url to relative links for WordPress core scripts. + * + * @param string $src Original src that can be relative. + * @return string Correct full path string. + */ + private function get_absolute_url( $src ) { + $wp_scripts = wp_scripts(); + if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) { + $src = $wp_scripts->base_url . $src; + } + return $src; + } + /** * Add body classes to the frontend and within admin. * diff --git a/plugins/woocommerce-blocks/src/Package.php b/plugins/woocommerce-blocks/src/Package.php index 7ff4ce97595..2b195c25643 100644 --- a/plugins/woocommerce-blocks/src/Package.php +++ b/plugins/woocommerce-blocks/src/Package.php @@ -115,7 +115,7 @@ class Package { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '8.5.0'; + $version = '8.5.1'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php b/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php index dfd4b47ae3a..70ba3836a7f 100644 --- a/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php +++ b/plugins/woocommerce-blocks/woocommerce-gutenberg-products-block.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Blocks * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block * Description: WooCommerce blocks for the Gutenberg editor. - * Version: 8.5.0 + * Version: 8.5.1 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block