Commit Graph

146 Commits

Author SHA1 Message Date
Tom Cafferkey cffea366a5 Product Collection 5 Columns pattern - Update title and price to be rows instead of columns (https://github.com/woocommerce/woocommerce-blocks/pull/11205) 2023-10-11 12:20:16 +01:00
Tom Cafferkey a45e3699a2 Product Collection: Featured Products 5 Columns - Remove no results block. (https://github.com/woocommerce/woocommerce-blocks/pull/11198) 2023-10-11 08:11:57 +01:00
Tom Cafferkey 41724e9400 Product Gallery pattern: Use the Product Collection block (https://github.com/woocommerce/woocommerce-blocks/pull/11194) 2023-10-10 17:17:17 +01:00
Patricia Hillebrandt df2a3d72d2 Store Customization > Update aspect ratio, icons and default text for the Social: Follow us on social media pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11161)
* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Add group and spacing to the 3-cols and social patterns

* Fix alignment issue in the testimonals 3 in the editor

* Add padding to the featured catergory triple pattern

* Remove pagination and no results query from product query patterns

* Add aspect ratio to the product image attributes

* Add portrait aspect ratio to product X column and product gallery patterns

* Fix PHP warning and remove the padding for the Testimonials 3 Columns pattern.

* Ensure the Just Arrived Full Hero pattern can have an AI managed image assigned to it and update the content assignment.

* Add background dim

* Update dim to 30

* Add aspect ratio to the Social: Follow us on social media

* Update the icons color to primary

* Update the default title for the Follow us on social media pattern within the dictionary.

* Update text for the main header.

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2023-10-06 11:45:26 +00:00
Patricia Hillebrandt 75c48ffb47 Store Customization > Ensure the Just Arrived Full Hero pattern can have an AI selected image assigned to it (https://github.com/woocommerce/woocommerce-blocks/pull/11159)
* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Add group and spacing to the 3-cols and social patterns

* Fix alignment issue in the testimonals 3 in the editor

* Add padding to the featured catergory triple pattern

* Remove pagination and no results query from product query patterns

* Add aspect ratio to the product image attributes

* Add portrait aspect ratio to product X column and product gallery patterns

* Fix PHP warning and remove the padding for the Testimonials 3 Columns pattern.

* Ensure the Just Arrived Full Hero pattern can have an AI managed image assigned to it and update the content assignment.

* Add background dim

* Update dim to 30

* Update text for the main header.

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2023-10-06 11:17:31 +00:00
Patricia Hillebrandt 15d24a227f Store Customization > Fix the Testimonials 3 Columns pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11158)
* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Add group and spacing to the 3-cols and social patterns

* Fix alignment issue in the testimonals 3 in the editor

* Add padding to the featured catergory triple pattern

* Remove pagination and no results query from product query patterns

* Add aspect ratio to the product image attributes

* Add portrait aspect ratio to product X column and product gallery patterns

* Fix PHP warning and remove the padding for the Testimonials 3 Columns pattern.

* Update text for the main header.

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2023-10-06 10:42:51 +00:00
Alba Rincón 209fe0b6d8 Add horizontal padding to the Featured Category Triple pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11160) 2023-10-06 11:45:43 +02:00
Alba Rincón 37623be4f2 Remove placeholder and pagination (https://github.com/woocommerce/woocommerce-blocks/pull/11145)
* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Remove pagination and no results query from product query patterns

* Add aspect ratio to the product image attributes

* Add portrait aspect ratio to product X column and product gallery patterns
2023-10-06 10:51:35 +02:00
Alba Rincón 01d8a78e4f Store Customization > Homepage Template 1: Review layout and spacing in between patterns (https://github.com/woocommerce/woocommerce-blocks/pull/11144)
* Add titles to patterns and set the aligment to Wide

* Replace product query patterns with product collection ones

* Add group and spacing to the 3-cols and social patterns

* Fix alignment issue in the testimonals 3 in the editor

* Add padding to the featured catergory triple pattern
2023-10-05 17:44:14 +02:00
Alba Rincón 592db8df43 Store Customization > Homepage Template 3: Review layout and spacing in between patterns (https://github.com/woocommerce/woocommerce-blocks/pull/11131)
* Add padding and headers to patterns

* Fix centering when GB enabled
2023-10-05 13:49:26 +02:00
Alba Rincón 4716d7483e Store Customization > Homepage Template 2: Review layout and spacing in between patterns (https://github.com/woocommerce/woocommerce-blocks/pull/11129)
* Add titles to patterns and set the aligment to Wide

* Add paddings

* Replace product query patterns with product collection ones

* Fix pattern title
2023-10-05 13:14:53 +02:00
Patricia Hillebrandt 04e298050c Store Customization > Replace patterns based on the Products (Beta) block with an equivalent based on the Product Collection block (https://github.com/woocommerce/woocommerce-blocks/pull/11134)
* Introduce the new Product Collection 4 Columns pattern as a replacement for 1:1 Image 4-Column Product Row

* Introduce the new Product Collection 5 Columns pattern as a replacement for Minimal 5-Column Product Row

* Update the slug for the Product Collection 5 Columns pattern

* Introduce the new Product Collection 3 Columns pattern as a replacement for 3-Column Product Row

* Ditch the block types from the docblock

* Introduce the new Product Collection: Featured Products 5 Columns pattern as a replacement for Featured Products 5-Item Grid

* Update the patterns dictionary.

* remove block types from the Product Collection: Featured Products 5 Columns pattern

* Remove outdated patterns.

* Remove unnecessary queryId
2023-10-05 08:36:18 +00:00
Tom Cafferkey 661b7031dd Store Customization > Add default image to Just Arrived pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11130) 2023-10-05 09:05:59 +01:00
Luigi Teschio ad80598ab8 Pattern: fetch product id on the JS side (https://github.com/woocommerce/woocommerce-blocks/pull/11138)
* Pattern: fetch product id on the frontend side

* fix TS type
2023-10-05 07:30:50 +00:00
Patricia Hillebrandt 4d82186495 Store Customization > Wireframe and adjust width for the Just Arrived Full Hero pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11115)
* Update the width; Add the button text to the patterns dictionary; adjust the width to wide.

* Remove unnecessary space before the title.
2023-10-04 12:47:19 +00:00
Patricia Hillebrandt 8f421d551e Store Customization > Add the Featured Category Cover Image pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11109)
* Reintroduce the Featured Category Cover Image pattern.

* Update styles for the pattern to match the new ones.

* Update the patterns dictionary to include the Featured Category Cover Image.

* Remove bold from h3 tag

* remove the fonts customization for the button

* Drop the medium fontsize for the paragraph.
2023-10-04 11:17:28 +00:00
Tom Cafferkey 9805a665ab Remove opinionated styles from the Hero Product 3 Split pattern (https://github.com/woocommerce/woocommerce-blocks/pull/11110) 2023-10-04 12:03:52 +01:00
Alba Rincón e2d5175c65 Ensure the content of the patterns is also AI-generated (https://github.com/woocommerce/woocommerce-blocks/pull/10997)
* Fix bug, it was always returning {'ai_content_generated':true} even in case of error

* Refactor PatternImages to extract static helper method to PatternImagesHelper and rename to PatternUpdater

* Fix use on patterns

* Update the pattern content using AI as well

* Make API requests in parallel

* Fix prompt and update patterns with generated content

* Return default content if patterns content is empty

* Fix patterns and failed responses

* Add timeout to the request multiple function

* Replace square by landscape

* Remove todo

* Return error on content update error

* Ensure the pattern content exists within the wc_blocks_patterns_content option: if it doesn't exist, fetch the default content from the default dictionary instead.

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-09-25 09:48:52 +00:00
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
Karol Manijak 25c0b47721 Add pattern chooser in Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/10876)
* Enable Product Collection patterns in inserter and kick off the layout control button

* Add Choose Pattern button

* Move Toolbar settings to related directory

* Display Pattern Selection modal with available patterns after clicking the button

* Make Pattern Chooser always visible

Patterns can be changed no matter if the Inherit Query from Template option in enabled or not

* Add pattern replacement mechanism

* Switch from Gutenberg styles to internal ones
2023-09-14 14:19:16 +02:00
Karol Manijak 7f2e5368ad Add Product Collection Rows pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10857) 2023-09-07 10:24:36 +02:00
Karol Manijak a2490ddfda Add Simple Grid Product Collection pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10835)
* Add Simple Grid Product Collection pattern

* Move the sale badge to the lewft
2023-09-07 09:01:29 +02:00
Patricia Hillebrandt 7458ac54b0 Product Hero Pattern > Adjust the content width (https://github.com/woocommerce/woocommerce-blocks/pull/10832)
* Minor width adjustment for the Product Hero pattern.

* close div on a new line
2023-09-05 10:20:57 +00:00
Daniel W. Robert 59f468f5ba Adjust `Follow us on social media` pattern icon alignment (https://github.com/woocommerce/woocommerce-blocks/pull/10709)
* Adjust column width and icon alignment.

Set new col width to `75%` / `25%` and set the icon flex-alignment
to `space-between`.

While this is not ideal, without any fine-grained control over
breakpoints, this seems to be marginally better than having the icons
remain right-aligned on mobile.

* Correct grammar for pattern title and heading.

Should be "on" not "in".
2023-08-31 16:55:38 -04:00
Karol Manijak 31e9854316 Add Product Collection Full Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10665)
* Add initial look of Full Grid Product Collection pattern

* Refactor textAlign property of Product Button so it uses flex rather than text-align

* Update Product Button text align after the fix

* Remove debug log (https://github.com/woocommerce/woocommerce-blocks/pull/10719)

* Add Product Collection Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10660)

* Dispatch the `wc-blocks_render_blocks_frontend` event when rendering the empty cart block (https://github.com/woocommerce/woocommerce-blocks/pull/10619)

* E2E: Refactor Mini Cart to be ready for fully parallel (https://github.com/woocommerce/woocommerce-blocks/pull/10704)

* Revert dequeue add-to-cart-variation script which is needed to properly handle variable products in single product page (https://github.com/woocommerce/woocommerce-blocks/pull/10723)

* Update alignment options to new setting

---------

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2023-08-28 15:58:17 +05:30
Karol Manijak eba1a5a19c Add Product Collection Grid pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10660) 2023-08-24 09:59:08 +02:00
Patricia Hillebrandt f88a7e984d Testimonials Single Pattern > Update the image format and content width (https://github.com/woocommerce/woocommerce-blocks/pull/10600)
* Testimonials Single Pattern: Update the styles for the image and add and alt text.

* Update the layout type of the comlumn iwth the content to constrained and update padding to 32px for the columns wrapper.

* Vertical align image to the center.
2023-08-17 15:28:58 +00:00
Patricia Hillebrandt 4290a948a6 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
Alba Rincón ee9b93a026 Remove `queryId` parameter from patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10616) 2023-08-17 09:06:48 +02:00
Patricia Hillebrandt da10fe8a3e 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
Patricia Hillebrandt 6ca3623f14 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
Patricia Hillebrandt edbfa8d35e Store Customization > Add placeholder images for the Alternating Image and Text pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10479)
* Add placeholder images and update text styles for the Alternating Image and Text pattern.

* Address code review.

* add spacing.

* streamline the styles.
2023-08-11 09:33:54 +02:00
Patricia Hillebrandt 75acbba85f Featured Products: Fresh & Tasty pattern > Enhance mobile view and optimize images (https://github.com/woocommerce/woocommerce-blocks/pull/10521)
* Update wrapping on mobile view

* Update styling for images and size.

* remove e2e-pw changes

* Remove font style.

* Remove custom styling from images.
2023-08-10 14:33:31 +00:00
Luigi Teschio bd082541a3 fix compatibility with WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/10449) 2023-08-02 15:58:39 +00:00
Alba Rincón a9d29407eb 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
Patricia Hillebrandt adf39ff0fe Store Customization > Featured Products 5-Item Grid pattern - Update the pattern to become wireframed (https://github.com/woocommerce/woocommerce-blocks/pull/10401)
* Featured Products 5-Item Grid pattern: Ensure a placeholder image is displayed when the product doesn't have any

* Ensure the wp-block-group is aligned wide.

* Update text styles

* Make texts translatable.

* Update the Featured Products 5-Item Grid pattern
2023-07-31 08:48:41 +02:00
Albert Juhé Lluveras 8bd67440b5 Unify links to WordPress and WooCommerce websites in patterns (https://github.com/woocommerce/woocommerce-blocks/pull/10380)
* Unify links to WordPress and WooCommerce websites in patterns

* Add missing em closing tag
2023-07-28 16:34:50 +02:00
Patricia Hillebrandt ae04cabbae Store Customization > Introduce the new Social: Follow us in social media pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10368)
* Add the new Social: Follow us in social media pattern and relevant images.

* Update the URLs

* Remove all IDs from the images.

* Make title translatable. Removed hardcoded color for the icons. Update indentation.
2023-07-26 17:56:54 +02:00
Alba Rincón 51ca561130 Remove styles from `Product Details Product Listing` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10362)
* Fix black and white colors

* Remove styles from button and title
2023-07-26 16:12:11 +02:00
Patricia Hillebrandt 529f17dac9 Store Customization > Large Footer pattern - Update the pattern to become wireframed (https://github.com/woocommerce/woocommerce-blocks/pull/10323)
* Remove opinionated font styles and sizes from the Large Footer pattern.

* Ensure the year is dinamically changed in the footer.

* Make string translatable

* Update translation to include the WooCommerce brand.
2023-07-26 13:51:14 +02:00
Patricia Hillebrandt e29360642d Store Customization > Introduce the new Featured Products: Fresh & Tasty pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10339)
* Introduce the new Featured Products: Fresh & Tasty pattern.

* Update lettuce image.

* Update indentation.

* Make all strings translatable.

* Align all prices right

* Ensure text doesnt stack on mobile

* Update mobile display for the prices

* Update mobile display for the product names

* Remove the image id and the text styles
2023-07-25 17:11:11 +02:00
Patricia Hillebrandt 15db0701f2 Store Customization > Featured Category Triple pattern - Update the pattern to become wireframed (https://github.com/woocommerce/woocommerce-blocks/pull/10343)
* Remove custom font color from the cover block.

* Update indentation for the Featured Category Triple pattern.

* Update indentation for the third column

* Make all strings translatable.

* replate all paragraph blocks with a wp-block-heading

* Ensure the central text is also white

* replace the buttons with a paragraphs.

* Remove unnecessary styles from wp:column

* Remove more unnecessary styles from wp-block-cover

* Remove the has-text-color class and other unnecessary positioning styles

* Update headings from h4 to h3 and update the paragraph styles.

* Replate theme's has-base-color with has-white-color
2023-07-25 16:00:22 +02:00
Albert Juhé Lluveras c74e27d666 Remove opinionated styles from Alternating Image and Text pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10292)
* Remove opinionated styles from Alternating Image and Text pattern

* Vertically center all columns
2023-07-25 10:12:29 +02:00
Alba Rincón a4233a957c Remove opinionated styles from pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10306) 2023-07-24 12:25:34 +02:00
Alba Rincón b8f798b017 Use the `Single Product` block for the `Product Details Product Listing` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/9978)
* Show alignment toolbar also when the block is in the single product block

* Start using `Single Product` for the `Product Details Product Listing` pattern

* Use counter and stars blocks in the pattern

* Undo button change

* Make the new rating blocks not experimental

* Add Beta to the average rating block

* Add blocks to block types controller
2023-07-24 11:02:24 +02:00
Alba Rincón aee01c5f9e Update the `Footer with 3 menus` pattern to have no opinionated styles (https://github.com/woocommerce/woocommerce-blocks/pull/10294)
* Remove opinionated styles from pattern

* Make search strings translatable
2023-07-21 10:53:40 +02:00
Alba Rincón 8299771b06 Update the `Testimonials Single` pattern to have no opinionated styles (https://github.com/woocommerce/woocommerce-blocks/pull/10275)
* Testimonials Single pattern - Update the pattern to become wireframed

* Use the correct function for translating strings
2023-07-20 14:34:01 +02:00
Albert Juhé Lluveras f22c462d5f Remove opinionated styles from Hero Product 3 Split pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10260)
* Remove opinionated styles from Hero Product 3 Split pattern

* Make strings in Hero Product 3 Split pattern translatable
2023-07-19 14:38:12 +02:00
Patricia Hillebrandt 2ca0a113da Store Customization > Hero Product Split pattern - Update the pattern to become wireframed (https://github.com/woocommerce/woocommerce-blocks/pull/10270)
* Remove opinionated styles from the Hero Product Split pattern.

* Remove additional has-text-color and has-background
2023-07-19 14:21:41 +02:00
Alba Rincón 0b81176d3b Remove styles from `Newest arrivals` pattern (https://github.com/woocommerce/woocommerce-blocks/pull/10256)
* Remove styles from `Newest arrivals` pattern

* Remove id

* Replace row with columns to be able to stack blocks on mobile

* Make string translatable

* Make button string translatable
2023-07-19 13:24:32 +02:00