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

Commit

Permalink
Release: 10.6.2 (#10407)
Browse files Browse the repository at this point in the history
* Fix: WooCommerce Blocks causing malfunction of the navigation block on WordPress 6.3 (#10388)

* Make sure the revert button is registered and enqueued for usage exclusively in the site editor.

* Register and enqueue the styles for the revert button.

* Rename the files.

* Revert "Rename the file renames."

This reverts commit c0330ce.

* Add plugin-proposal-optional-chaining to the WebPack plugins config.

* Rename the files.

* Remove unnecessary dependencies as those are already provided via : more specifically, get_script_data.

* Address CR.

* Cart and Checkout Page Migration: Inherit Page template and fix rendering (#10375)

* Change shortcode block render callback

* Inherit template from original "page" template

* Check if WordPress version is higher than 6.2.2 to make Products block compatible with Gutenberg 16+ (#10360)

* Check if WordPress version is higher than 6.2.2 to make Products block compatible with Gutenberg 16+

* Extract the logic of checking the post template support for grid view toi separate function

* Change the versions comparison and improve description of custom version compare function

* Render Checkout/Cart containing pages without template overriding (#10359)

* Render Checkout/Cart containing pages without template overriding

* Fix checkout typo

---------

Co-authored-by: Mike Jolley <[email protected]>

* Add to cart form: Fix fatal error when missing `product` param in add_to_cart_redirect_filter (#10316)

* Transform product param optional in add_to_cart_redirect_filter method

* Remove unnecessary argument from add_to_cart_redirect_filter

* Remove mocked filter call

* Remove unnecessary argument from function docs

* Remove opinionated styles from Product Hero pattern (#10255)

* Mini Cart: Remove deprecated print_inline_script() (#10165)

* Mini Cart: Replace the deprecated print_inline_script() with supported get_inline_script_data(). Fixes #10004

* Mini Cart: Add version check for the new get_inline_script_data() function

* Update the variable names and fix a typo

* Mini Cart: Add regex to check for the WP version

* Abstract the WP version comparison regex to a separate Utils class

* Call wc_setup_product_data if the global product variable is not an instance of WC_Product. (#10128)

* Empty commit for release pull request

* add testing instructions

* Per block stylesheets (#9831)

* Clean up blank lines

* Update Webpack config

* Update PHP logic to load block styles

* Style fixes

* Style fixes (II)

* Style fixes (III)

* Style fixes (IV)

* Fix missing stylesheets in the Site Editor

* Fix wrong return values in some PHP method docs

* Fix missing ProductPrice stylesheet causing 404 in tests

* Fix missing ProductGallery stylesheet causing 404 in tests

* update testing instructions

* add zip link

* update version

* update zip link

* remove screenshot

* remove testing instructions

* Register Legacy block for all taxonomy-product_ template (#10382)

* WIP

* improve logic

* improve unit test

* $post validation on Cart and Checkout template (#10410)

Co-authored-by: Luigi Teschio <[email protected]>

* Update zip

---------

Co-authored-by: Patricia Hillebrandt <[email protected]>
Co-authored-by: Mike Jolley <[email protected]>
Co-authored-by: Karol Manijak <[email protected]>
Co-authored-by: Paulo Arromba <[email protected]>
Co-authored-by: Alexandre Lara <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
Co-authored-by: Daniel Dudzic <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Luigi <[email protected]>
  • Loading branch information
10 people authored Jul 31, 2023
1 parent 33ec179 commit 59ff006
Show file tree
Hide file tree
Showing 90 changed files with 664 additions and 214 deletions.
1 change: 0 additions & 1 deletion assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@
@include visually-hidden-focus-reveal();
}


.wp-block-group.woocommerce.product .up-sells.upsells.products {
max-width: var(--wp--style--global--wide-size);
}
1 change: 0 additions & 1 deletion assets/js/atomic/blocks/product-elements/price/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import type { HTMLAttributes } from 'react';
* Internal dependencies
*/
import type { BlockAttributes } from './types';
import './style.scss';

type Props = BlockAttributes & HTMLAttributes< HTMLDivElement >;

Expand Down
11 changes: 0 additions & 11 deletions assets/js/atomic/blocks/product-elements/price/style.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import classnames from 'classnames';
import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';

/**
* Internal dependencies
*/

interface SingleProductTab {
id: string;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { productDetails } from '@woocommerce/icons';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

registerBlockSingleProductTemplate( {
blockName: metadata.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';
import { Notice } from '@wordpress/components';

/**
* Internal dependencies
*/

export const ProductReviews = () => {
const blockProps = useBlockProps();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

registerBlockSingleProductTemplate( {
blockName: metadata.name,
Expand Down
5 changes: 0 additions & 5 deletions assets/js/atomic/blocks/product-elements/rating/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import { useStyleProps } from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';
import { isNumber, ProductResponseItem } from '@woocommerce/types';

/**
* Internal dependencies
*/
import './style.scss';

type RatingProps = {
reviews: number;
rating: number;
Expand Down
4 changes: 4 additions & 0 deletions assets/js/base/components/country-input/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import "node_modules/@wordpress/base-styles/breakpoints";
@import "node_modules/@wordpress/base-styles/mixins";
@import "node_modules/wordpress-components/src/combobox-control/style";

.wc-block-components-country-input {
margin-top: em($gap-large);
}
1 change: 1 addition & 0 deletions assets/js/base/components/form-token-field/vendor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
@import "node_modules/@wordpress/base-styles/mixins";
@import "node_modules/wordpress-components/src/popover/style";
@import "node_modules/wordpress-components/src/tooltip/style";
@import "node_modules/wordpress-components/src/form-token-field/style";
/* stylelint-enable no-invalid-position-at-import-rule */
}
12 changes: 12 additions & 0 deletions assets/js/base/components/product-price/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
}
/*rtl:end:ignore*/

.wc-block-components-product-price {
display: block;

.wc-block-all-products .wc-block-components-product-price {
margin-bottom: $gap-small;
}

ins {
text-decoration: none;
}
}

.wc-block-components-product-price__value {
&.is-discounted {
margin-left: 0.5em;
Expand Down
1 change: 1 addition & 0 deletions assets/js/base/components/product-rating/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { __, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import './style.scss';

const Rating = ( {
className,
Expand Down
1 change: 1 addition & 0 deletions assets/js/blocks/breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Icon, queryPagination } from '@wordpress/icons';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

const featurePluginSupport = {
...metadata.supports,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { PAYMENT_STORE_KEY } from '@woocommerce/block-data';
import NoPaymentMethods from './no-payment-methods';
import PaymentMethodOptions from './payment-method-options';
import SavedPaymentMethodOptions from './saved-payment-method-options';
import './style.scss';

/**
* PaymentMethods component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/cart-cross-sells-products-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type { TemplateArray } from '@wordpress/blocks';
/**
* Internal dependencies
*/
import './style.scss';
import {
useForcedLayout,
getAllowedBlocks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/cart-totals-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
useForcedLayout,
getAllowedBlocks,
} from '../../../cart-checkout-shared';
import './style.scss';

const browseStoreTemplate = SHOP_URL
? [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/empty-cart-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { useCartEventsContext } from '@woocommerce/base-context/providers';
/**
* Internal dependencies
*/
import './style.scss';
import { defaultButtonLabel } from './constants';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { registerBlockType } from '@wordpress/blocks';
*/
import attributes from './attributes';
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/proceed-to-checkout-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@
}
}
}

1 change: 1 addition & 0 deletions assets/js/blocks/catalog-sorting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { totals } from '@woocommerce/icons';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

registerBlockType( metadata, {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
/**
* Internal dependencies
*/
import './style.scss';
import { defaultPlaceOrderButtonLabel } from './constants';
import './style.scss';

const Block = ( {
cartPageId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { BlockConfiguration } from '@wordpress/blocks';
*/
import attributes from './attributes';
import { Edit, Save } from './edit';
import './style.scss';

const blockConfig: BlockConfiguration = {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import classnames from 'classnames';
import { Main } from '@woocommerce/base-components/sidebar-layout';

/**
* Internal dependencies
*/
import './style.scss';

const FrontendBlock = ( {
children,
className,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/checkout-fields-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/checkout-order-note-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
margin-top: $gap;
}

.wc-block-checkout__order-notes.wc-block-components-checkout-step {
.wc-block-components-form .wc-block-checkout__order-notes.wc-block-components-checkout-step {
padding-left: 0;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* External dependencies
*/

/**
* Internal dependencies
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { LocalPickupSelect } from '@woocommerce/base-components/cart-checkout/lo
/**
* Internal dependencies
*/
import './style.scss';
import ShippingRatesControlPackage from '../../../../base/components/cart-checkout/shipping-rates-control-package';

const getPickupLocation = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { registerBlockType } from '@wordpress/blocks';
*/
import { Edit, Save } from './edit';
import attributes from './attributes';
import './style.scss';

registerBlockType( 'woocommerce/checkout-pickup-options-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { isPackageRateCollectable } from '@woocommerce/base-utils';
/**
* Internal dependencies
*/
import './style.scss';
import { RatePrice, getLocalPickupPrices, getShippingPrices } from './shared';
import type { minMaxPrices } from './shared';
import { defaultLocalPickupText, defaultShippingText } from './constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { registerBlockType } from '@wordpress/blocks';
*/
import { Edit, Save } from './edit';
import attributes from './attributes';
import './style.scss';

registerBlockType( 'woocommerce/checkout-shipping-method-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import type {
import NoticeBanner from '@woocommerce/base-components/notice-banner';
import type { ReactElement } from 'react';

/**
* Internal dependencies
*/
import './style.scss';

/**
* Renders a shipping rate control option.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { registerBlockType } from '@wordpress/blocks';
*/
import { Edit, Save } from './edit';
import attributes from './attributes';
import './style.scss';

registerBlockType( 'woocommerce/checkout-shipping-methods-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { VALIDATION_STORE_KEY } from '@woocommerce/block-data';
* Internal dependencies
*/
import { termsConsentDefaultText, termsCheckboxDefaultText } from './constants';
import './style.scss';

const FrontendBlock = ( {
text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
*/
import { Icon, customPostType } from '@wordpress/icons';
import { registerBlockType } from '@wordpress/blocks';

/**
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/checkout-terms-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ import classnames from 'classnames';
import { Sidebar } from '@woocommerce/base-components/sidebar-layout';
import { StoreNoticesContainer } from '@woocommerce/blocks-checkout';

/**
* Internal dependencies
*/
import './style.scss';

const FrontendBlock = ( {
children,
className,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/checkout-totals-block', {
icon: {
Expand Down
5 changes: 0 additions & 5 deletions assets/js/blocks/checkout/order-notes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import { useState } from '@wordpress/element';
import { CheckboxControl } from '@woocommerce/blocks-checkout';
import { Textarea } from '@woocommerce/base-components/textarea';

/**
* Internal dependencies
*/
import './style.scss';

interface CheckoutOrderNotesProps {
disabled: boolean;
onChange: ( orderNotes: string ) => void;
Expand Down
9 changes: 9 additions & 0 deletions assets/js/blocks/classic-template/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ export const TEMPLATES: TemplateDetails = {
),
placeholder: PLACEHOLDERS.archiveProduct,
},
// Since that it is a fallback value, it has to be the last one.
'taxonomy-product': {
type: TYPES.productTaxonomy,
title: __(
"WooCommerce Product's Custom Taxonomy Block",
'woo-gutenberg-products-block'
),
placeholder: PLACEHOLDERS.archiveProduct,
},
'product-search-results': {
type: TYPES.productSearchResults,
title: __(
Expand Down
Loading

0 comments on commit 59ff006

Please sign in to comment.