* Add escaping to unescaped style attribute variable
* Empty commit for release pull request
* update testing instructions
* bump version to 11.1.1
* add zip link
---------
Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Fix "On sale" badge class for shop
* Add class to sale badge
* Product Gallery Thumbnails: Remove empty markup from the frontend when no thumbnails are present
* Product Gallery Thumbnails: Minor null coalescing operator improvement
* Product Gallery Thumbnails: Remove the Thumbnails markup if there's only one image present
* Product Gallery Thumbnails: Minor null coalescing operator improvement
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Features Flags and Experimental Interfaces doc: Update blocks behind the experimental flag
* Product Gallery Next Previous: Add missing experimental flag
* Rename checkout template slug
* Remove redirect and custom title
* Classic shortcode block for checkout
* Empty title
* WIP placeholder
* Change blockified template
* Prefix cart and checkout templates with "Page: "
* Template migration routine
* Apply same treatment to cart template
* Notices
* Update placeholder text
* Classic shortcodes block
* Page content wrapper for templates
* Update default
* Do not save attributes
* Update templates
* Remove cart classic template
* Reverted endpoints for Cart & Checkout templates. This reverts PR 9406
* Migrate page content wrapper.
* Removed useless method arg. Minor tweaks.
* Skip migration if the theme has a template file for this page.
* Removed impossible condition.
* Migrate page content wrapper.
* Remove TemplateNotice in favour of DefaultNotice
* Documentation links in shortcode placeholder
* Hide cart and checkout page selector when using block themes
* Unused var
* Add tests for template changes
* Revert changes to classic-template
* Allow frontend redirect
* Unused file
* Bump version for updater
* Support x template naming as well as page-x
* Need to add item to cart to test checkout
* Fix header test by fixing utility for adding to cart
* Remove permalink tests
* Click body
* Wait for content to finish loading
* Wait for add to cart response when adding to cart without item name
* Wait for save before visiting frontend
* Set content instead of inserting block
* Perform test in site editor rather than page editor
* Prevent notice to set the default cart/checkout page from showing on the site editor.
---------
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Prevent changes in the selected shipping method when new rates are added or removed.
* Fix spacing as per the coding standards
* Remove additional new line space.
* 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>
* 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.
* 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.
In this update, the layout options for the Product Collection block are transferred from the Toolbar to the Inspector controls. Below is the breakdown of the changes:
1. **Constants Update**
- `LayoutOptions` enumeration has been imported into `constants.ts`, facilitating a more structured approach to managing layout types (grid and stack).
- The default display layout type has been updated from 'flex' to reference `LayoutOptions.GRID`.
- The `getDefaultQuery` function now uses the `getDefaultValueOfInheritQueryFromTemplate` utility to set the default `inherit` value. (This is mainly done to fix a bug)
2. **Display Layout Control Removal**
- The `display-layout-control.tsx` file has been removed, discontinuing the previous method of layout management.
3. **New Layout Options Control**
- A new component `LayoutOptionsControl` has been introduced in the `layout-options-control.tsx` file, utilizing the experimental `ToggleGroupControl` and `ToggleGroupControlOption` components from the WordPress package to provide a more intuitive layout selection experience.
- The `types.ts` file has been updated to define the `LayoutOptions` enum, effectively mapping 'flex' to 'GRID' and 'list' to 'STACK'.
4. **Inspector Controls Update**
- In `inspector-controls/index.tsx`, the obsolete `DisplayLayoutControl` has been replaced with the new `LayoutOptionsControl`, integrating it into the `ProductCollectionInspectorControls` component.
- The `BlockControls` wrapper has been removed, and layout options have been relocated to the Inspector controls, presented as a toggle group within the ToolsPanel.
5. **Inherit Query Control Modification**
- The `inherit-query-control.tsx` file sees a change in the reset value for the `inherit` query attribute to employ a default value which fix one bug.
These changes aim to streamline the user experience by relocating the layout options from the Toolbar to the Inspector controls, offering a centralized location for block settings. Leveraging an enum for layout options fosters code readability and maintainability.
Do note that the update uses experimental components, hence it would be prudent to keep an eye on potential alterations or deprecations in upcoming WordPress releases.
* 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
Woo Core supports WP L1, and we support L0. We added this comment
because it can be confusing since the info can only be found on the
release instructions
* 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.
* Fix "On sale" badge class for shop
* Add class to sale badge
* Move the thumbnails featching logic to an utils file. Add context directive with thumbnails data to the Product Gallery block. Add on-click directives to the Thumbnails block
* Product Gallery Thumbnails: Remove the legacy thumbnail markup
* Product Gallery Thumbnails: Add Large Image replacing
* update the main image when the thumbnail is clicked
* add E2E tests
* fix typo
* fix warning on the frontend
* address feedback
* update E2E test
* improve comment
* fix indentation
* improve E2E test
* improve flaky test
* improve E2E test
* improve comments
* improve E2E test
* try now
* add comment
* skip test
* reset script
* update todo comment
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* 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
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* 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
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
Woo Core supports WP L1, and we support L0. We added this comment
because it can be confusing since the info can only be found on the
release instructions
* Fix "On sale" badge class for shop
* Add class to sale badge
* Apply styleProps.styles to elements using them
* Product Gallery: Lock the Sale Badge and the Next/Prev Buttons
* Change default number of columns in Related Products
* Add default attributes to Product Template in Single Product template
* Revert adding attributes
* Fix block alignment with Large Image block
* Prevent error when layout is not present in the attributes object
* Add Large Image and Pager to its own group
* Fix issue when moving around the thumbnails block
* Fix e2e tests for Product Gallery block
* Change ancestor block for the Pager block
* Fix bug where is-plain-obj is not transpiled by Jest, update lock.
* Update packages.
* Mock useSelect for a handful of RichText selectors in test.
* Resolve react to single version to avoid invalid hook errors.
* Patch trim-html locally to avoid a bug in the released npm source.
* Mock out resizeObserver to avoid https://github.com/FezVrasta/react-resize-aware/issues/58
* Don't transpile config package: https://github.com/node-config/node-config/issues/628
Customer Account block icon size is based on the parent `font-size`
in order to make sure they stay harmoniously together.
However, the `box-sizing` could be set by some other actor
and mess with the size of the icon.
* 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".
* Product Gallery: add support for On Sale Badge Block
* add align support
* Add E2E tests
* set margin via Block Styles
* disable experimental flag
* add next previous block
* restore support file
* fix TS error
* fix layout
* change product