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

Commit

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

* Do a version bump to 11.4.1

* Add Instruction Notes and update the Changelog

* Update the testing instructions and the changelog and the .zip link

* Empty commit for release pull request

* Remove the fontSize for the button (#11433)

* [Store Customization MVP] Ensure the AI-generated content in patterns is updated on plugin update (#11210)

* Update the patterns content after updating the plugin

* Remove unused variable and use statement

* Schedule action for updating the patterns content on plugin update (for both WooCommerce and WooCommerce Blocks.)

* Update condition to remove the plugin folder name

* Remove the update function from bootstrap.php

* Remove unused use

* Fix the condition, since $options['plugin'] is an array

* Remove pattern file

This was left empty by mistake in a merge, we need to remove the file or we get an error

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Fix outer space and title (#11434)

* Store Customization > Update products with AI generated content (#11155)

* Introduce the ProductUpdater class.

* Update the image assignment for the default products content.

* Update the default products content.

* Introduce the generate_content and get_placeholder_products methods.

* Update the get_placeholder_products method and introduce the new create_new_product method.

* Verify the hash of the product content and compare it with the hash of the ai generated content to ensure we wont override products modified by the store owner.

* Add docblocks and update the structure for the ProductUpdater class.

* Pass the vertical images as a param for the PatternUpdater and the ProductUpdater.

* Update the provided variable to the PatternUpdater class.

* Update the ProductUpdater class to include the requirements for usage of the media_sideload_image method outside the wp-admin area (via API) and other adjustments to the products generation and hashes

* remove unnecessary calls to post/product images.

* Update the loop for generating products.

* Further adjustments to the Product Updater.

* Provide the business_description as a param for the generate_content ProductUpdates

* Update the default timeout for the AI connection; update the path to the default image. Add a limit of 6 when quering the total products created by the store owner.

* Add new neutral placeholder images for products and patterns.

* Update the prompt and the logic for the placeholder images.

* Remove placeholder images.

* Increase max execution time

* Update the products query.

* Move the media_sideload_image function dependencies to outside of the loop and add comment.

* Update text content.

* Address code review.

* bail early if no business description provided.

* Add an extra safety check in case of query errors.

* Address CR.

* Patterns > Upload optimized version of placeholder image (#11441)

* Improve vars name and remove duplicated user name (#11430)

* Add overlay with 30% opacity (#11428)

* [Store Customization] Update the "Footer with 3 Menus" (#11379)

* Fix search bar, spacing and show text in one line

* Set site log width

* Adjust margins and search bar

* Make the search bar fill space on mobile

* Update column sizes

* Remove width from site logo

* [CYS Woo Express] Update large footer (#11413)

* Update large footer

* Update space between icons

* Remove with from site logo

* update changelog and testing instructions

* bump to 11.4.2 version

* [CYS Woo Express] Fix essential header (#11449)

* Fix essential header

* Fix spacing

* update testing instructions

* Make groups to adapt better to mobile views (#11463)

* update testing instructions and changelog

* Unify the search bar layout across patterns (#11445)

* Unify the search bar layout across patterns

* restore changes

* [CYS Woo Express] Footer with simple menu and cart (#11409)

* Update footer simple menu cart

* Change structure to use rows not columns

* Make search fill space

* Fix spacing and switch mini-cart and menu

* Unify the search bar

* Remove mini cart

* update testing instructions and changelog

* Store Customization > Fetch product images from the Pexels API (#11280)

* Introduce the ProductUpdater class.

* Update the image assignment for the default products content.

* Update the default products content.

* Introduce the generate_content and get_placeholder_products methods.

* Update the get_placeholder_products method and introduce the new create_new_product method.

* Verify the hash of the product content and compare it with the hash of the ai generated content to ensure we wont override products modified by the store owner.

* Add docblocks and update the structure for the ProductUpdater class.

* Pass the vertical images as a param for the PatternUpdater and the ProductUpdater.

* Update the provided variable to the PatternUpdater class.

* Update the ProductUpdater class to include the requirements for usage of the media_sideload_image method outside the wp-admin area (via API) and other adjustments to the products generation and hashes

* remove unnecessary calls to post/product images.

* Update the loop for generating products.

* Further adjustments to the Product Updater.

* Provide the business_description as a param for the generate_content ProductUpdates

* Update the default timeout for the AI connection; update the path to the default image. Add a limit of 6 when quering the total products created by the store owner.

* Add new neutral placeholder images for products and patterns.

* Update the prompt and the logic for the placeholder images.

* Remove placeholder images.

* Pass the AI connection as a param and update the get_images_for_pattern method to rely on the results returned from the Pexels API.

* update the product updater class to rely on Pexels images and add the ai_connection as a param.

* Remove the unused get_random_images method.

* Update the patterns endpoint.

* Delete unused ChatGPTClient class.

* Introduce the new Pexels class.

* Remove the Verticals references.

* Update the reference for the alt description for images.

* Update the scheduled action to populate patterns and products.

* Remove unused Verticals classes.

* Ensure the Pexels class already returns the array with the expected format for assignment to Patterns and Products.

* Introduce the select_image_src_based_on_format method.

* Increase max execution time

* Increase max execution time

* Update the request to rely on the WP.com external-media endpoint instead.

* Improve performance for product content update.

* Improve quality of images used in products and update queries.

* Update the products query.

* Move the media_sideload_image function dependencies to outside of the loop and add comment.

* Update text content.

* Merge base branch

* Introduce the should_update_dummy_product method.

* Update the method to be triggered on scheduled action to return true.

* Change the image format for products to improve performance.

* Make portrait the default fallback image format.

* Address code review.

* bail early if no business description provided.

* Add an extra safety check in case of query errors.

* Address CR.

* Raise the default memory limit.

* Update the prompt for the search term for images.

* Make sure the 'woocommerce_blocks_allow_ai_connection' option is set to true if the site is connected to AI.

* Update the prompt for AI generated content in patterns and initialize the images and alts for the patterns.

* Update the prompt for products and introduce the update_dummy_products method.

* Update the default number of images returned by Pexels.

* Update the default fallback for the expected image format.

* Update the prompt for selecting the images.

* Add a character limit to the testimonials.

* Increase timeout to fetch products data

* Address code review.

* update changelog

* add zip link

* fix markdown

* remove duplicate testing instructions

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
Co-authored-by: Luigi <gigitux@gmail.com>
  • Loading branch information
7 people authored Oct 26, 2023
1 parent eb5b16e commit ecb0f51
Show file tree
Hide file tree
Showing 31 changed files with 1,001 additions and 506 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"version": "11.4.0",
"version": "11.4.2",
"keywords": [
"gutenberg",
"woocommerce",
Expand Down
13 changes: 13 additions & 0 deletions docs/internal-developers/testing/releases/1141.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Testing notes and ZIP for release 11.4.1

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

## WooCommerce Core

### Bug Fixes

#### Regenerate package

1. Add a new post.
2. Add the All Products block.
3. Make sure there are no errors in the editor or the page.
123 changes: 123 additions & 0 deletions docs/internal-developers/testing/releases/1142.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Testing notes and ZIP for release 11.4.2

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

## WooCommerce Core

### Enhancements

#### Improve the button size on the "Product Collection 4 Column" pattern. [11433](https://github.com/woocommerce/woocommerce-blocks/pull/11433)

1. Create a new page or post.
2. Insert the `Product Collection 4 Column` pattern.
3. Check the `Add to cart` buttons look like in the after screenshot below.

| Before | After |
| ------ | ----- |
| <img width="1201" alt="Screenshot 2023-10-24 at 15 53 25" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/cc60d499-51b9-4a12-8f11-6c346eb41ce8"> | <img width="1197" alt="Screenshot 2023-10-24 at 15 53 01" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/a1735c13-f701-46e4-bbe0-b2b2eff275bf"> |

#### Improve the "Minimal header" pattern spacing and title. [11434](https://github.com/woocommerce/woocommerce-blocks/pull/11434)

1. Create a new page or post and insert the `Minimal header` pattern.
2. Check it matches the screenshot below.

| Mobile |
| ------ |
| <img width="405" alt="Screenshot 2023-10-24 at 16 50 08" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/5e124511-6098-4bc2-a381-9714e254a692"> |

| Desktop |
| ------ |
| <img width="1374" alt="Screenshot 2023-10-24 at 16 49 43" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/2c58a2ca-d270-4145-b1f6-19aa9a884a52"> |

### Improve the Testimonials 3 columns pattern. [11430](https://github.com/woocommerce/woocommerce-blocks/pull/11430)

1. Create a new page or post.
2. Insert the `Testimonials 3 columns` pattern.
3. Check the reviewer names are not duplicated.

| Before | After |
| ------ | ----- |
| <img width="1207" alt="Screenshot 2023-10-24 at 14 38 29" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/7c4a1f75-4eb1-4d7a-a38c-6e30d5649c18">| <img width="1201" alt="Screenshot 2023-10-24 at 14 37 42" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/8a967999-b16a-47f5-96ce-3d3b4c92a67e"> |

### Add overlay to the "Featured Category Triple" pattern. [11428](https://github.com/woocommerce/woocommerce-blocks/pull/11428)

1. Create a new page or post.
2. Insert the `Featured Category Triple` pattern.
3. Check each of the images have an overlay with 30% opacity.

| Before | After |
| ------ | ----- |
| <img width="967" alt="Screenshot 2023-10-24 at 14 14 29" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/91f35822-4ca3-4f11-9402-ba93ae80db5e"> | <img width="969" alt="Screenshot 2023-10-24 at 14 14 09" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/f460edf5-7659-4cc0-8d10-b4ae12dd1cd3"> |

### Improve the "Footer with 3 Menus" pattern. [11379](https://github.com/woocommerce/woocommerce-blocks/pull/11379)

1. Create a new page or post.
2. Insert the `Footer with 3 menus` pattern.
3. Check that it looks like the design.

| Desktop |
| ------ |
| <img width="1397" alt="Screenshot 2023-10-23 at 16 32 48" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/747643d2-7548-41d9-8ce1-8f91bcd1c171">|

| Mobile |
| ------ |
|<img width="334" alt="CleanShot 2023-10-23 at 16 33 30@2x" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/1d94f1ed-dad7-4b9b-ad9c-432acb16c2c2"> |

### Update the "Large footer" pattern. [11413](https://github.com/woocommerce/woocommerce-blocks/pull/11413)

1. Create a new page or post.
2. Insert the `Large Footer` pattern.
3. Check that it looks like the design.

| Desktop |
| ------ |
| <img width="1382" alt="Screenshot 2023-10-23 at 14 52 19" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/3ff9a4ff-f051-4023-9cb7-faf13da68062"> |

| Mobile |
| ------ |
| <img width="342" alt="Screenshot 2023-10-23 at 14 54 43" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/2926804a-8616-4d67-ae1c-e1340c814030"> |

### Improve the "Essential Header". [11449](https://github.com/woocommerce/woocommerce-blocks/pull/11449)

1. Create a new page or post and insert the `Essential Header`.
2. Check it looks like the video below.

<video src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/fc3ba66b-1f9e-4cd2-96b1-c59f2aba1e80" />

### Improve the mobile view for the Minimal header pattern. [11463](https://github.com/woocommerce/woocommerce-blocks/pull/11463)

1. Create a new page or post and insert the `Minimal header` pattern.
2. Check the mobile view looks like the after screenshot below.

| Before | After |
| ------ | ----- |
| <img width="376" alt="Screenshot 2023-10-26 at 11 47 05" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/c1caac6a-c8d6-4144-8978-fe8c75fdd915"> | <img width="379" alt="Screenshot 2023-10-26 at 11 46 46" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/232cc433-a4ba-49b8-912f-bb53e2124713"> |

### Update the Footer with simple menu and cart pattern. [11409](https://github.com/woocommerce/woocommerce-blocks/pull/11409)

1. Create a new page or post.
2. Insert the `Footer with simple menu and cart` pattern.
3. Check that it looks like the design.

<img width="1752" alt="Screenshot 2023-10-24 at 10 50 05" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/a4118ee8-4c86-49d7-bd69-2402a000a4e2">
<img width="537" alt="Screenshot 2023-10-24 at 10 51 13" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/28f69a93-41d0-4272-8766-5fda5a15e0b6">
<img width="383" alt="Screenshot 2023-10-24 at 10 51 21" src="https://github.com/woocommerce/woocommerce-blocks/assets/186112/2e762e03-1928-4325-97fa-910408029cb2">



## Should be tested by the development team exclusively

### Update the patterns content after a plugin update. [11210](https://github.com/woocommerce/woocommerce-blocks/pull/11210)

1. Create a Jurassic Ninja site with WooCommerce.
2. Connect JetPack.
3. Install the plugin zip from this PR (<https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-11210.zip>)
5. Install the [woo-ai](https://github.com/woocommerce/woocommerce-blocks/files/12882468/woo-ai.zip) plugin.
6. Go to your store `/wp-admin/admin.php?page=wc-settings&tab=advanced&section=features` and enter a description for your store (like `A store selling books and magazines`).

#### Simulating plugin update

1. Go to the file editor and in WooCommerce Blocks plugin, in the `woocommerce-gutenberg-products-block.php` file modify the `woocommerce-gutenberg-products-block.php` plugin file and change the `* Version: 11.4.0-dev` comment to some lower version `* Version: 10`.
2. Go to your store plugin's page, you should see the `WooCommerce Blocks` plugin with the version you just changed and a message to update the plugin.
3. Click on it to update the plugin.
4. Go to the Scheduled Actions and make sure a new `woocommerce_update_patterns_content` action is scheduled.
3 changes: 3 additions & 0 deletions docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ Every release includes specific testing instructions for new features and bug fi
- [11.3.0](./1130.md)
- [11.3.1](./1131.md)
- [11.4.0](./1140.md)
- [11.4.1](./1141.md)
- [11.4.2](./1142.md)


<!-- FEEDBACK -->

Expand Down
Binary file modified images/pattern-placeholders/plant-in-vase.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "11.4.0",
"version": "11.4.2",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
12 changes: 6 additions & 6 deletions patterns/featured-category-triple.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<div class="wp-block-columns alignwide" style="margin-top:0px;margin-bottom:80px;padding-top:0;padding-right:var(--wp--preset--spacing--30);padding-bottom:0;padding-left:var(--wp--preset--spacing--30)">
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:cover {"url":"<?php echo esc_url( $image1 ); ?>","id":1,"dimRatio":0,"contentPosition":"bottom center","isDark":false,"style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<!-- wp:cover {"url":"<?php echo esc_url( $image1 ); ?>","id":1,"dimRatio":30,"overlayColor":"contrast","isUserOverlayColor":true,"contentPosition":"bottom center","style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<div class="wp-block-cover is-light has-custom-content-position is-position-bottom-center has-white-color" style="padding-bottom:56px">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim-30 has-background-dim"></span>
<img class="wp-block-cover__image-background wp-image-1" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in featured categories banner. 1 out of 3.', 'woo-gutenberg-products-block' ); ?>" src="<?php echo esc_url( $image1 ); ?>" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"margin":{"bottom":"24px"}}}} -->
Expand All @@ -43,9 +43,9 @@

<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:cover {"url":"<?php echo esc_url( $image2 ); ?>","id":1,"dimRatio":0,"contentPosition":"bottom center","isDark":false,"style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<!-- wp:cover {"url":"<?php echo esc_url( $image2 ); ?>","id":1,"dimRatio":30,"overlayColor":"contrast","isUserOverlayColor":true,"contentPosition":"bottom center","style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<div class="wp-block-cover is-light has-custom-content-position is-position-bottom-center has-white-color" style="padding-bottom:56px">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim-30 has-background-dim"></span>
<img class="wp-block-cover__image-background wp-image-1" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in featured categories banner. 2 out of 3.', 'woo-gutenberg-products-block' ); ?>" src="<?php echo esc_url( $image2 ); ?>" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"margin":{"bottom":"24px"}}}} -->
Expand All @@ -64,9 +64,9 @@

<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:cover {"url":"<?php echo esc_url( $image3 ); ?>","id":1,"dimRatio":0,"contentPosition":"bottom center","isDark":false,"style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<!-- wp:cover {"url":"<?php echo esc_url( $image3 ); ?>","id":1,"dimRatio":30,"overlayColor":"contrast","isUserOverlayColor":true,"contentPosition":"bottom center","style":{"spacing":{"padding":{"bottom":"56px"}}},"className":"has-white-color"} -->
<div class="wp-block-cover is-light has-custom-content-position is-position-bottom-center has-white-color" style="padding-bottom:56px">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim-30 has-background-dim"></span>
<img class="wp-block-cover__image-background wp-image-1" alt="<?php esc_attr_e( 'Placeholder image used to represent products being showcased in featured categories banner. 3 out of 3', 'woo-gutenberg-products-block' ); ?>" src="<?php echo esc_url( $image3 ); ?>" data-object-fit="cover"/>
<div class="wp-block-cover__inner-container">
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"margin":{"bottom":"24px"}}}} -->
Expand Down
Loading

0 comments on commit ecb0f51

Please sign in to comment.