woocommerce/plugins/woocommerce-blocks/assets/js
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
..
atomic 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
base 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
blocks [Product Collection] Fix: HTML entity decoding for product names in Hand-Picked Products (https://github.com/woocommerce/woocommerce-blocks/pull/11927) 2023-11-27 12:27:04 +05:30
blocks-registry Simplify @woocommerce/types imports (https://github.com/woocommerce/woocommerce-blocks/pull/8019) 2022-12-23 18:59:02 +07:00
data Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) 2023-10-26 09:37:13 +07:00
editor-components Update notice for default cart and checkout (https://github.com/woocommerce/woocommerce-blocks/pull/11861) 2023-11-21 21:23:13 +07:00
extensions Move phone to default fields section instead of being handled inline. (https://github.com/woocommerce/woocommerce-blocks/pull/11651) 2023-11-14 18:30:23 +00:00
filters Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
hocs Upgrade webpack to version 5 (https://github.com/woocommerce/woocommerce-blocks/pull/8013) 2023-09-20 17:31:52 -03:00
icons Bump @wordpress/icons from 6.1.1 to 9.36.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11611) 2023-11-16 17:40:53 +00:00
interactivity 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
middleware Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
previews Add Local Pickup event and Cart/Checkout page views events (https://github.com/woocommerce/woocommerce-blocks/pull/11225) 2023-10-23 10:23:38 +00:00
settings Move phone to default fields section instead of being handled inline. (https://github.com/woocommerce/woocommerce-blocks/pull/11651) 2023-11-14 18:30:23 +00:00
shared Convert inner-block-layout-context to typescript (https://github.com/woocommerce/woocommerce-blocks/pull/9799) 2023-06-14 06:36:39 -07:00
templates/revert-button Add isSiteEditorPage util (https://github.com/woocommerce/woocommerce-blocks/pull/9468) 2023-05-16 13:59:49 +02:00
types Move all totals components into components package (https://github.com/woocommerce/woocommerce-blocks/pull/11773) 2023-11-20 12:53:41 +00:00
utils Interactivity API: implement the new `store()` API (https://github.com/woocommerce/woocommerce-blocks/pull/11071) 2023-11-21 11:46:15 +01:00
global.d.ts WIP - Checkout i2 Feature Branch Tracking (https://github.com/woocommerce/woocommerce-blocks/pull/4268) 2021-07-22 12:03:00 +01:00
index.js Product Gallery block: Restrict block to be available only on the Single Product template or the Product Gallery template part (https://github.com/woocommerce/woocommerce-blocks/pull/11664) 2023-11-16 15:03:58 +00:00