woocommerce/plugins/woocommerce-blocks/patterns
Alba Rincón 26295c0eab [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796)
* Add the Verticals API client

* Add tests

* Refactor error handling

* Create first version of the prompt class

* Improve Vertical selector and add tests

* Remove testing code

* Update class comment

* Add PatternImages class

* Pass the dictionary as param

* Add tests

* Add `get_pattern_images` function and use it on patterns

* Add the Jetpack Connection Package as a dependency for WooCommerce Blocks.

* Introduce the new Configuration Class for registering and enabling the Jetpack connection for sites and users.

* Introduce the Connection class for making requests to the GPT AI API.

* Update the get_jwt_token method.

* Update the error messages for the get_jwt_token method.

* Update the register_site method.

* Update the Configuration class structure and add Dependency Injection.

* Update structure for the Connection Class.

* Update the return type for the get_jwt_token method.

* Update method visibility for get_site_id

* Update the name and params for methods within the Connection Class

* Add tests for the Connecction class.

* Update the Constructor for the Configuration class.

* Add the Patterns class.

* Move the get_image_url function to the PatternImages class and update the call in all patterns to address errors.

* Remove the functions.php file

* Update the VerticalsSelector class.

* Update the constructor for PatternImages.

* Update the Store API Route for Patterns.

* Update the create_patterns_content method to ensure it returns the results of update_option.

* Add the new Patterns route to the RoutesController class.

* Update the route path and remove the business description validation as that is done via create_patterns_content

* Introduce the PatternsSchema

* Update the prompt, errors messages and output format for the Verticals Selector.

* Fix the missing file error for the Patterns Dictionary.

* Introduce the new get_patterns_dictionary method and update the create_patterns_content method to better handle errors.

* Update the returned response for the endpoint.

* Add the get_item_response method to the PatternsSchema class.

* Update response for when allow_ai_connection option is not set.

* Enable authentication for the endpoint.

* Modify and temporarily remove some failing tests for the AI API: a separate PR will be opened to clear those out later.

* Add validation to the verticals_id.

* Remove reference to the src/Patterns/functions.php file.

* Update `alt` to be more generic, since the displayed images will vary

* Store Customization > Schedule an action to update the patterns content whenever the business description is changed (https://github.com/woocommerce/woocommerce-blocks/pull/10956)

* Introduce the new OptionUpdate class.

* Update the path to action schduler and add a file_exists check before attempting to schedule the action.

* Update the content in patterns from the BlockPatterns class instead.

* Remove return comment

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-09-19 09:05:44 +02:00
..
README.md Consistent Pattern Titles (https://github.com/woocommerce/woocommerce-blocks/pull/9814) 2023-06-21 09:50:12 +02:00
banner.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
discount-banner-with-image.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
discount-banner.php Add new `Discount banner` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9936) 2023-06-22 12:32:53 +02:00
featured-category-focus.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
featured-category-triple.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
featured-products-5-cols.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
featured-products-fresh-and-tasty.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
filters.php Consistent Pattern Titles (https://github.com/woocommerce/woocommerce-blocks/pull/9814) 2023-06-21 09:50:12 +02:00
footer-large-dark.php Ensure the My Account text size matches other texts in the footer. (https://github.com/woocommerce/woocommerce-blocks/pull/10614) 2023-08-17 15:04:56 +00:00
footer-large.php Ensure the My Account text size matches other texts in the footer. (https://github.com/woocommerce/woocommerce-blocks/pull/10614) 2023-08-17 15:04:56 +00:00
footer-simple-dark.php Ensure the My Account text size matches other texts in the footer. (https://github.com/woocommerce/woocommerce-blocks/pull/10614) 2023-08-17 15:04:56 +00:00
footer-simple-menu-and-cart.php Add the wc-blocks-footer-pattern class identifier to all patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10542) 2023-08-14 10:02:27 +00:00
footer-simple.php Ensure the My Account text size matches other texts in the footer. (https://github.com/woocommerce/woocommerce-blocks/pull/10614) 2023-08-17 15:04:56 +00:00
footer-with-2-menus-dark.php Add the wc-blocks-footer-pattern class identifier to all patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10542) 2023-08-14 10:02:27 +00:00
footer-with-2-menus.php Add the wc-blocks-footer-pattern class identifier to all patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10542) 2023-08-14 10:02:27 +00:00
footer-with-3-menus.php Add the wc-blocks-footer-pattern class identifier to all patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10542) 2023-08-14 10:02:27 +00:00
header-centered-search-pattern.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
header-essential-dark.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
header-essential.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
header-large-dark.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
header-large.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
header-minimal.php Add the wc-blocks-header-pattern class identifier to header patterns. (https://github.com/woocommerce/woocommerce-blocks/pull/10541) 2023-08-11 13:31:49 +00:00
hero-product-3-split.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
hero-product-chessboard.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
hero-product-split.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
just-arrived-full-hero.php Consistent Pattern Titles (https://github.com/woocommerce/woocommerce-blocks/pull/9814) 2023-06-21 09:50:12 +02:00
no-products-found.php Update the archive templates to use Products block (https://github.com/woocommerce/woocommerce-blocks/pull/8308)Co-authored-by: Alba Rincón <alba.rincon@automattic.com> 2023-02-22 08:24:04 +07:00
product-collection-banner.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
product-collection-full-grid.php Add pattern chooser in Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10876) 2023-09-14 14:19:16 +02:00
product-collection-grid.php Add pattern chooser in Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10876) 2023-09-14 14:19:16 +02:00
product-collection-rows.php Add pattern chooser in Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10876) 2023-09-14 14:19:16 +02:00
product-collection-simple-grid.php Add pattern chooser in Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10876) 2023-09-14 14:19:16 +02:00
product-collections-featured-collection.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-collections-featured-collections.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
product-collections-newest-arrivals.php Fix badge wrong spacing on the newest arrivals pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10446) 2023-08-02 11:06:57 +02:00
product-details-listing.php Remove styles from `Product Details Product Listing` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10362) 2023-07-26 16:12:11 +02:00
product-details-pattern.php Add alt text to images used in patterns describing their purpose (https://github.com/woocommerce/woocommerce-blocks/pull/9788) 2023-06-12 19:34:03 +02:00
product-featured-2-columns.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-hero-2-col-2-row.php Consistent Pattern Titles (https://github.com/woocommerce/woocommerce-blocks/pull/9814) 2023-06-21 09:50:12 +02:00
product-hero.php Product Hero Pattern > Adjust the content width (https://github.com/woocommerce/woocommerce-blocks/pull/10832) 2023-09-05 10:20:57 +00:00
product-listing-with-gallery-and-description.php Add alt text to images used in patterns describing their purpose (https://github.com/woocommerce/woocommerce-blocks/pull/9788) 2023-06-12 19:34:03 +02:00
product-query-1-1-image-4-column-products-row.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-3-column-product-row.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-4-column-product-row.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-large-image-product-gallery.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-minimal-5-column-products-row.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-minimal-product-list.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-product-gallery.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-product-list-with-1-1-images.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-query-product-list-with-full-product-description.php Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
product-search-form.php Update the archive templates to use Products block (https://github.com/woocommerce/woocommerce-blocks/pull/8308)Co-authored-by: Alba Rincón <alba.rincon@automattic.com> 2023-02-22 08:24:04 +07:00
shop-by-price.php Shop by Price pattern: add price filters to buttons (https://github.com/woocommerce/woocommerce-blocks/pull/9915) 2023-06-22 08:04:54 +02:00
small-discount-banner-with-image.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
social-follow-us-in-social-media.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
store-info-alt-image-and-text.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00
testimonials-3-columns.php Remove styles from the `Testimonials 3 cols` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10258) 2023-07-19 13:24:21 +02:00
testimonials-single.php [Store Customization] Update patterns to use the AI selected verticals for images (https://github.com/woocommerce/woocommerce-blocks/pull/10796) 2023-09-19 09:05:44 +02:00

README.md

WooCommerce Blocks - Patterns

Naming Conventions for Patterns

  • Use spaces as a separator. Only use hyphens for compound words or expressions.
  • Use consistent title case capitalization.
  • Use clear, descriptive names that indicate the component's function or appearance.
  • Group similar items together with a common name structure.