Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Release: 9.4.3 (#8357)
Browse files Browse the repository at this point in the history
* Empty commit for release pull request

* update readme

* Switch to select instead of resolveSelector (#8356)

* Mini Cart block - Fix the drawer content height to allow checkout button to show. (#8351)

* Add max-height to Mini Cart drawer.

By giving the Mini Cart contents a max height with the
-webkit-fill-available property, we can ensure that the browser chrome
is accounted for on mobile devices.

* Add `dvh` and keep `vh` as a fallback for height.

By adding `dvh`, we also account for non-webkit mobile browsers that
have the same hidden button issue.

See
#8351 (review)

Keeping `vh` as a fallback, along with `-webkit-fill-available` gives us
the widest range of support.

* update readme with changelog

* add testing steps

* add pr links to readme

* Bumping version strings to new version.

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Nadir Seghir <[email protected]>
Co-authored-by: Daniel W. Robert <[email protected]>
  • Loading branch information
4 people authored Feb 10, 2023
1 parent 92911d1 commit 077a25d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 13 deletions.
4 changes: 4 additions & 0 deletions assets/js/blocks/mini-cart/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
.wp-block-woocommerce-mini-cart-contents {
box-sizing: border-box;
height: 100vh;
height: 100dvh;
max-height: -webkit-fill-available;
padding: 0;
justify-content: center;
}
Expand All @@ -98,6 +100,8 @@
.wp-block-woocommerce-empty-mini-cart-contents-block,
.wp-block-woocommerce-filled-mini-cart-contents-block {
height: 100vh;
height: 100dvh;
max-height: -webkit-fill-available;
display: flex;
flex-direction: column;
}
Expand Down
16 changes: 8 additions & 8 deletions assets/js/data/cart/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { ACTION_TYPES as types } from './action-types';
import { apiFetchWithHeaders } from '../shared-controls';
import { ReturnOrGeneratorYieldUnion } from '../mapped-types';
import { CartDispatchFromMap, CartResolveSelectFromMap } from './index';
import { CartDispatchFromMap, CartSelectFromMap } from './index';

// Thunks are functions that can be dispatched, similar to actions creators
export * from './thunks';
Expand Down Expand Up @@ -183,7 +183,7 @@ export const shippingRatesBeingSelected = ( isResolving: boolean ) =>
*/
export const applyExtensionCartUpdate =
( args: ExtensionCartUpdateArgs ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
try {
const { response } = await apiFetchWithHeaders( {
path: '/wc/store/v1/cart/extensions',
Expand Down Expand Up @@ -214,7 +214,7 @@ export const applyExtensionCartUpdate =
*/
export const applyCoupon =
( couponCode: string ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
dispatch.receiveApplyingCoupon( couponCode );
try {
const { response } = await apiFetchWithHeaders( {
Expand Down Expand Up @@ -253,7 +253,7 @@ export const applyCoupon =
*/
export const removeCoupon =
( couponCode: string ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
dispatch.receiveRemovingCoupon( couponCode );

try {
Expand Down Expand Up @@ -296,7 +296,7 @@ export const removeCoupon =
*/
export const addItemToCart =
( productId: number, quantity = 1 ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
try {
triggerAddingToCartEvent();
const { response } = await apiFetchWithHeaders( {
Expand Down Expand Up @@ -378,12 +378,12 @@ export const changeCartItemQuantity =
) =>
async ( {
dispatch,
resolveSelect,
select,
}: {
dispatch: CartDispatchFromMap;
resolveSelect: CartResolveSelectFromMap;
select: CartSelectFromMap;
} ) => {
const cartItem = await resolveSelect.getCartItem( cartItemKey );
const cartItem = select.getCartItem( cartItemKey );
if ( cartItem?.quantity === quantity ) {
return;
}
Expand Down
18 changes: 18 additions & 0 deletions docs/internal-developers/testing/releases/943.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Testing notes and ZIP for release 9.4.3

Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/10567326/woocommerce-gutenberg-products-block.zip)

## Feature plugin and package inclusion in WooCommerce

### Mini Cart block - Fix the drawer content height to allow checkout button to show. ([8351](https://github.com/woocommerce/woocommerce-blocks/pull/8351))

1. Set up the Mini Cart in your global navigation, if you don't have it already.
2. View the front end of your site from a mobile device (or Xcode Simulator).
3. Add a product to your cart.
4. Open the Mini Cart drawer.
5. Confirm the checkout button is fully visible (see after screenshots above).

### Fix a bug in WordPress 5.9 in which changing quantity doesn't work inside Cart and Mini Cart blocks. ([8356](https://github.com/woocommerce/woocommerce-blocks/pull/8356))

1. In WordPress 5.9.x, go to Cart block.
2. Try increasing the quantity, it should work.
2 changes: 1 addition & 1 deletion docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Every release includes specific testing instructions for new features and bug fi
- [9.4.0](./940.md)
- [9.4.1](./941.md)
- [9.4.2](./942.md)

- [9.4.3](./943.md)

<!-- FEEDBACK -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
"version": "9.4.2",
"version": "9.4.3",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
9 changes: 8 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
Requires at least: 6.1.1
Tested up to: 6.1.1
Requires PHP: 7.2
Stable tag: 9.4.2
Stable tag: 9.4.3
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -80,6 +80,13 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/

== Changelog ==

= 9.4.3 - 2023-02-01 =

#### Bug Fixes

- Fix a bug in WordPress 5.9 in which changing quantity doesn't work inside Cart and Mini Cart blocks. ([8297](https://github.com/woocommerce/woocommerce-blocks/pull/8356))
- Mini Cart block: Fix the drawer content height to allow the checkout button to be visible. ([8297](https://github.com/woocommerce/woocommerce-blocks/pull/8351))

= 9.4.2 - 2023-01-26 =

#### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion src/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function container( $reset = false ) {
NewPackage::class,
function ( $container ) {
// leave for automated version bumping.
$version = '9.4.2';
$version = '9.4.3';
return new NewPackage(
$version,
dirname( __DIR__ ),
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-gutenberg-products-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: 9.4.2
* Version: 9.4.3
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand Down

0 comments on commit 077a25d

Please sign in to comment.