Commit Graph

6231 Commits

Author SHA1 Message Date
Mike Jolley 4a13e5faf0 Switch to NoticeBanner component inside Store Notices Block placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/11920) 2023-11-27 13:43:42 +00:00
Agung Sundoro 7e77a13f16 fix: store notices always shows as an error type woocommerce/woocommerce-blocks#11768 (https://github.com/woocommerce/woocommerce-blocks/pull/11932) 2023-11-27 05:07:18 -08:00
Arsany Benyamine fa1f2896fb replace Stories root Dir to "External Components" (https://github.com/woocommerce/woocommerce-blocks/pull/11910) 2023-11-27 04:14:58 -08:00
Alba Rincón 1c325c3ea9 Convert to tsx and replace proptypes by ts definitions (https://github.com/woocommerce/woocommerce-blocks/pull/10471)
* Convert to tsx and replace proptypes by ts definitions

* Fix imports

* Fix noReviewsPlaceholder type

* Fix ts errors

* Use createHigherOrderComponent in withReviews

* Revert hoc change

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-11-27 12:08:17 +01:00
Manish Menaria 53944beeb3 [Product Collection] Fix: HTML entity decoding for product names in Hand-Picked Products (https://github.com/woocommerce/woocommerce-blocks/pull/11927)
* Add HTML entity decoding for product names in Hand-Picked Products control

In the Hand-Picked Products control within the product-collection inspector controls, a function for decoding HTML entities in product names has been added.

- A new utility function `decodeHTMLEntities` has been implemented. This function decodes HTML entities in a string, ensuring that special characters are correctly displayed in their human-readable form.
- The `transformTokenIntoProductName` function has been updated to utilize `decodeHTMLEntities`. Now, when a product name is fetched (either directly as a token or via a product ID), the HTML entities within the name are decoded.
- This enhancement ensures that product names containing characters like ampersands or other HTML entities are accurately displayed in the UI.

This change improves the readability and accuracy of product names within the Hand-Picked Products control, enhancing the user experience for store managers using WooCommerce Blocks.

* Update label and hide description

This commit updates the `HandPickedProductsControl` component. Specifically, the user-facing label for product selection has been changed from 'Pick some products' to 'Hand-picked Products'. Additionally, the `__experimentalShowHowTo` property has been added with a `false` value, to hide description. Corresponding changes have been made in the E2E test file `product-collection.block_theme.spec.ts`, where the filter name is updated to match the new label.

* Refactor: Replace custom HTML entity decoder with `@wordpress/html-entities`

Rationale:
- The shift to `@wordpress/html-entities` aligns with standard WordPress practices, ensuring consistency across the platform.
- Enhances maintainability by relying on a well-supported library rather than custom code.
- Simplifies the codebase by removing a redundant utility function.

This change enhances the robustness of our code and aligns with best practices in WordPress development.
2023-11-27 12:27:04 +05:30
Sam Seay 1cd4df5b19 Migrate interactivity stock filter to new store API, add improvements and bugfixes (https://github.com/woocommerce/woocommerce-blocks/pull/11827) 2023-11-27 17:26:01 +13:00
Daniel Dudzic 590263543f Product Gallery Thumbnails: Add support for cropping (https://github.com/woocommerce/woocommerce-blocks/pull/11718)
* Product Gallery Thumbnails: Refactor sizing in the editor and the front end

* Product Gallery Thumbnails: Change default vertical alignment to top and better control the width of the thumbnails

* Product Gallery Thumbnails: Fix thumbnails cropping based on the 'Crop images to fit' setting

* Product Gallery Thumbnails: Revert thumbnails styling from woocommerce/woocommerce-blocks#11665

* Product Gallery Thumbnails: Update the default value of the cropImages setting to false
2023-11-24 23:49:44 +01:00
Daniel Dudzic 38b0001735 Product Gallery Thumbnails: Fix overflow issues and improve responsiveness (https://github.com/woocommerce/woocommerce-blocks/pull/11665)
* Product Gallery Thumbnails: Refactor sizing in the editor and the front end

* Product Gallery Thumbnails: Change default vertical alignment to top and better control the width of the thumbnails

* Product Gallery Thumbnails: Restrict the bottom position thumbnails width based on the total number of thumbnails set

* Product Gallery: Remove hardcoded width for Thumbnails and the Large Image and update the width inside of the Dialog

* Product Gallery Thumbnails: Introduce thumbnails scaling based on the number of thumbnails

* Product Gallery Thumbnails: Fix editor thumbnails scaling

* Product Gallery Thumbnails: Remove unused column gap variable

* Product Gallery Thumbnails: Fix styling for vertical images

* Product Gallery: Remove the unused editor.scss file

* Product Gallery: Fix the placement of the Thumbnails block in the block template

* Product Gallery Dialog: Reset changes to the dialog

* update @wordpress/e2e-test-utils-playwright package

* don't update node version

* remove waitForSiteEditorFinishLoading function

* use visitSiteEditor util

* Product Gallery Thumbnails: Add code comments

* Product Gallery Thumbnails E2E: Fix the test checking the default position of the thumbnails

* Product Gallery E2E: Fix the test checking if the cropping setting works correctly

* Product Gallery Thumbnails: Hide the Thumbnails block if there aren't at least 2 thumbnails to display

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-11-24 21:31:02 +01:00
Alba Rincón c7182d9202 [Store Customization] AI-generated store name (https://github.com/woocommerce/woocommerce-blocks/pull/11878)
* Add new ai/store-title endpoint to update the store title with an AI generated one

* Add StoreTitle schema

* Fix error to response param

* Fix var name and tweak prompt

* Update comment

* Replace it by Ai generated if it's the default title

* Return error if AI failed

* Return false if the title is not updated with an AI one
2023-11-24 14:40:51 +01:00
Karol Manijak ff59efc27f Remove isExperimental flag from product-query module which is not experimental (https://github.com/woocommerce/woocommerce-blocks/pull/10531) 2023-11-24 08:36:30 +01:00
Sam Seay 9168b47f33 Translate the prefixes passed to post-terms in product-meta. (https://github.com/woocommerce/woocommerce-blocks/pull/11811) 2023-11-24 17:33:28 +13:00
Paulo Arromba f60f10ad59 Update/testing instructions and changelog for 11.6.1 (https://github.com/woocommerce/woocommerce-blocks/pull/11923)
* Updated readme.txt and testing instructions

* Updated testing zip.

* Updated stable version
2023-11-23 15:52:20 +00:00
Roy Ho 9aea9ef53b Remove alignment from template part (https://github.com/woocommerce/woocommerce-blocks/pull/11891) 2023-11-23 05:40:17 -08:00
Mike Jolley 48777bb1ef Add missing woocommerce class (https://github.com/woocommerce/woocommerce-blocks/pull/11919) 2023-11-23 12:35:13 +00:00
Albert Juhé Lluveras c422227341 Fix an issue that caused the Order by select in Reviews blocks to always be disabled (https://github.com/woocommerce/woocommerce-blocks/pull/11918) 2023-11-23 12:59:14 +01:00
Albert Juhé Lluveras 8b6d81a7c3 Fix Reviews blocks not being rendered (https://github.com/woocommerce/woocommerce-blocks/pull/11913) 2023-11-23 10:52:06 +00:00
Karol Manijak b5e91ee460 Enable shrink columns option in Product Collection by default (https://github.com/woocommerce/woocommerce-blocks/pull/11821)
* Enable shrink columns option in Product Collection by default

* Improve tests about responsiveness

* Make regex allowing for floating pixels

* Related products should not use sticky and author attribute or have hardcoded queryId

* Bring back properties for Related Products as it's based on Propducts block, not Product Collection

* Enable shrink columns to fit by default in patterns
2023-11-23 10:10:19 +01:00
Alba Rincón 8cb50f1b59 Store Customization > Ensure the price for products is also AI-generated (https://github.com/woocommerce/woocommerce-blocks/pull/11859)
* Generate the product price with AI

* Fine tune the prompt to take into account the store currency

* Improve the price prompt
2023-11-23 09:58:09 +01:00
Luigi Teschio fc349610b0 add delete /pattern endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/11890) 2023-11-23 09:42:06 +01:00
Karol Manijak 41d5a4bda6 Prevent shrinkColumns value when switching the layout type of Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/11905) 2023-11-23 08:17:35 +01:00
Paulo Arromba 9a63503008 Update/11.6.0 changelog and testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/11904)
* Updated changelog and added testing instructions

* Updated changelog.

* Updated versions.

* Updated tested up to

* Updated tested up to

* Uploaded testing zip

* Removed woocommerce/woocommerce-blocks#11287 from testing instructions

* Added testing instructions and changelog for woocommerce/woocommerce-blocks#11858

* Updated testing zip

* Testing instructions for woocommerce/woocommerce-blocks#11862 and woocommerce/woocommerce-blocks#11860

* Updated testing zip

* New testing zip with woocommerce/woocommerce-blocks#11872 🍒

* Updated versions to 11.7.0-dev

* Updated composer.lock
2023-11-22 15:19:17 +00:00
Roy Ho 82583fa3fb Don't register or unregister if block can't be found (https://github.com/woocommerce/woocommerce-blocks/pull/11872) 2023-11-22 12:50:56 +00:00
Luigi Teschio 3302b24313 Update @wordpress/e2e-test-utils-playwright package (https://github.com/woocommerce/woocommerce-blocks/pull/11866)
* update @wordpress/e2e-test-utils-playwright package

* don't update node version

* remove waitForSiteEditorFinishLoading function

* use visitSiteEditor util
2023-11-22 09:19:00 +01:00
Thomas Roberts 2a281dbc74 Update changes after 11.4.9 2023-11-21 16:49:32 +00:00
Mike Jolley a8dd298d52 Update params for woocommerce_before_thankyou to mirror core hook (https://github.com/woocommerce/woocommerce-blocks/pull/11862) 2023-11-21 14:45:33 +00:00
Seghir Nadir f113a14b89 Validate coupon usage against customer id AND emails (https://github.com/woocommerce/woocommerce-blocks/pull/11860)
* validate coupon usage against user and email

* add checks for logged out user

* change to direct array call

* fix the query

* fix the query

* fix arrays

* fixe how id is fetched

* Make function private

* use implode instead of join

* coupon shouldnt be a pointer

* move ignore statement

* add comment about tentative usage

* Update src/StoreApi/Utilities/OrderController.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* better validation for user data

* remove unused variable

* bail early if we dont have limits

* add empty line after function

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-11-21 14:33:40 +00:00
Niels Lange a0592778b6 Update notice for default cart and checkout (https://github.com/woocommerce/woocommerce-blocks/pull/11861)
* Update notice for default cart and checkout

* Show full translatable string
2023-11-21 21:23:13 +07:00
Mike Jolley 51d3f9ca13 Add an example of woocommerce_store_api_add_to_cart_data (https://github.com/woocommerce/woocommerce-blocks/pull/11837) 2023-11-21 12:58:42 +00:00
Thomas Roberts 409988881b Move `CheckboxControl` to components package and leave alias in checkout package (https://github.com/woocommerce/woocommerce-blocks/pull/11662) 2023-11-21 10:55:42 +00:00
David Arenas 9e9f0341e2 Interactivity API: implement the new `store()` API (https://github.com/woocommerce/woocommerce-blocks/pull/11071)
* Sync Interactivity API code with Gutenberg

* New store() API

* Store raw actions

* Update wc-interactivity-store implementation

* Replace `wc_store` with `wc_initial_state`

* Parse and populate initial state

* Allow store parts in `store()`

* Accept namespaces in directive paths

* Add $$namespace to directives' object values

* Make namespace parsing more robust

* Use DeepPartial type for store parts

* Do not pass `rawStore` to `afterLoad` callbacks

* Simplify `store()` a bit

* Implement `privateStore()`

* Sync context directive with Gutenberg

* Refactor scope and extract getters per scope

* Add namespace to getters and actions

* Remove current privateStore implementation

* Remove `afterLoad` option from `store`

* Use same proxy handlers for ns, getters and actions

* Set scope inside `evaluate`

* Refactor proxy handlers

* Improve types a bit

* Catch errors in async actions

* Implement stacks for scopes and namespaces

* Implement `getElement`

* Change directives object structure

* Remove unnecessary import

* Implement private stores

* Return value from sync actions

* Minor optimizations and improved comments

* Don't use async inside `data-wp-watch`

* Use a single Provider in context directive

* Remove DeepPartial type

* Do not check if element exists

* Add the `current` prop of state inside the scope

* Move getters outside scope

* Fix wc-key assignment

* Fix missing `navigate` in directives

* Fix namespace not being picked in the same element

* Deep merge raw stores instead of proxied ones

* Fix namespace assignment

* Allow forward slashes in namespaces

* Migration of Product Collection and Product Button blocks to the new `store()` API (https://github.com/woocommerce/woocommerce-blocks/pull/11558)

* Refactor Product Button with new store() API

* Use `wc_initial_state` in Product Button

* Fix namespace

* Remove unnecessary state

* Test namespaces in directive paths

* Add test context with namespace

* Simplify woo-test context

* Move addToCart and animations to a file

* Do not pass `rawStore` to `afterLoad` callbacks

* Move callbacks and actions back to the main file

Because the animation was broken.

* Remove selectors in favor of state

* Use default ns in `getContext` for state and actions

* Remove `afterLoad` callback

* Remove unnecessary ns

* Fix getContext in add-to-cart

* Replace namespace and delete unnecessary store

* Pass context types only once

* Use an alternative for requestIdleCallback

* Add previous react code for notices

* Add namespace to Product Collection block

* Replace getTextButton with getButtonText

* Add block name to the ProductCollection namespace

* fix style HTML code

* Remove circular deps error on the Interactivity API

* Product Gallery block: Migrate to new Interactivity API store (https://github.com/woocommerce/woocommerce-blocks/pull/11721)

* Migrate Product Gallery block to new Interactivity API store

* Fix some references

* Add missing data-wc-interactive

* Fix an additional namespace

* Remove unnecessary click handler

* Dialog working

* Refactor action names

* Reindex PHP array

There was some missing indexes, which turned the array into an object in JS.

* Remove unused event handlers

* Move next/previous logic to external function

* Move StorePart util to the types folder

* Rename namespace to `woocommerce/product-gallery`

* Undo product collection namespace renaming

* Remove unnecessary namespace

* Don't hide the large image on page load

* Minor refactorings

* Fix eslint error

* Fix php cs errors with spacing and double arrows alignment

* Disable no-use-before-define rule for eslint

* Disable @typescript-eslint/ban-types rule for eslint

* Fix parsed context error in e2e tests

* Fix context parser for Thumbnail image

* Move store to the top of the frontend file

* Add interactivity api utils to the @woocommerce/utils alias

* Replace deprecated event attribute

---------

Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: roykho <roykho77@gmail.com>

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>

* Fix error when closing product gallery dialog with keyboard escape key

* use wc_initial_state instead of wc_store

---------

Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>
2023-11-21 11:46:15 +01:00
Mike Jolley 3a49ae4dd3 Add tests for company address field (https://github.com/woocommerce/woocommerce-blocks/pull/11807)
* Company field tests

* Click page body before unchecking box
2023-11-21 10:04:51 +00:00
Luigi Teschio 86ab0ab3b1 Product Button: enqueue always the store (https://github.com/woocommerce/woocommerce-blocks/pull/11858) 2023-11-21 10:26:16 +01:00
Tung Du 3b31aa715c add: default template for Collection Filters block (https://github.com/woocommerce/woocommerce-blocks/pull/11805) 2023-11-21 16:25:43 +07:00
Daniel Dudzic eaa9e74a58 Run E2E test suite on Twenty-Twenty Four (https://github.com/woocommerce/woocommerce-blocks/pull/11466)
* Run E2E test suite on Twenty Twenty-Four

* Update TT4 download URL to the stable one

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-11-21 09:11:19 +00:00
Manish Menaria 0444407d70 Fix: 404 error for No results block CSS file (https://github.com/woocommerce/woocommerce-blocks/pull/11854)
This commit introduces the `get_block_type_style` method in the `ProductCollectionNoResults` class. This new method is designed to manage frontend style handling specifically for this block type. Currently, it returns null, indicating no specific styles are assigned at this stage.
2023-11-21 12:53:26 +05:30
Tung Du 182e821539 MVP: Attribute filter block powered interactivity API (https://github.com/woocommerce/woocommerce-blocks/pull/11749)
* Update Interactivity API JS files

* Disable TS checks in the Interactivity API for now

* Add new SSR files

* Replace wp_ prefixes with wc_ ones

* Replace wp- prefix with wc-

* Replace guternberg_ prefix with woocommerce_

* Remove file comments from Gutenberg

* Rename files with `wp` prefix

* Fix code to load Interactivity API php files

* Remove TODO comments

* Replace @wordpress with @woocommerce

* Update Webpack configuration

* Fix directive prefix

* Remove interactivity folder from tsconfig exclude

* Add client-side navigation meta tag code

* Remove unneeded blocks.php file

* Fix store tag id

* Register Interactivity API runtime script

* Fix Interactivity API runtime registering

* Add Simple Price Filter block

* Remove all files related to directive processing in PHP

* Use values directly for SimplePriceFilter SSR

* Reset pages to 0 when changing filter

Note: we also need to do this with `/page/x`

* wip

* phpcs

* register price filter as inner block

* try: render block using save

* add types

* use min range var instead of 0

* inject dynamic data

* query price data in editor

* better injecting interactivity data

* remove rounding

* Product Collection Data endpoint doesn't care about current query so we remove the context for now

* extract data injecting as a method, possbily a trait in the future

* add sidebar setting

* duplicating the markup in php render callback for safety

* remove directive from edit component

* show prices without decimal

* use final class

* use sample collection data response

* prepare for multiple styles support

* use collection data from context

* cleanup props and props passing

* pass only necessary states

* retire heredoc in favor of late escaping

* reorganize style

* inherit style from current price filter react component, pre extract the component for multiple display style support

* keep minPrice smaller than max

* remove unnecessary active handler logic

* update folder structure

* avoid whitespace change

* clean up

* title

* move inspector to component folder, ready to be extracted to inner block

* block icon

* block name

* name

* use inner block for view

* inner block view switcher

* try: process data in Collection Filtes block only

* wip: query collection data from collection filters block only

* provide all context from collection filters block

* simplify context passing

* feat: use default attribute to define filter type of view block

* rename

* remove price block

* rename price slider to price, default price filter should be a slider

* type cleanup

* fix ancestor block name

* only passing the collection data down

* wip

* recusive

* editor preview

* refactor: data fetching, context passing, and code organization

* initial attribute filter block

* feat: attribute selector

* inspector control

* wip

* break the edit into smaller components

* wip: editor component

* extract checkbox list

* wip editor preview

* show count checkbox list

* fix param aggregation for attribute filter blocks

* post merge fix

* fix param aggregation for attribute filters

* fix: set correct selected attribute

* WIP checkbox list

* WIP checkbox list

* avoid action name conflicts

* Checkbox list front end

* phpcs

* update context on input, navigate on change

* fix: attribute selection

* dropdown

* remove isDeepEqual

* add: warning when attribute has no products or no attribute is selected

* update type

* update type

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
2023-11-21 14:22:20 +07:00
Tung Du 73d89b77a7 Fix: Product Collection show products with correct stock statuses (https://github.com/woocommerce/woocommerce-blocks/pull/11708)
* update the get visibility query method

* fix the condition

* remove unnecessary test
2023-11-21 11:29:24 +07:00
Patricia Hillebrandt 9b99154d72 Customize your Store > Implement retry mechanism, enhance prompts and fix issue with AI content not being generated for new products (https://github.com/woocommerce/woocommerce-blocks/pull/11759)
* Fine-tune the prompts for generating product titles.

* Update the prompt for images.

* Update the prompts for generating content for patterns.

* Break down the pattern content generation into individual methods.

* Add character limit to prompts.

* Add character limit for a handful of titles.

* Add character limit to the title of the product-collection-4-columns pattern.

* Update the prompt to not add abbreviations

* Introduce the refine_returned_images_results method for AI to filter the images returned by Pexels

* Implement retry if the number of images returned by Pexels API is smaller than the number of images required by products and patterns.

* Update the prompt for the images search term.

* Fix AI image assignment for newly created products and improve performance.

* Ensure no additional dummy products are created or updated in simultaneous requests.

* Fix error on generating content for patterns for the first time and saving it to the post.

* Return error if the connection with AI failed.

* Update the prompt character limit for the Featured Category Triple pattern.

* Implement retry if the API connection with AI fails. Update the prompt to remove the length instruction. Add the last_business_description check to prevent duplicated API calls. Set a transient for images in case the request fails.

* Add retry for returning the refined search results. Update the prompt for defining the search term. Update error validation.

* Update the structure for fetching patterns content and reduce the number of requests.

* Break down the pattern ai content generation and assignment into multiple methods and introduce retry in case of failure.

* Update the structure for applying the AI generated content to patterns. Update the fetch and validation of ai responses and update the prompt to ensure longer texts are returned.

* Update the validation of the content returned by AI by verifying the array keys and ensuring the values are not empty. Additionally, the completion should be set.

* If for some reason AI didn't return the complete list of expected generated content, use the same the previous text from the same pattern as a replacement and avoid making an extra request to fetch just fetch a possible missing result.

* Update prompts for patterns.

* Make a single request to fetch all products data, implement retry for products and validation for the response returned by AI.

* Update the retries variable first within the patterns loop.

* Narrow down the AI content generation to only patterns that are part of the Assembler.

* Update the size of images and the prompt for AI generated content assigned to products.

* Don't make request to AI if the user provided a single word for their business description.

* Update the image assignment to products and remove the unused update_dummy_products method.

* Update the prompt for generating content for patterns.

* Update the prompt for products content generation and ensure that an error is returned if all requests fail.

* Update the prompt for patterns.

* Update the prompt for images.

* Update the prompt for images.

* Update prompt for button text.

* Don't schedule action for updating patterns content if the business description wasn't updated.

* add associative option when the local json is parsed

* Ensure the expected list of results matches the number or products to be updated.

* fix lint error

* Address CR.

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-11-20 16:59:52 +00:00
Mike Jolley 38441fb3dc Check `init_session_cookie` is callable (https://github.com/woocommerce/woocommerce-blocks/pull/11785) 2023-11-20 16:37:13 +00:00
Alex Florisca 8b45dbfecd Add storybook entry for StoreNotice component (https://github.com/woocommerce/woocommerce-blocks/pull/11790)
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2023-11-20 15:49:40 +00:00
Thomas Roberts 777f8c049f Add Storybook entry for `Panel` (https://github.com/woocommerce/woocommerce-blocks/pull/11818) 2023-11-20 15:26:21 +00:00
Luigi Teschio b2046300d1 Update patterns with the new images (https://github.com/woocommerce/woocommerce-blocks/pull/11782)
* delete current images used in the patterns

* Update Feactured Category Cover Image Pattern

* Update Hero Product split pattern

* Update just arrived full hero pattern

* Update Featured Category Triple pattern

* Update Hero Product 3 Split pattern

* Update Hero Product Chessboard

* Update Alterning image and text pattern

* Update Testimonial single pattern

* Update Follow Us on social media pattern

* Update Banner pattern

* Update Alternating Image and Text pattern

* Update Hero Product Chessboard

* Update Featured Category focus pattern

* Update banner pattern

* restore images

* update hero product 3 split pattern

* remove duplicate image

* update dictionary json

* update banner pattern

* optimize image

* fix validation

* fixed width and height

* Replace image Featured Category Focus pattern
2023-11-20 14:43:27 +01:00
Manish Menaria 26550194d3 Product Collection - New 'No Results' block with default UI (https://github.com/woocommerce/woocommerce-blocks/pull/11783)
* Add custom 'No Results' block for Product Collection

This commit introduces a new 'No Results' block, replacing the default core 'query-no-results' block within product collection block. The 'No Results' block provides a tailored experience for WooCommerce stores, displaying a custom message when no products are found in a query.

Key changes include:
- A new block type 'woocommerce/no-results' is registered with a complete configuration and content structure.
- Edit and save functions are implemented for the block, allowing for custom content and styles within the block editor and on the front end.
- Webpack entries are updated to include the new block in the build process.
- A PHP class NoResults is added for server-side rendering, which only displays the block when the product query returns no results, enhancing performance.
- The ProductCollectionUtils utility class is extended to support the new block's query needs.

The new block enriches the user experience by providing clearer communication when no products match the collection criteria and allows store owners to customize the message and presentation.

* Update description

* Rename 'no-results' block to 'product-collection-no-results'

Changes include:
- Updating the block name in `edit.tsx` within the `product-collection` directory.
- Modifying the block.json file in the `no-results` inner block to reflect the new name.
- Adjusting the className in `edit.tsx` for the `no-results` inner block.
- Altering the webpack entries in `webpack-entries.js` to recognize the new block name.
- Renaming the block in `NoResults.php` to align with this update.

This renaming aims to make the block's purpose more clear and to maintain a consistent naming scheme within our product collection blocks.

* Rename NoResults to ProductCollectionNoResults for clarity

This commit renames the `NoResults` class to `ProductCollectionNoResults`. The change aims to enhance clarity and specificity about the class's purpose, indicating that it specifically handles no-result scenarios within product collections.

Changes made:
- Renamed `NoResults.php` to `ProductCollectionNoResults.php`.
- Updated the class name from `NoResults` to `ProductCollectionNoResults` in the file.
- Modified the reference in `BlockTypesController.php` to use the new class name.

This renaming ensures better readability and understanding of the class's role in the context of product collections. The primary change is the renaming, with no significant alterations in the class functionality.

* Update No-Results Message Formatting in Product Collection Block

This commit simplifies the layout and message content for the 'No results found' message in the product collection block's no-results edit component. The changes include:

1. Removal of the full stop in the 'No results found' string for consistency.
2. Replacing the 'core/group' block with a 'core/paragraph' block.
3. Streamlining the message content to be more concise and integrated into fewer text blocks.
4. Direct links for 'clearing any filters' and navigating to the 'store's home' are now included in the same paragraph.

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 13:18:59 +00:00
Thomas Roberts ddcd32897b Rename Checkbox List story to work with storybook 7 (https://github.com/woocommerce/woocommerce-blocks/pull/11679) 2023-11-20 13:15:22 +00:00
Thomas Roberts 143f493097 Add Storybook entries for `TextInput`, `ValidatedTextInput`, and `ValidationInputError` (https://github.com/woocommerce/woocommerce-blocks/pull/11794) 2023-11-20 13:08:16 +00:00
Niels Lange e6a885283b Increase CSS specificity for local pickup address (https://github.com/woocommerce/woocommerce-blocks/pull/11772)
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 13:07:00 +00:00
Mike Jolley 0981e973c5 Continue validating after doing nested properties (https://github.com/woocommerce/woocommerce-blocks/pull/11792) 2023-11-20 13:05:42 +00:00
Thomas Roberts cc84383730 Move all totals components into components package (https://github.com/woocommerce/woocommerce-blocks/pull/11773)
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 12:53:41 +00:00
Paulo Arromba 1da927c64d Updated composer.lock and minor deps (https://github.com/woocommerce/woocommerce-blocks/pull/11817)
* Updated composer.lock and minor deps

- Upgrading automattic/jetpack-admin-ui (v0.2.23 => v0.2.25)
- Upgrading automattic/jetpack-connection (v1.58.2 => v1.60.1)
- Upgrading automattic/jetpack-status (v1.18.5 => v1.19.0)
- Upgrading theseer/tokenizer (1.2.1 => 1.2.2)
2023-11-20 12:51:14 +00:00
Mike Jolley 1f1808e616 Fix strings in classic-checkout modal window (https://github.com/woocommerce/woocommerce-blocks/pull/11771)
* Fix strings in modal window

* Update assets/js/editor-components/incompatible-extension-notice/modal.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

---------

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2023-11-20 12:36:49 +00:00