woocommerce/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout
opr fcfe5ee7dc Stop hidden products from being linked in cart and checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3415)
* Add catalog_visibility to CartItemSchema.php

This is used to get whether the product is visible in the catalogue, visible in the shop only, visible in search results only, or visible everywhere. We need to know this so we can pass it to the ProductImage and ProductName components.

* Remove links from CartLineItemRow if not visible in catalogue

Added catalog_visibility to lineItems prop, and when the product is not visible in the catalogue do not wrap product image in a link. Also pass down the hasLink prop to ProductName.

* Add hasLink prop to ProductName

When this prop is false we should not output the link around the product name. This is for when the product is hidden from the catalogue but we still want to show its name somewhere.

* Add tests and storybook for ProductName

* Add catalog_visibility check to OrderSummaryItem

When the catalogue visibility of a product is set to hidden or search, then the product name in the checkout sidebar should not be hyperlinked.

* Reverse logic for hiding link on product image & disabling link on name

Following a point from @budzanowski we do not need the hasLink prop, making use of disabled is probably a better idea.

* Remove tabindex from a in ProductName & output span if name is disabled

This change removes the need to pass a tabindex to the a in ProductName. This is because a disabled ProductName will now never output an a tag. When the ProductName is disabled a span is output instead, which has no tabindex by default.

This change also reverses the logic to decide whether the a or span should be output so as to make the code more readable and flow better.

* Update storybook and tests/snapshots for ProductName
2020-11-23 13:03:08 +00:00
..
address-form Fix React hook dependency warnings in Cart & Checkout blocks + withAttributes HOC (https://github.com/woocommerce/woocommerce-blocks/pull/3314) 2020-10-27 15:37:18 +01:00
form-step Ensure "Add a note to your order" section is styled correctly when disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3427) 2020-11-20 10:48:26 +00:00
order-summary Stop hidden products from being linked in cart and checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3415) 2020-11-23 13:03:08 +00:00
payment-method-icons Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
payment-method-label Update base/components classnames (https://github.com/woocommerce/woocommerce-blocks/pull/2711) 2020-06-17 11:53:42 +02:00
place-order-button Replace usage of `cart-checkout/button` with `@woocommerce/base-components/button` (https://github.com/woocommerce/woocommerce-blocks/pull/2781) 2020-06-25 16:50:48 +01:00
policies Use @wordpress/base-styles and @automattic/color-studio as a base for our styles (https://github.com/woocommerce/woocommerce-blocks/pull/3300) 2020-10-22 12:40:32 +02:00
product-backorder-badge Cart block: show products on backorder (https://github.com/woocommerce/woocommerce-blocks/pull/2833) 2020-07-14 17:25:53 +02:00
product-badge Cart block: show products on backorder (https://github.com/woocommerce/woocommerce-blocks/pull/2833) 2020-07-14 17:25:53 +02:00
product-image Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
product-low-stock-badge Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
product-metadata Remove text color from Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2745) 2020-06-23 11:13:53 +01:00
product-name Stop hidden products from being linked in cart and checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3415) 2020-11-23 13:03:08 +00:00
product-sale-badge Update dependency wordpress-element to v2.17.1 (https://github.com/woocommerce/woocommerce-blocks/pull/3104) 2020-09-26 09:51:21 -04:00
product-summary Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
product-variation-data Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
return-to-cart-button Remove text color from Cart and Checkout blocks (https://github.com/woocommerce/woocommerce-blocks/pull/2745) 2020-06-23 11:13:53 +01:00
shipping-calculator Cart and checkout should respect the global "Hide shipping costs until an address is entered" setting (https://github.com/woocommerce/woocommerce-blocks/pull/3383) 2020-11-17 11:58:38 +00:00
shipping-location Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
shipping-rates-control Cart and checkout should respect the global "Hide shipping costs until an address is entered" setting (https://github.com/woocommerce/woocommerce-blocks/pull/3383) 2020-11-17 11:58:38 +00:00
totals Cart and checkout should respect the global "Hide shipping costs until an address is entered" setting (https://github.com/woocommerce/woocommerce-blocks/pull/3383) 2020-11-17 11:58:38 +00:00
index.js Merge ProductPrice atomic block and component (https://github.com/woocommerce/woocommerce-blocks/pull/3065) 2020-09-14 12:56:10 +02:00