From 9a55e40389332f7257c95217628ea96033d83a44 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Wed, 23 Nov 2022 09:16:21 +0100 Subject: [PATCH 01/12] Product Query: First attempt at adding patterns --- ...product-query-featured-product-gallery.php | 38 +++++++++++++++++++ patterns/product-query-large-product-grid.php | 9 +++++ .../product-query-minimal-product-row.php | 34 +++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 patterns/product-query-featured-product-gallery.php create mode 100644 patterns/product-query-large-product-grid.php create mode 100644 patterns/product-query-minimal-product-row.php diff --git a/patterns/product-query-featured-product-gallery.php b/patterns/product-query-featured-product-gallery.php new file mode 100644 index 00000000000..808e55be13c --- /dev/null +++ b/patterns/product-query-featured-product-gallery.php @@ -0,0 +1,38 @@ + + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-large-product-grid.php b/patterns/product-query-large-product-grid.php new file mode 100644 index 00000000000..404f489d1cf --- /dev/null +++ b/patterns/product-query-large-product-grid.php @@ -0,0 +1,9 @@ + + diff --git a/patterns/product-query-minimal-product-row.php b/patterns/product-query-minimal-product-row.php new file mode 100644 index 00000000000..a7faebde543 --- /dev/null +++ b/patterns/product-query-minimal-product-row.php @@ -0,0 +1,34 @@ + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +

+ +
+ From 7ecb8ed8bf4851fb1c3b51e84b191a387f2e3c08 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Fri, 25 Nov 2022 02:28:05 +0100 Subject: [PATCH 02/12] Product Query: Update patterns and the default block template --- assets/js/blocks/product-query/constants.ts | 35 ++++++++++++- ...oduct-query-4-column-featured-products.php | 33 ++++++++++++ ...=> product-query-featured-product-row.php} | 1 - patterns/product-query-large-product-grid.php | 22 ++++++++ .../product-query-minimal-product-list.php | 51 +++++++++++++++++++ .../product-query-minimal-product-row.php | 17 ++++--- 6 files changed, 150 insertions(+), 9 deletions(-) create mode 100644 patterns/product-query-4-column-featured-products.php rename patterns/{product-query-featured-product-gallery.php => product-query-featured-product-row.php} (99%) create mode 100644 patterns/product-query-minimal-product-list.php diff --git a/assets/js/blocks/product-query/constants.ts b/assets/js/blocks/product-query/constants.ts index 77c8c3d281e..18de7e39612 100644 --- a/assets/js/blocks/product-query/constants.ts +++ b/assets/js/blocks/product-query/constants.ts @@ -76,13 +76,46 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ {}, [ [ 'woocommerce/product-image' ], + [ + 'core/post-terms', + { + term: 'product_cat', + textAlign: 'center', + fontSize: 'small', + }, + [], + ], [ 'core/post-title', { textAlign: 'center', level: 3, fontSize: 'medium', - __woocommerceNamespace: PRODUCT_TITLE_ID, + }, + [], + ], + [ + 'woocommerce/product-rating', + { + isDescendentOfQueryLoop: true, + fontSize: 'small', + }, + [], + ], + [ + 'woocommerce/product-price', + { + isDescendentOfQueryLoop: true, + textAlign: 'center', + fontSize: 'small', + }, + [], + ], + [ + 'woocommerce/product-button', + { + isDescendentOfQueryLoop: true, + fontSize: 'small', }, [], ], diff --git a/patterns/product-query-4-column-featured-products.php b/patterns/product-query-4-column-featured-products.php new file mode 100644 index 00000000000..65aa7c92d02 --- /dev/null +++ b/patterns/product-query-4-column-featured-products.php @@ -0,0 +1,33 @@ + + +
+ + + + + + + + + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-featured-product-gallery.php b/patterns/product-query-featured-product-row.php similarity index 99% rename from patterns/product-query-featured-product-gallery.php rename to patterns/product-query-featured-product-row.php index 808e55be13c..b8090a5c6c7 100644 --- a/patterns/product-query-featured-product-gallery.php +++ b/patterns/product-query-featured-product-row.php @@ -6,7 +6,6 @@ * Block Types: core/query/woocommerce/product-query */ ?> -
diff --git a/patterns/product-query-large-product-grid.php b/patterns/product-query-large-product-grid.php index 404f489d1cf..6884e2180d8 100644 --- a/patterns/product-query-large-product-grid.php +++ b/patterns/product-query-large-product-grid.php @@ -6,4 +6,26 @@ * Block Types: core/query/woocommerce/product-query */ ?> + +
+ + + + + + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php new file mode 100644 index 00000000000..3af56dcc2e2 --- /dev/null +++ b/patterns/product-query-minimal-product-list.php @@ -0,0 +1,51 @@ + + +
+ +
+
+ + + +
+ + + +
+
+ + + + +
+
+

+
+ + + +
+
+ + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-minimal-product-row.php b/patterns/product-query-minimal-product-row.php index a7faebde543..29e49e32874 100644 --- a/patterns/product-query-minimal-product-row.php +++ b/patterns/product-query-minimal-product-row.php @@ -6,16 +6,19 @@ * Block Types: core/query/woocommerce/product-query */ ?> - - -
+ +
- -
+ +
+
+ -
- + +
+
+ From 21cc3c06361f910a167459392c89c033a5290676 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 6 Dec 2022 12:45:31 +0100 Subject: [PATCH 03/12] Product Query: And new and update existing patterns --- assets/js/blocks/product-query/constants.ts | 35 +--------- ...oduct-query-4-column-featured-products.php | 4 +- ...product-query-featured-product-gallery.php | 35 ++++++++++ .../product-query-featured-product-row.php | 2 +- .../product-query-minimal-product-list.php | 2 +- .../product-query-minimal-product-row.php | 2 +- ...uct-query-product-list-with-1-1-images.php | 55 ++++++++++++++++ ...uct-list-with-full-product-description.php | 65 +++++++++++++++++++ 8 files changed, 161 insertions(+), 39 deletions(-) create mode 100644 patterns/product-query-featured-product-gallery.php create mode 100644 patterns/product-query-product-list-with-1-1-images.php create mode 100644 patterns/product-query-product-list-with-full-product-description.php diff --git a/assets/js/blocks/product-query/constants.ts b/assets/js/blocks/product-query/constants.ts index 18de7e39612..77c8c3d281e 100644 --- a/assets/js/blocks/product-query/constants.ts +++ b/assets/js/blocks/product-query/constants.ts @@ -76,46 +76,13 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ {}, [ [ 'woocommerce/product-image' ], - [ - 'core/post-terms', - { - term: 'product_cat', - textAlign: 'center', - fontSize: 'small', - }, - [], - ], [ 'core/post-title', { textAlign: 'center', level: 3, fontSize: 'medium', - }, - [], - ], - [ - 'woocommerce/product-rating', - { - isDescendentOfQueryLoop: true, - fontSize: 'small', - }, - [], - ], - [ - 'woocommerce/product-price', - { - isDescendentOfQueryLoop: true, - textAlign: 'center', - fontSize: 'small', - }, - [], - ], - [ - 'woocommerce/product-button', - { - isDescendentOfQueryLoop: true, - fontSize: 'small', + __woocommerceNamespace: PRODUCT_TITLE_ID, }, [], ], diff --git a/patterns/product-query-4-column-featured-products.php b/patterns/product-query-4-column-featured-products.php index 65aa7c92d02..03e86fac086 100644 --- a/patterns/product-query-4-column-featured-products.php +++ b/patterns/product-query-4-column-featured-products.php @@ -8,13 +8,13 @@ ?>
- + - + diff --git a/patterns/product-query-featured-product-gallery.php b/patterns/product-query-featured-product-gallery.php new file mode 100644 index 00000000000..768f0fa3880 --- /dev/null +++ b/patterns/product-query-featured-product-gallery.php @@ -0,0 +1,35 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-featured-product-row.php b/patterns/product-query-featured-product-row.php index b8090a5c6c7..e2880eb3909 100644 --- a/patterns/product-query-featured-product-row.php +++ b/patterns/product-query-featured-product-row.php @@ -18,7 +18,7 @@
- + diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php index 3af56dcc2e2..98e190c94e9 100644 --- a/patterns/product-query-minimal-product-list.php +++ b/patterns/product-query-minimal-product-list.php @@ -14,7 +14,7 @@ -
+
diff --git a/patterns/product-query-minimal-product-row.php b/patterns/product-query-minimal-product-row.php index 29e49e32874..f50ca25469f 100644 --- a/patterns/product-query-minimal-product-row.php +++ b/patterns/product-query-minimal-product-row.php @@ -8,7 +8,7 @@ ?>
- +
diff --git a/patterns/product-query-product-list-with-1-1-images.php b/patterns/product-query-product-list-with-1-1-images.php new file mode 100644 index 00000000000..366767eaad3 --- /dev/null +++ b/patterns/product-query-product-list-with-1-1-images.php @@ -0,0 +1,55 @@ + + +
+ +
+
+ + + +
+ + + + + + + +
+
+ + + + +
+
+

+
+ + + +
+
+ + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-product-list-with-full-product-description.php b/patterns/product-query-product-list-with-full-product-description.php new file mode 100644 index 00000000000..a7831d92426 --- /dev/null +++ b/patterns/product-query-product-list-with-full-product-description.php @@ -0,0 +1,65 @@ + + +
+ +
+
+ + + +
+ + + + + + + + + + +
+
+ + + +
+
+
+
+ + + + +
+
+

+
+ + + +
+
+ + + + + + + + + + + + +

+ +
+ From 26c559352a0efb4cf45d4303978d8d78728338de Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 6 Dec 2022 14:30:30 +0100 Subject: [PATCH 04/12] Product Query: Adjust layout of the Minimal Product Row pattern --- patterns/product-query-minimal-product-row.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patterns/product-query-minimal-product-row.php b/patterns/product-query-minimal-product-row.php index f50ca25469f..bb8af666a7b 100644 --- a/patterns/product-query-minimal-product-row.php +++ b/patterns/product-query-minimal-product-row.php @@ -6,8 +6,8 @@ * Block Types: core/query/woocommerce/product-query */ ?> - -
+ +
From d63c642a944a14018aa9444e5ec512f955f6427a Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 6 Dec 2022 16:17:51 +0100 Subject: [PATCH 05/12] Product Query: Update pattern names --- ...query-1-1-image-4-column-products-row.php} | 0 .../product-query-3-column-product-row.php | 33 +++++++++++++++++++ ...=> product-query-4-column-product-row.php} | 4 +-- ...uct-query-large-image-product-gallery.php} | 4 +-- ...t-query-minimal-5-column-products-row.php} | 4 +-- ....php => product-query-product-gallery.php} | 4 +-- ...uct-query-product-list-with-1-1-images.php | 2 +- ...uct-list-with-full-product-description.php | 2 +- 8 files changed, 43 insertions(+), 10 deletions(-) rename patterns/{product-query-4-column-featured-products.php => product-query-1-1-image-4-column-products-row.php} (100%) create mode 100644 patterns/product-query-3-column-product-row.php rename patterns/{product-query-featured-product-row.php => product-query-4-column-product-row.php} (93%) rename patterns/{product-query-large-product-grid.php => product-query-large-image-product-gallery.php} (90%) rename patterns/{product-query-minimal-product-row.php => product-query-minimal-5-column-products-row.php} (92%) rename patterns/{product-query-featured-product-gallery.php => product-query-product-gallery.php} (93%) diff --git a/patterns/product-query-4-column-featured-products.php b/patterns/product-query-1-1-image-4-column-products-row.php similarity index 100% rename from patterns/product-query-4-column-featured-products.php rename to patterns/product-query-1-1-image-4-column-products-row.php diff --git a/patterns/product-query-3-column-product-row.php b/patterns/product-query-3-column-product-row.php new file mode 100644 index 00000000000..fe572adf61d --- /dev/null +++ b/patterns/product-query-3-column-product-row.php @@ -0,0 +1,33 @@ + + +
+ + + + + + + + + + + + + + + + + + + +

+ +
+ diff --git a/patterns/product-query-featured-product-row.php b/patterns/product-query-4-column-product-row.php similarity index 93% rename from patterns/product-query-featured-product-row.php rename to patterns/product-query-4-column-product-row.php index e2880eb3909..8db6a7e5fc7 100644 --- a/patterns/product-query-featured-product-row.php +++ b/patterns/product-query-4-column-product-row.php @@ -1,7 +1,7 @@ Date: Thu, 8 Dec 2022 00:06:08 +0100 Subject: [PATCH 06/12] Product Query: Polish spaces between blocks inside the patterns --- assets/css/style.scss | 3 ++- assets/js/atomic/blocks/product-elements/button/style.scss | 4 ++-- patterns/product-query-3-column-product-row.php | 2 +- patterns/product-query-large-image-product-gallery.php | 2 +- patterns/product-query-minimal-product-list.php | 4 ++-- patterns/product-query-product-gallery.php | 4 ++-- patterns/product-query-product-list-with-1-1-images.php | 4 ++-- ...uct-query-product-list-with-full-product-description.php | 6 +++--- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/assets/css/style.scss b/assets/css/style.scss index 00430e66f0c..1650e180e16 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -49,7 +49,8 @@ .wp-block-button__link { word-break: break-word; white-space: normal; - margin: 0 auto !important; + margin-right: auto !important; + margin-left: auto !important; display: inline-flex; justify-content: center; text-align: center; diff --git a/assets/js/atomic/blocks/product-elements/button/style.scss b/assets/js/atomic/blocks/product-elements/button/style.scss index fa0f8732255..bf931c879b1 100644 --- a/assets/js/atomic/blocks/product-elements/button/style.scss +++ b/assets/js/atomic/blocks/product-elements/button/style.scss @@ -1,7 +1,6 @@ .wp-block-button.wc-block-components-product-button { word-break: break-word; white-space: normal; - margin-top: 0; margin-bottom: $gap-small; .wc-block-components-product-button__button { @@ -10,7 +9,8 @@ font-family: inherit; font-weight: inherit; justify-content: center; - margin: 0 auto; + margin-right: auto; + margin-left: auto; white-space: normal; word-break: break-word; } diff --git a/patterns/product-query-3-column-product-row.php b/patterns/product-query-3-column-product-row.php index fe572adf61d..60fb660d797 100644 --- a/patterns/product-query-3-column-product-row.php +++ b/patterns/product-query-3-column-product-row.php @@ -12,7 +12,7 @@ - + diff --git a/patterns/product-query-large-image-product-gallery.php b/patterns/product-query-large-image-product-gallery.php index 6747d486dfd..96d9f5f34c9 100644 --- a/patterns/product-query-large-image-product-gallery.php +++ b/patterns/product-query-large-image-product-gallery.php @@ -10,7 +10,7 @@
- + diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php index 98e190c94e9..084d26f3ea7 100644 --- a/patterns/product-query-minimal-product-list.php +++ b/patterns/product-query-minimal-product-list.php @@ -14,9 +14,9 @@ -
+
- +
diff --git a/patterns/product-query-product-gallery.php b/patterns/product-query-product-gallery.php index a62f930c987..d93e941d5aa 100644 --- a/patterns/product-query-product-gallery.php +++ b/patterns/product-query-product-gallery.php @@ -12,9 +12,9 @@ - + - + diff --git a/patterns/product-query-product-list-with-1-1-images.php b/patterns/product-query-product-list-with-1-1-images.php index 90b016addde..06e9845cfc3 100644 --- a/patterns/product-query-product-list-with-1-1-images.php +++ b/patterns/product-query-product-list-with-1-1-images.php @@ -16,9 +16,9 @@
- + - + diff --git a/patterns/product-query-product-list-with-full-product-description.php b/patterns/product-query-product-list-with-full-product-description.php index f33124d6650..1ea653c1c44 100644 --- a/patterns/product-query-product-list-with-full-product-description.php +++ b/patterns/product-query-product-list-with-full-product-description.php @@ -14,13 +14,13 @@ -
+
- + - + From 37b456e6ea27468fc718dd17aa173b084fffb1e6 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 12:13:07 +0100 Subject: [PATCH 07/12] Product Query patterns: Link product titles and improve spacing between product elements --- assets/js/atomic/blocks/product-elements/button/supports.ts | 1 + patterns/product-query-1-1-image-4-column-products-row.php | 6 +++--- patterns/product-query-3-column-product-row.php | 2 +- patterns/product-query-4-column-product-row.php | 4 ++-- patterns/product-query-large-image-product-gallery.php | 2 +- patterns/product-query-minimal-5-column-products-row.php | 2 +- patterns/product-query-minimal-product-list.php | 2 +- patterns/product-query-product-gallery.php | 2 +- patterns/product-query-product-list-with-1-1-images.php | 2 +- ...uct-query-product-list-with-full-product-description.php | 4 ++-- src/BlockTypes/ProductButton.php | 2 +- 11 files changed, 15 insertions(+), 14 deletions(-) diff --git a/assets/js/atomic/blocks/product-elements/button/supports.ts b/assets/js/atomic/blocks/product-elements/button/supports.ts index 6e5ade74b73..df0be2fb742 100644 --- a/assets/js/atomic/blocks/product-elements/button/supports.ts +++ b/assets/js/atomic/blocks/product-elements/button/supports.ts @@ -22,6 +22,7 @@ export const supports = { }, ...( hasSpacingStyleSupport() && { spacing: { + margin: true, padding: true, __experimentalSkipSerialization: true, }, diff --git a/patterns/product-query-1-1-image-4-column-products-row.php b/patterns/product-query-1-1-image-4-column-products-row.php index 03e86fac086..2dfa855f106 100644 --- a/patterns/product-query-1-1-image-4-column-products-row.php +++ b/patterns/product-query-1-1-image-4-column-products-row.php @@ -1,7 +1,7 @@ - + diff --git a/patterns/product-query-3-column-product-row.php b/patterns/product-query-3-column-product-row.php index 60fb660d797..d225edd7eb2 100644 --- a/patterns/product-query-3-column-product-row.php +++ b/patterns/product-query-3-column-product-row.php @@ -12,7 +12,7 @@ - + diff --git a/patterns/product-query-4-column-product-row.php b/patterns/product-query-4-column-product-row.php index 8db6a7e5fc7..772d0cb1320 100644 --- a/patterns/product-query-4-column-product-row.php +++ b/patterns/product-query-4-column-product-row.php @@ -10,7 +10,7 @@
- +
@@ -18,7 +18,7 @@
- + diff --git a/patterns/product-query-large-image-product-gallery.php b/patterns/product-query-large-image-product-gallery.php index 96d9f5f34c9..d5093b7ae76 100644 --- a/patterns/product-query-large-image-product-gallery.php +++ b/patterns/product-query-large-image-product-gallery.php @@ -10,7 +10,7 @@
- + diff --git a/patterns/product-query-minimal-5-column-products-row.php b/patterns/product-query-minimal-5-column-products-row.php index ce0038de950..1046ed23b75 100644 --- a/patterns/product-query-minimal-5-column-products-row.php +++ b/patterns/product-query-minimal-5-column-products-row.php @@ -12,7 +12,7 @@
-
+
diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php index 084d26f3ea7..31460ee16c1 100644 --- a/patterns/product-query-minimal-product-list.php +++ b/patterns/product-query-minimal-product-list.php @@ -16,7 +16,7 @@
- +
diff --git a/patterns/product-query-product-gallery.php b/patterns/product-query-product-gallery.php index d93e941d5aa..3cbf4e901c5 100644 --- a/patterns/product-query-product-gallery.php +++ b/patterns/product-query-product-gallery.php @@ -12,7 +12,7 @@ - + diff --git a/patterns/product-query-product-list-with-1-1-images.php b/patterns/product-query-product-list-with-1-1-images.php index 06e9845cfc3..1d3e047054b 100644 --- a/patterns/product-query-product-list-with-1-1-images.php +++ b/patterns/product-query-product-list-with-1-1-images.php @@ -16,7 +16,7 @@
- + diff --git a/patterns/product-query-product-list-with-full-product-description.php b/patterns/product-query-product-list-with-full-product-description.php index 1ea653c1c44..1a0329c8f01 100644 --- a/patterns/product-query-product-list-with-full-product-description.php +++ b/patterns/product-query-product-list-with-full-product-description.php @@ -16,9 +16,9 @@
- + - + diff --git a/src/BlockTypes/ProductButton.php b/src/BlockTypes/ProductButton.php index 96842f78697..495ef21ab47 100644 --- a/src/BlockTypes/ProductButton.php +++ b/src/BlockTypes/ProductButton.php @@ -88,7 +88,7 @@ protected function render( $attributes, $content, $block ) { if ( $product ) { $cart_redirect_after_add = get_option( 'woocommerce_cart_redirect_after_add' ) === 'yes'; $html_element = ( ! $product->has_options() && $product->is_purchasable() && $product->is_in_stock() && ! $cart_redirect_after_add ) ? 'button' : 'a'; - $styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array( 'border_radius', 'font_size', 'font_weight', 'padding', 'text_color' ) ); + $styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array( 'border_radius', 'font_size', 'font_weight', 'margin', 'padding', 'text_color' ) ); $text_align_styles_and_classes = StyleAttributesUtils::get_text_align_class_and_style( $attributes ); return apply_filters( From 159c69a0828fe69da4239a7f640e49effe4cf770 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 12:30:22 +0100 Subject: [PATCH 08/12] Product Query patterns: Button font-size update --- patterns/product-query-1-1-image-4-column-products-row.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/product-query-1-1-image-4-column-products-row.php b/patterns/product-query-1-1-image-4-column-products-row.php index 2dfa855f106..83dee54949d 100644 --- a/patterns/product-query-1-1-image-4-column-products-row.php +++ b/patterns/product-query-1-1-image-4-column-products-row.php @@ -14,7 +14,7 @@ - + From f9c1024811594fe45964409bff6f2a8eb2f0a584 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 12:58:39 +0100 Subject: [PATCH 09/12] Product Query patterns: Center the pagination --- patterns/product-query-1-1-image-4-column-products-row.php | 2 +- patterns/product-query-3-column-product-row.php | 2 +- patterns/product-query-4-column-product-row.php | 2 +- patterns/product-query-large-image-product-gallery.php | 2 +- patterns/product-query-minimal-5-column-products-row.php | 2 +- patterns/product-query-minimal-product-list.php | 2 +- patterns/product-query-product-gallery.php | 2 +- patterns/product-query-product-list-with-1-1-images.php | 2 +- ...product-query-product-list-with-full-product-description.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/patterns/product-query-1-1-image-4-column-products-row.php b/patterns/product-query-1-1-image-4-column-products-row.php index 83dee54949d..d8742e50a14 100644 --- a/patterns/product-query-1-1-image-4-column-products-row.php +++ b/patterns/product-query-1-1-image-4-column-products-row.php @@ -17,7 +17,7 @@ - + diff --git a/patterns/product-query-3-column-product-row.php b/patterns/product-query-3-column-product-row.php index d225edd7eb2..54a80f098eb 100644 --- a/patterns/product-query-3-column-product-row.php +++ b/patterns/product-query-3-column-product-row.php @@ -17,7 +17,7 @@ - + diff --git a/patterns/product-query-4-column-product-row.php b/patterns/product-query-4-column-product-row.php index 772d0cb1320..e363b577415 100644 --- a/patterns/product-query-4-column-product-row.php +++ b/patterns/product-query-4-column-product-row.php @@ -21,7 +21,7 @@ - + diff --git a/patterns/product-query-large-image-product-gallery.php b/patterns/product-query-large-image-product-gallery.php index d5093b7ae76..5864e0efee1 100644 --- a/patterns/product-query-large-image-product-gallery.php +++ b/patterns/product-query-large-image-product-gallery.php @@ -15,7 +15,7 @@ - + diff --git a/patterns/product-query-minimal-5-column-products-row.php b/patterns/product-query-minimal-5-column-products-row.php index 1046ed23b75..7b6eea53265 100644 --- a/patterns/product-query-minimal-5-column-products-row.php +++ b/patterns/product-query-minimal-5-column-products-row.php @@ -21,7 +21,7 @@ - + diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php index 31460ee16c1..ca6af807320 100644 --- a/patterns/product-query-minimal-product-list.php +++ b/patterns/product-query-minimal-product-list.php @@ -35,7 +35,7 @@
- + diff --git a/patterns/product-query-product-gallery.php b/patterns/product-query-product-gallery.php index 3cbf4e901c5..5610d046ab5 100644 --- a/patterns/product-query-product-gallery.php +++ b/patterns/product-query-product-gallery.php @@ -19,7 +19,7 @@ - + diff --git a/patterns/product-query-product-list-with-1-1-images.php b/patterns/product-query-product-list-with-1-1-images.php index 1d3e047054b..ffb60f0a4ed 100644 --- a/patterns/product-query-product-list-with-1-1-images.php +++ b/patterns/product-query-product-list-with-1-1-images.php @@ -39,7 +39,7 @@
- + diff --git a/patterns/product-query-product-list-with-full-product-description.php b/patterns/product-query-product-list-with-full-product-description.php index 1a0329c8f01..578d99b0127 100644 --- a/patterns/product-query-product-list-with-full-product-description.php +++ b/patterns/product-query-product-list-with-full-product-description.php @@ -49,7 +49,7 @@
- + From 30ac72a9644784d486d70ab088b4e42f68a9c100 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 13:33:14 +0100 Subject: [PATCH 10/12] Product Query patterns: Center the pagination for the default pattern --- assets/js/blocks/product-query/constants.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/js/blocks/product-query/constants.ts b/assets/js/blocks/product-query/constants.ts index db842cb4454..dc5b73a7cea 100644 --- a/assets/js/blocks/product-query/constants.ts +++ b/assets/js/blocks/product-query/constants.ts @@ -99,6 +99,15 @@ export const INNER_BLOCKS_TEMPLATE: InnerBlockTemplate[] = [ ], ], ], - [ 'core/query-pagination' ], + [ + 'core/query-pagination', + { + layout: { + type: 'flex', + justifyContent: 'center', + }, + }, + [], + ], [ 'core/query-no-results' ], ]; From b12127df7b29c30cb11bbecd98f128dae0ecc4dc Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 13:43:13 +0100 Subject: [PATCH 11/12] Product Query patterns: Remove an empty column --- patterns/product-query-minimal-product-list.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/patterns/product-query-minimal-product-list.php b/patterns/product-query-minimal-product-list.php index ca6af807320..99f6a061742 100644 --- a/patterns/product-query-minimal-product-list.php +++ b/patterns/product-query-minimal-product-list.php @@ -23,18 +23,6 @@ - -
-
-

-
- - - -
-
- - From 0d34a5d4ad9d443661481505df5378fd721e9000 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Tue, 13 Dec 2022 13:49:43 +0100 Subject: [PATCH 12/12] Product Query patterns: Remove an empty column from the product list with 1:1 images pattern --- .../product-query-product-list-with-1-1-images.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/patterns/product-query-product-list-with-1-1-images.php b/patterns/product-query-product-list-with-1-1-images.php index ffb60f0a4ed..140123d4a62 100644 --- a/patterns/product-query-product-list-with-1-1-images.php +++ b/patterns/product-query-product-list-with-1-1-images.php @@ -27,18 +27,6 @@ - -
-
-

-
- - - -
-
- -