From 5b7e6e91d56a6e84d586b613812d396719a0876b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Mon, 30 Oct 2023 15:36:05 +0100 Subject: [PATCH 1/3] Simplify the pattern design --- patterns/hero-product-3-split.php | 155 +++++++++++++++--------------- src/Patterns/dictionary.json | 18 +--- 2 files changed, 82 insertions(+), 91 deletions(-) diff --git a/patterns/hero-product-3-split.php b/patterns/hero-product-3-split.php index 6b07c3445d6..932688faf2d 100644 --- a/patterns/hero-product-3-split.php +++ b/patterns/hero-product-3-split.php @@ -6,104 +6,107 @@ */ use Automattic\WooCommerce\Blocks\Patterns\PatternsHelper; + $content = PatternsHelper::get_pattern_content( 'woocommerce-blocks/hero-product-3-split' ); $images = PatternsHelper::get_pattern_images( 'woocommerce-blocks/hero-product-3-split' ); -$first_title = $content['titles'][0]['default'] ?? ''; -$second_title = $content['titles'][1]['default'] ?? ''; -$third_title = $content['titles'][2]['default'] ?? ''; -$fourth_title = $content['titles'][3]['default'] ?? ''; -$fifth_title = $content['titles'][4]['default'] ?? ''; +$main_title = $content['titles'][0]['default'] ?? ''; +$first_title = $content['titles'][1]['default'] ?? ''; +$second_title = $content['titles'][2]['default'] ?? ''; +$third_title = $content['titles'][3]['default'] ?? ''; $first_description = $content['descriptions'][0]['default'] ?? ''; $second_description = $content['descriptions'][1]['default'] ?? ''; $third_description = $content['descriptions'][2]['default'] ?? ''; -$fourth_description = $content['descriptions'][3]['default'] ?? ''; -$fifth_description = $content['descriptions'][4]['default'] ?? ''; ?> - -
- -
- -
-
- -
- -

- - - -

- - - -
- -
- -
- -
- -
- + +
+
+ +
+ + <?php esc_attr_e( 'Placeholder image used to represent a product being showcased.', 'woo-gutenberg-products-block' ); ?> +
+ +

+
-
- <?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section.', 'woo-gutenberg-products-block' ); ?> -
- +
- -
- -

- - - -

- - - -
- + +
+ +
+ +

+ + + +
+ +
+ +
+ - -

- + +

+ +
+ - -

- + +
+ - -
- + +
+ +
+ - -

- + +

+ +
+ - -

- + +
+ - -
- + +
+ +
+ - -

- + +

+ +
+ +
+ - -

- + +
+
+ Shop now +
+ +
+ +
+
diff --git a/src/Patterns/dictionary.json b/src/Patterns/dictionary.json index 19f8a167466..931a3f4fa3f 100644 --- a/src/Patterns/dictionary.json +++ b/src/Patterns/dictionary.json @@ -131,7 +131,7 @@ "content": { "titles": [ { - "default": "Endless Tee's", + "default": "New in: 3-in-1 parka", "ai_prompt": "An impact phrase that advertises the displayed product: {image.0}" }, { @@ -145,32 +145,20 @@ { "default": "Durable Fabric", "ai_prompt": "A title describing the third displayed product feature" - }, - { - "default": "Sustainable Dyes", - "ai_prompt": "A title describing the fourth displayed product feature" } ], "descriptions": [ - { - "default": "With high-quality materials and expert craftsmanship, our products are built to last and exceed your expectations.", - "ai_prompt": "A description of the product" - }, { "default": "Never worry about the weather again. Keep yourself dry, warm, and looking stylish.", "ai_prompt": "A description of the first displayed product feature" }, { - "default": "Our products are made with expert craftsmanship and attention to detail, ensuring that every stitch and seam is perfect.", + "default": "Our products are made with expert craftsmanship and attention to detail.", "ai_prompt": "A description of the second displayed product feature" }, { - "default": "We use only the highest-quality materials in our products, ensuring that they look great and last for years to come.", + "default": "We use only the highest-quality materials in our products, ensuring that they look great.", "ai_prompt": "A description of the third displayed product feature" - }, - { - "default": "From bold prints and colors to intricate details and textures, our products are a perfect combination of style and function.", - "ai_prompt": "A description of the fourth displayed product feature" } ] } From 10821d055989e4641c7cf76c3012fcd04059c352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Mon, 30 Oct 2023 18:08:11 +0100 Subject: [PATCH 2/3] Add char limits to the AI generated content --- src/Patterns/dictionary.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Patterns/dictionary.json b/src/Patterns/dictionary.json index 931a3f4fa3f..ee68e302842 100644 --- a/src/Patterns/dictionary.json +++ b/src/Patterns/dictionary.json @@ -132,33 +132,33 @@ "titles": [ { "default": "New in: 3-in-1 parka", - "ai_prompt": "An impact phrase that advertises the displayed product: {image.0}" + "ai_prompt": "An impact phrase that advertises the displayed product: {image.0}. The title must have less than 30 characters" }, { "default": "Waterproof Membrane", - "ai_prompt": "A title describing the first displayed product feature" + "ai_prompt": "A title describing the first displayed product feature. The title must have only 2 or 3 words." }, { "default": "Expert Craftsmanship", - "ai_prompt": "A title describing the second displayed product feature" + "ai_prompt": "A title describing the second displayed product feature. The title must have only 2 or 3 words." }, { "default": "Durable Fabric", - "ai_prompt": "A title describing the third displayed product feature" + "ai_prompt": "A title describing the third displayed product feature. The title must have only 2 or 3 words." } ], "descriptions": [ { "default": "Never worry about the weather again. Keep yourself dry, warm, and looking stylish.", - "ai_prompt": "A description of the first displayed product feature" + "ai_prompt": "A description of the first displayed product feature. The description must have less than 120 characters." }, { "default": "Our products are made with expert craftsmanship and attention to detail.", - "ai_prompt": "A description of the second displayed product feature" + "ai_prompt": "A description of the second displayed product feature. The description must have less than 120 characters." }, { "default": "We use only the highest-quality materials in our products, ensuring that they look great.", - "ai_prompt": "A description of the third displayed product feature" + "ai_prompt": "A description of the third displayed product feature. The description must have less than 120 characters." } ] } From 197e3c20ee933b0f4ecf32b95e5de5f0c3a8f5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Tue, 31 Oct 2023 08:19:07 +0100 Subject: [PATCH 3/3] Fix url --- patterns/hero-product-3-split.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/hero-product-3-split.php b/patterns/hero-product-3-split.php index 932688faf2d..0b56f1b9ccb 100644 --- a/patterns/hero-product-3-split.php +++ b/patterns/hero-product-3-split.php @@ -23,7 +23,7 @@
- +