diff --git a/assets/js/blocks/cart/edit.js b/assets/js/blocks/cart/edit.js index f8b57196710..8a1d2862497 100644 --- a/assets/js/blocks/cart/edit.js +++ b/assets/js/blocks/cart/edit.js @@ -28,6 +28,7 @@ import { useForcedLayout, BlockSettings, } from '../cart-checkout-shared'; +import '../cart-checkout-shared/sidebar-notices'; import { CartBlockContext } from './context'; // This is adds a class to body to signal if the selected block is locked diff --git a/assets/js/blocks/checkout/edit.tsx b/assets/js/blocks/checkout/edit.tsx index 53e39325a61..2e7087526f4 100644 --- a/assets/js/blocks/checkout/edit.tsx +++ b/assets/js/blocks/checkout/edit.tsx @@ -32,6 +32,7 @@ import { BlockSettings, useBlockPropsWithLocking, } from '../cart-checkout-shared'; +import '../cart-checkout-shared/sidebar-notices'; import { CheckoutBlockContext, CheckoutBlockControlsContext } from './context'; import type { Attributes } from './types'; diff --git a/assets/js/blocks/product-categories/block.json b/assets/js/blocks/product-categories/block.json index 215429cd908..3842a4ccf2f 100644 --- a/assets/js/blocks/product-categories/block.json +++ b/assets/js/blocks/product-categories/block.json @@ -4,6 +4,18 @@ "category": "woocommerce", "description": "Show all product categories as a list or dropdown.", "keywords": [ "WooCommerce" ], + "supports": { + "align": [ "wide", "full" ], + "html": false, + "color": { + "background": false, + "link": true + }, + "typography": { + "fontSize": true, + "lineHeight": true + } + }, "attributes": { "align": { "type": "string" diff --git a/assets/js/blocks/product-categories/index.tsx b/assets/js/blocks/product-categories/index.tsx index 4cbf55dabc9..9c205df30bf 100644 --- a/assets/js/blocks/product-categories/index.tsx +++ b/assets/js/blocks/product-categories/index.tsx @@ -3,7 +3,6 @@ */ import { createBlock, registerBlockType } from '@wordpress/blocks'; import { Icon, listView } from '@wordpress/icons'; -import { isFeaturePluginBuild } from '@woocommerce/block-settings'; /** * Internal dependencies @@ -22,21 +21,6 @@ registerBlockType( metadata, { /> ), }, - supports: { - align: [ 'wide', 'full' ], - html: false, - ...( isFeaturePluginBuild() && { - color: { - background: false, - link: true, - }, - typography: { - fontSize: true, - lineHeight: true, - }, - } ), - }, - transforms: { from: [ { diff --git a/docs/internal-developers/testing/releases/830.md b/docs/internal-developers/testing/releases/830.md new file mode 100644 index 00000000000..cd096a74b78 --- /dev/null +++ b/docs/internal-developers/testing/releases/830.md @@ -0,0 +1,121 @@ +# Testing notes and ZIP for release 8.3.0 + +Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/9350354/woocommerce-gutenberg-products-block.zip) + +## Feature plugin and package inclusion in WooCommerce + +### Enable the Cart and Checkout blocks when WooCommerce Blocks is bundled in WooCommerce Core. ([6805](https://github.com/woocommerce/woocommerce-blocks/pull/6805)) + +**Cart Block**: + +1. In the Cart Block in the editor, ensure the shipping calculator is enabled. +2. Enable coupons on your site (WooCommerce -> Settings -> General -> Enable the use of coupon codes) and add one. +3. Add two shipping methods for different locations, e.g. two for USA and two for UK. +4. Do not add items to your cart. +5. Go to the Cart Block and ensure the empty cart is displayed. +6. Add items to your cart and revisit the Cart Block. +7. Enter your address in the shipping calculator, ensure the correct shipping prices are displayed based on your location. +8. Enter a coupon and ensure it works, and the price is modified accordingly. +9. Modify the quantities of items in your cart, ensure it works and the prices update properly. +10. If you have express payments enabled and working, try checking out from the Cart Block using GPay or Apple pay. +11. If you don't, hit proceed to checkout and ensure it works correctly. + +**Checkout Block**: + +1. Go to WooCommerce -> Settings -> Accounts & Privacy and enable ` Allow customers to create an account during checkout` and `Allow customers to log into an existing account during checkout`. +2. Go to Checkout Block editor, select contact information block and enable `Allow shoppers to sign up for a user account during checkout`. +3. Enable the Stripe payment method, COD, and cheque. +4. Log out of the site then add items to your cart and go to the Checkout Block. +5. Check the `create account` box when entering your details. +6. Remove the coupon added in the Cart testing steps, and try re-adding it. +7. Change shipping methods and ensure the prices update. +8. Change address, ensure shipping prices update when the country changes. +9. Leave some fields empty on the address form, ensure you get an error. +10. Re-fill them and enter an invalid ZIP code. (Set country to UK and enter 234345 as the Postcode). Ensure you see an error at the top of the block. +11. Correct the error (A valid one is `SW19 1AA` if in UK). +12. Check out and ensure it works and the order is logged correctly. +13. Ensure you received emails relating to your order (if using Local WP you can go to your site -> tools -> mailhog to check this). + +### Refactor Product Categories block to use block.json. ([6875](https://github.com/woocommerce/woocommerce-blocks/pull/6875)) + +**WooCommerce Blocks**: + +1. Add Product Categories List block as a widget (Appearance → Widgets) +2. Open block settings +3. Test block controls, save, and review if it still renders correctly in the frontend + +**WPCOM**: + +1. Add Product Categories List block as a widget (Appearance → Widgets) +2. Open block settings +3. Open Advanced and click on "Add new rule" under Visibility + +### Add feedback box to the Cart & Checkout Inner Blocks in the inspector. ([6881](https://github.com/woocommerce/woocommerce-blocks/pull/6881)) + +1. Go to the Cart and Checkout editor pages +2. Select the Block and each of its inner blocks. You should notice the feedback box in the inspector. + +![image](https://user-images.githubusercontent.com/14235870/183031149-73a4bb4b-975a-4c9e-a82f-9241a61beb8a.png) + +### Add notice to Cart and Checkout blocks' inspector controls which links to the list of compatible plugins. ([6869](https://github.com/woocommerce/woocommerce-blocks/pull/6869)) + +1. Go to the editor, insert the Checkout block. +2. Select it, verify you see the notice. Click through each and every inner block and ensure the notice displays for it. +3. Dismiss the notice, click back through the inner blocks and ensure the notice is gone. Reload the page, ensure the notice is still gone. +4. Go to the editor, insert the Cart block. +5. Select it, verify you see the notice. Click through each and every inner block and ensure the notice displays for it. +6. Dismiss the notice, click back through the inner blocks and ensure the notice is gone. Reload the page, ensure the notice is still gone. +7. Clear local storage again. +8. Go back to the Cart and Checkout blocks and ensure the notice is back. +9. Create a new page. Add the Checkout Block. Select it and verify the sidebar contains the default warning: +image. +Verify the wording says **checkout**. +10. Add the Cart Block, ensure the same notice appears but ensure it says **cart**. + +### Add the ability to register patterns by adding them under the "patterns" folder and add the new "WooCommerce Filters" pattern. ([6861](https://github.com/woocommerce/woocommerce-blocks/pull/6861)) + +1. Create a new page with the `All Products` block. +2. Open the block inserter, go to the patterns tab, and select the WooCommerce category from the dropdown +3. Make sure you see a pattern under that category named: `WooCommerce Filters` +4. Click on it to insert it on the page. +5. Check that all 4 filter blocks (by attribute, price, stock, and active filters) are added. +6. Complete the filter by attribute by selecting one of them. +7. Save the page and make sure all the filters are rendered on the front-end. + +### Override the description to prevent infinite loop. ([6849](https://github.com/woocommerce/woocommerce-blocks/pull/6849)) + +1. Make sure you are using a block theme (ie: Twenty Twenty Two). +2. Go to Appearance > Editor > Templates. +3. Click on Add New and select Single Item: Product. +4. Select any product from the list (ie: Hoodie). +5. In the template, add the Hand-picked Products block and select the same product. +6. Visit that product page in the frontend and notice the correct product is selected. + +### Update billing address when shipping address gets change in shipping calculator at Cart block. ([6823](https://github.com/woocommerce/woocommerce-blocks/pull/6823)) + +1. Add a product to the cart and go to the Cart block. +2. Add a new address with a valid zip code in the Shipping calculator, different from what you already used. +3. Click on the Update button and wait for the update. +4. Proceed to Checkout. +5. In the Checkout block, see the new address for shipping being added to the Shipping address. +6. Uncheck the checkbox for `Use same address for billing`. +7. Look at the Billing address form and confirm it has the same address which was selected in the shipping calculator. + +### Fix: Add font-weight controls to the Mini Cart block text. ([6760](https://github.com/woocommerce/woocommerce-blocks/pull/6760)) + +1. Make sure you have a blocks theme active (like Twenty Twenty-Two). +2. Navigate to Appearance > Editor (Beta) and add a Mini Cart block somewhere in your site. +3. In the editor, select the Mini Cart block and, in the block settings, choose Font Weight under the Typography section. +4. Adjust the font weight to something other than the Default. +5. Confirm changes are present in the editor. +6. Save changes and preview the frontend to confirm the changes have persisted. + + + +--- + +[We're hiring!](https://woocommerce.com/careers/) Come work with us! + +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/internal-developers/testing/releases/810.md) + + diff --git a/docs/internal-developers/testing/releases/README.md b/docs/internal-developers/testing/releases/README.md index 9a00db51f5e..b8471c0fbf9 100644 --- a/docs/internal-developers/testing/releases/README.md +++ b/docs/internal-developers/testing/releases/README.md @@ -85,6 +85,7 @@ Every release includes specific testing instructions for new features and bug fi - [8.1.0](./810.md) - [8.2.0](./820.md) - [8.2.1](./821.md) +- [8.3.0](./830.md) diff --git a/package.json b/package.json index f8e61bd4f2e..aad4b2c6f51 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@woocommerce/block-library", "title": "WooCommerce Blocks", "author": "Automattic", - "version": "8.3.0-dev", + "version": "8.3.0", "description": "WooCommerce blocks for the Gutenberg editor.", "homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/", "keywords": [ @@ -21,7 +21,8 @@ "./assets/js/blocks/cart/inner-blocks/**/index.tsx", "./assets/js/blocks/cart/inner-blocks/register-components.ts", "./assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/**/index.tsx", - "./assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/register-components.ts" + "./assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/register-components.ts", + "./assets/js/blocks/cart-checkout-shared/sidebar-notices/index.tsx" ], "repository": { "type": "git", diff --git a/readme.txt b/readme.txt index c834b932a30..6deb0a85eee 100644 --- a/readme.txt +++ b/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.3.0-dev +Stable tag: 8.3.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -86,6 +86,22 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/ == Changelog == += 8.3.0 - 2022-08-15 = + +#### Enhancements + +- Add feedback box to the Cart & Checkout Inner Blocks in the inspector. ([6881](https://github.com/woocommerce/woocommerce-blocks/pull/6881)) +- Refactor style-attributes hooks to add as global custom imports and remove relative import paths. ([6870](https://github.com/woocommerce/woocommerce-blocks/pull/6870)) +- Add notice to Cart and Checkout blocks' inspector controls which links to the list of compatible plugins. ([6869](https://github.com/woocommerce/woocommerce-blocks/pull/6869)) +- Add the ability to register patterns by adding them under the "patterns" folder and add the new "WooCommerce Filters" pattern. ([6861](https://github.com/woocommerce/woocommerce-blocks/pull/6861)) +- Enable the Cart and Checkout blocks when WooCommerce Blocks is bundled in WooCommerce Core. ([6805](https://github.com/woocommerce/woocommerce-blocks/pull/6805)) + +#### Bug Fixes + +- Refactor Product Categories block to use block.json. ([6875](https://github.com/woocommerce/woocommerce-blocks/pull/6875)) +- Fix: Update billing address when shipping address gets change in shipping calculator at Cart block. ([6823](https://github.com/woocommerce/woocommerce-blocks/pull/6823)) +- Fix: Add font-weight controls to the Mini Cart block text. ([6760](https://github.com/woocommerce/woocommerce-blocks/pull/6760)) + = 8.2.1 - 2022-08-03 = #### Bug Fixes diff --git a/src/Package.php b/src/Package.php index 596bfc8880e..18c45be9100 100644 --- a/src/Package.php +++ b/src/Package.php @@ -113,7 +113,7 @@ public static function container( $reset = false ) { NewPackage::class, function ( $container ) { // leave for automated version bumping. - $version = '8.3.0-dev'; + $version = '8.3.0'; return new NewPackage( $version, dirname( __DIR__ ), diff --git a/woocommerce-gutenberg-products-block.php b/woocommerce-gutenberg-products-block.php index d45b7efb20a..3390892c352 100644 --- a/woocommerce-gutenberg-products-block.php +++ b/woocommerce-gutenberg-products-block.php @@ -3,14 +3,14 @@ * Plugin Name: WooCommerce Blocks * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block * Description: WooCommerce blocks for the Gutenberg editor. - * Version: 8.3.0-dev + * Version: 8.3.0 * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woo-gutenberg-products-block * Requires at least: 6.0 * Requires PHP: 7.0 - * WC requires at least: 6.6 - * WC tested up to: 6.7 + * WC requires at least: 6.7 + * WC tested up to: 6.8 * * @package WooCommerce\Blocks * @internal This file is only used when running as a feature plugin.