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 committed Feb 10, 2023
1 parent 3e31fd5 commit b6793d2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 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
19 changes: 11 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';
import type { Thunks } from './thunks';

// Thunks are functions that can be dispatched, similar to actions creators
Expand Down Expand Up @@ -188,7 +188,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 All @@ -213,7 +213,8 @@ export const applyExtensionCartUpdate =
*/
export const applyCoupon =
( couponCode: string ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
dispatch.receiveApplyingCoupon( couponCode );
try {
dispatch.receiveApplyingCoupon( couponCode );
const { response } = await apiFetchWithHeaders( {
Expand Down Expand Up @@ -243,7 +244,9 @@ export const applyCoupon =
*/
export const removeCoupon =
( couponCode: string ) =>
async ( { dispatch } ) => {
async ( { dispatch }: { dispatch: CartDispatchFromMap } ) => {
dispatch.receiveRemovingCoupon( couponCode );

try {
dispatch.receiveRemovingCoupon( couponCode );
const { response } = await apiFetchWithHeaders( {
Expand Down Expand Up @@ -276,7 +279,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 @@ -346,12 +349,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.
1 change: 1 addition & 0 deletions docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +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)
- [9.5.0](./950.md)

<!-- FEEDBACK -->
Expand Down
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
- Fix: Resolve a bug that would display Billing Address for Shipping Address on checkout rest endpoint. ([8291](https://github.com/woocommerce/woocommerce-blocks/pull/8291))
- Fix: Resolve an issue where the WooCommerce tab of the style book would crash and certain blocks would not load correctly. ([8243](https://github.com/woocommerce/woocommerce-blocks/pull/8243))

= 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

0 comments on commit b6793d2

Please sign in to comment.