Commit Graph

137 Commits

Author SHA1 Message Date
Tung Du 0b51900bd2 Fix: Wait for the product to be added to cart before redirecting customer to the cart page (https://github.com/woocommerce/woocommerce-blocks/pull/6466) 2022-05-27 13:36:49 +07:00
Albert Juhé Lluveras bcdb2174aa Remove bold styles from All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/6436) 2022-05-20 15:15:55 +02:00
Daniel Dudzic 562a1afd56 Remove the ToggleButtonControl in favor of ToggleGroupControl (https://github.com/woocommerce/woocommerce-blocks/pull/5967)
* Remove the ToggleButtonControl in favor of ToggleGroupControl

* Remove ESLint errors. Use experimental feature as this is low risk

* Fix the 'Expected preceding comment block' ESLint error

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-04-11 13:33:46 +02:00
Alex Florisca 0c7c2db6c0 Update @woocmmerce/eslint-plugin to 2.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6203)
* Update @woocmmerce/eslint-plugin to 2.0.0

* Fixed some eslint errors

* Fix syntax errors

* Fix most linting errors

* Feedback changes

* Fix one more eslint issue
2022-04-08 14:47:19 +01:00
Thomas Roberts cab947bc2b Remove `useStoreNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6159)
* Make useStoreNotices interact directly with the store

* Get/set error notices directly in store in paymentMethodDataContext

* Add hasNoticesOfType util

* Remove useStoreNotices and interact directly with data store

* Create/remove notices directly in store

* Remove tests for useStoreNotices

* Add tests for notices util

* Use setIsSuppressed from useStoreNoticesContext

* remove useStoreNotices hook

* Update context typedef to define only isSuppressed and setIsSuppressed

* Remove all values from StoreNoticesContext besides setIsSuppressed

* Wrap Cart and Checkout blocks in StoreNoticesProvider (for isSuppressed)

* Make StoreNoticesContainer a named export

This is required so we can import it from @wooommerce/base-context

* Change addErrorNotice to createErrorNotice to match store action

* Remove unnecessary StoreNoticeProviders and pass only context to container

* Accept a context in StoreNoticesContainer

* Pass relevant context to StoreNoticesContainer

* Add function to remove notices by status

* Prevent checkout from breaking when removing notices during processing

* Prevent TS error about not included path

* Add StoreNoticesContainer to single product block

* Add StoreNoticesContainer to All Products Block

* Ensure errors are shown when using All Products & Single Product Blocks

* Add a context arg to removeNoticesByStatus

* Use correct contexts for all products and single product block

* Update tests to reflect new context argument

* Re-add missing block file for order-summary

* Remove block file for order-summary

* Send context to useStoreCartCoupons to show errors correctly
2022-04-08 13:11:50 +01:00
Alba Rincón b56097337f Update `Product Title` link settings to match `Post Title` (https://github.com/woocommerce/woocommerce-blocks/pull/6131)
* Rename `Product Title` `Content` panel to `Link settings`

* Rename toggle `Link to Product Page` to `Make title a link`

* Remove help text

* Add `rel` and `linkTarget` to the `Product Title` settings

* Add `rel` and `linkTarget` to the `Product Title` block

* Only add the `target` attribute if the title is rendered as a link

* Keep the `nofollow` in rel as it was before

* Make `linkTarget` and `rel` optional

To not change the html generated for other components also using `ProductName`

* Add tests fotr the `Title` component

* Improve rel condition

* Extract `linkRel` variable

* Remove unnecessary undefined

* Remove the default value for `linkTarget`

Since it is the default behavior of the browsers, we don't need it.

* Remove the `nofollow` rel value

It was decided to remove it since it's a link to internal pages.
See the PR discussion for more context.

* Remove the `rel` option

It does not have much sense to have it since it's always an internal link.
See the PR discussion for more context.

* Clean-up `rel` related code
2022-04-04 09:06:24 +02:00
Tomasz Tunik f7f1b89dc5 Upgrade @wordpress/scripts and /env packages (https://github.com/woocommerce/woocommerce-blocks/pull/6114)
* upgrade wordpress/scripts to 22.3

* update jest config/setup

* add explicit-exports-references plugin

to handle payment-method-config.tsx spying on external methods
the way code is output now changed and tests like this would not
work anymore as transpilet files were no longer using exports but
local references to methods.

* missing snapshot

* make cart-products E2E test more stable

* surppress eslint error in test file

* fix css stylelint issues

* update eslint-plugin-woocommerce eslint package

* remove temp test:e2e:start script

* re-run

* add stylelint as recommended extension

* remove redundant types (provided by packages now)

* patch update @testing-library/jest-dom
2022-03-28 15:00:20 +02:00
Daniel Dudzic 5a8e94d86e Product Ratings: Add Global Styles font size and spacing support (https://github.com/woocommerce/woocommerce-blocks/pull/5927)
* Product Ratings: Add font size and spacing support

* Fix useTypographyProps hook

* Set SkipSerialization for Ratings block props

* Add additional hasSpacingStyleSupport check for the spacing

Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 16:52:00 +01:00
Tomasz Tunik 2ad55b5b9e Fix box-sizing on Global Styles blocks with border width control (https://github.com/woocommerce/woocommerce-blocks/pull/6043)
Set box-sizing to border-box on affected blocks: Featured product, featured category, sale badge.
2022-03-11 13:01:15 +01:00
Luigi Teschio f78b2d8619 Remove not used attributes (https://github.com/woocommerce/woocommerce-blocks/pull/5974)
* Remove not used attributes woocommerce/woocommerce-blocks#5952

remove not used attributes

* remove not necessary jsdoc comments

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-11 12:44:51 +01:00
Tomasz Tunik f15d628610 Fix 404 and 500 errors in E2E test logs, editor and front-end. (https://github.com/woocommerce/woocommerce-blocks/pull/5989)
* Change atomic blocks to not use custom webpack build paths

we want to always load lazy loaded components from their default paths
to avoid having to handle importing components in different ways for
regular and atomic component packages

* Add footer parts to test themes

The Site Editor is expecting the footer parts to be there or it will try to
load them anyways and throw a 404. It's not breaking, but it's polluting
the console.

* Use REST API to tear down the templates

Previously, we used a util called `trashAllPosts` which navigated to the post UI
and deleted all the posts to tear down any side-effects of template editing tests.

However, with a [recent change](14e20f72b5),
WP Core removed the UI for those and that made our tests meet a 500 error.

Using the REST API should also make everything faster.

* Remove deprecated pupeteer waitFor usage

was still present in attribute-filter.test.js

* Update package-lock.json

* pin package versions

* Unify all atomic blocks to register on php side

* Remove Atomic Blcoks chunk_translation handling from AllBlocks

Before it was responsible for enabling translations for all the atomic blocks

* Add per atomic block chunk_translation registration

* update @wordpress/e2e-test-utils to 6.0.2

* add optional puppeteer

* pin workflows node version to 16.13.2

* upgrade package-lock

* upgrade package-lock

* set react and react-dom as peerDeps

* remove atomic block registration

Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-03-10 11:00:23 +01:00
Tomasz Tunik 6e185e0e2b Move __experimentalSelector outside of hasSpacingStyleSupport check (https://github.com/woocommerce/woocommerce-blocks/pull/6011) 2022-03-08 10:38:42 +01:00
Luigi Teschio 4b80f92c02 Add feature gate for enabling the global styles for Product Sale Badge block only for the feature plugin (https://github.com/woocommerce/woocommerce-blocks/pull/6008)
* Add feature gate for the global styles for Product Sale Badge block woocommerce/woocommerce-blocks#6007

Add feature gate for the global styles for Product Sale Badge block

* add a check for the spacing support
2022-03-07 18:39:11 +01:00
Luigi Teschio 0f52c23eb4 Add font-style and font-weight support for ProductCategory List woocommerce/woocommerce-blocks#5670 (https://github.com/woocommerce/woocommerce-blocks/pull/5928)
Add font-style and font-weight support for ProductCategory List
2022-03-01 15:50:56 +01:00
Luigi Teschio 6fbb97f043 Add margin support on the Product Image block (https://github.com/woocommerce/woocommerce-blocks/pull/5925)
* Add margin support on the Product Image block woocommerce/woocommerce-blocks#5671

Add margin support on the Product Image block

* fix tests

* more specific selector

* update mixin
2022-02-28 18:41:10 +01:00
Tomasz Tunik 475b50573d Global Styles support for Product Price block (https://github.com/woocommerce/woocommerce-blocks/pull/5950)
* Add Global Styles support to product price block

- This comes sat a cost of losing control over regular vs sale price
- This includes refactor of attribute from align to textAlign
   which is a reserved supports feature attribute and textAlign is
   used across the Gutenberg project

* Add experimentalSelector and register as PHP block

This is required to make the GlobalStyles work inside of
the InnerContent block. Ie. All Products block.

* move sharedConfig supports outside of isFeaturePluginBuild check

* restore regularPriceClassName

* remove douplicated block registration on php side
2022-02-28 12:36:55 +01:00
Luigi Teschio 8caaeec998 Add Global Styles support for the Add To Cart Button block woocommerce/woocommerce-blocks#5666 (https://github.com/woocommerce/woocommerce-blocks/pull/5816)
* Add Global Styles support for the Add To Cart Button block woocommerce/woocommerce-blocks#5666

Add Global Styles support for the Add To Cart Button block

* remove support to font size

* try: fix the style override issue for add to cart button (https://github.com/woocommerce/woocommerce-blocks/pull/5843)

* restore typography support

* fix font weight

* add support for font weight

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-02-24 15:35:23 +01:00
Luigi Teschio a02e79ea38 Fix Global Styles for Product Image, Product Category List and Product Tag List Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5852)
* fix Global Styles for Product Image, Product Category List and Product Tag List blocks

fix Global Styles for Product Image, Product Category List and Product Tag List blocks

* Block style font-size was applying wrong value for fontSize

* Add missing __experimentalSkipSerialization to Category List

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-02-22 18:06:33 +01:00
Luigi Teschio 30e10295c1 Rating Product block: Add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5521)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* Rating Product block: add support for global style woocommerce/woocommerce-blocks#4965

Rating Product block: add support for global style

* add feature flag

* fix import after merge

* fix global style css generation

* restore css for classic product rating html element

* don't apply the global style to PHP blocks

* remove registration
2022-02-15 15:48:45 +01:00
Luigi Teschio fba8b3767f Product Image block: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5562)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Product Image block: enable global style woocommerce/woocommerce-blocks#4965

Product Image block: enable global style woocommerce/woocommerce-blocks#4965

* fix test
2022-02-14 11:57:55 +01:00
Luigi Teschio d096b21504 Tag List block: Add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5528)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* Tag List block: add support for global style woocommerce/woocommerce-blocks#4965

Tag List Block: add support for global style

* add feature flag
2022-02-14 11:34:28 +01:00
Luigi Teschio 481f4c8e8e Sale Product Block: Enable global style (https://github.com/woocommerce/woocommerce-blocks/pull/5565)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* Featured Category block: Add support for global style woocommerce/woocommerce-blocks#4965

Featured Category block: Add support for global style

* fix border color

* Sale Product block: enable global style woocommerce/woocommerce-blocks#4965

Sale Product block: enable global style woocommerce/woocommerce-blocks#4965

* add comment
2022-02-14 11:32:13 +01:00
Luigi Teschio f2dad05e0d Category List block: add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5516)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* Enable global style for category list block woocommerce/woocommerce-blocks#4965

Enable global style for category list block

* fix import after merge

* add save function

* add feature flag
2022-02-14 11:29:17 +01:00
Tomasz Tunik ee6d1b5ae3 Add to cart button ignored redirect to cart setting (https://github.com/woocommerce/woocommerce-blocks/pull/5708)
* Expose products settings in wcSettings

For the time being we expose only what is used by the blocks
which is `cartRedirectAfterAdd`. In the future more can be added
as needed. Setting is accessible via `getSetting( 'productsSettings' )`.

We namespace the settings under productsSettigns to reflect
the domain and how settings are organised in Woo admin and to
inform that this is an object with more settings within.

This setting normally was available **only** if AJAX add to cart was set
as a js global `wc_add_to_cart_params.cart_redirect_after_add`.
By accessing the option directly we ensure it’s exposed
to blocks regardless of if AJAX option is enabled.

* update AddToCartButton to respect cartRedirectAfterAdd

This adds the redirect directly on the AddToCartButton after succesful
add to cart action. This follows convention that redirects or other side
effects shouldn’t happen as part of the action but rather be part of the
control that triggers such flow.
2022-02-09 09:26:25 +01:00
Alex Florisca 9b3fdbb0b0 Ts blocks (https://github.com/woocommerce/woocommerce-blocks/pull/5668)
* filter-element-label -> ts

* filter-submit-button -> ts

* form -> ts

* load-more-button -> ts

* loading-mask -> ts

* pagination -> ts

* ProductList -> ts (in progress)

* ProductList -> ts continued

* ProductList -> ts - done + fix some ts errors

* ProductList -> ts continued

* ProductList -> ts

* Tidy up

* Extract type for RegisteredBlockComponent

* Feedback from Mike

* Fix unit tests
2022-02-07 09:34:30 +00:00
Mike Jolley 2b5f115d41 Remove custom `Icon` component in favour of `@wordpress/icons` where possible (https://github.com/woocommerce/woocommerce-blocks/pull/5599)
* Remove atom icon

* Swap icon usage to WordPress package

* remove unused icons from library

* Use @wordpress/primitives

* Product cats block to listView

* On-sale to use percent instead of tag icon

* add to cart button use button icon

* on sale products block icon

* Handpicked products use stack icon

* Products by stock box icon

* Make sparkles woo purple

* Fix icon name

* Correct more tag name

* fix path to icons

* Update snaps

* Update readme to explain updated usage

* Import SVG and path from primitives

* Missing isFeaturePluginBuild

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* Update assets/js/icons/README.md

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>

* update lock

Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
2022-02-01 16:54:38 +00:00
Alex Florisca 4ba300d6d1 Prevent third party blocks from breaking the entire checkout/cart block (https://github.com/woocommerce/woocommerce-blocks/pull/5297)
* Prevent third party blocks from breaking the entire checkout block

* Fixed types and block error boundary around forced blocks

* Move InnerBlocksComponentWrapper and remove extra }

* Allow HTML nodes to be rendered in the component tree, not just eleents
2022-01-25 12:01:19 +00:00
Tung Du 718f2dbc6f Mini Cart Contents: Support link and text colors (https://github.com/woocommerce/woocommerce-blocks/pull/5566) 2022-01-22 00:39:04 +07:00
Luigi Teschio dd36c00180 Restore correct font style when the block is loaded in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/5600)
* Restore correct font style when the block is loaded in the editor

Restore correct font style when the block is loaded in the editor

* fix style on Twenty Twenty theme
2022-01-20 10:02:17 +01:00
Luigi Teschio 5f37425c90 Fix global style for Product Summary block, Product Stock Indicator block, and Product Title block (https://github.com/woocommerce/woocommerce-blocks/pull/5595)
* Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

Fix global style for Product Summary block, Product Stock Indicator block, and ProductTitle block

* add feature flag

* fix lint errors

* fix global style bugs on Product Title block
2022-01-19 15:02:30 +01:00
Luigi Teschio 2a2aee49df Stock Indicator block: Add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5525)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* Stock indicator block: add support for global style woocommerce/woocommerce-blocks#4965

Stock indicator block: add support for global style

* fix import after merge
2022-01-17 10:11:26 +01:00
Niels Lange 599e395dc1 Fix inconsistent HTML of rating section (https://github.com/woocommerce/woocommerce-blocks/pull/5552) 2022-01-14 18:32:28 +07:00
Luigi Teschio d2ef7143d9 Summary Product block: Add support for global style (https://github.com/woocommerce/woocommerce-blocks/pull/5524)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* Summary Product block: add support for global style woocommerce/woocommerce-blocks#4965

Summary Product block: add support for global style

* add color global style under feature flag

* fix import after merge

* fix typo
2022-01-12 16:31:25 +01:00
Luigi Teschio 9ad060b352 Product Title block: add support global style (https://github.com/woocommerce/woocommerce-blocks/pull/5515)
* Product title: add support global style woocommerce/woocommerce-blocks#4965

* add specific type

* add custom save function

* move hooks in a specific folder

* fix crash on WP 5.8

* fix global style title color (https://github.com/woocommerce/woocommerce-blocks/pull/5548)

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-01-12 14:33:46 +01:00
Mike Jolley a1695861f2 Add minimum quantity, maximum quantity, and step (multiple_of) to the Cart Block and Store API (https://github.com/woocommerce/woocommerce-blocks/pull/5406)
* add min and step to Store API

* add min and step support

* typo

* Update assets/js/base/components/quantity-selector/index.tsx

* Update assets/js/base/components/quantity-selector/index.tsx

* Fix debounce callback

* Style qty input to show steps

* Implement quantity_limits in API

* Quantity validation

* Update product API

* Normalize on + -

* Separate add to cart events from cart item events in regards to limits

* Prevent qty change for editable line items

* Unify filters

* Remove step number indicator from buttons ¯\_(ツ)_/¯

* Normalize on mount

* Update docs

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-01-11 11:09:59 +00:00
Niels Lange 6a74887464 Limit CSS styles to WooCommerce Block icons only (https://github.com/woocommerce/woocommerce-blocks/pull/5363)
* Limit CSS styles to WooCommerce Block icons only

* Update assets/css/editor.scss

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-12-10 21:32:44 +07:00
Niels Lange ae9de9ea32 Fix text domain validation problems (https://github.com/woocommerce/woocommerce-blocks/pull/5095)
* Ignore validation of text domain 'woocommerce-gateway-stripe'
* Add missing 'woo-gutenberg-products-block' textdomain
2021-11-08 21:07:42 +07:00
Seghir Nadir bcd1d69c46 pass blockWrapper to forcedBlocks (https://github.com/woocommerce/woocommerce-blocks/pull/5069) 2021-11-04 13:42:30 +01:00
Seghir Nadir d70c309c37 expose with-filtered-attributes (https://github.com/woocommerce/woocommerce-blocks/pull/5058) 2021-11-04 11:03:33 +00:00
Tung Du 9b1a289683 Add global styles to Product Title block (https://github.com/woocommerce/woocommerce-blocks/pull/5009)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-10-28 22:51:25 +07:00
Ovidiu Liuta 5b2d24da36 Fix: Adding a visual border to products image placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/4950)
* fixing all products image placeholder border

* fixing grid placeholder image border

* fixing cart checkout product image placeholder border

* order summary product image placeholder border fix

* revert fixing cart checkout product image placeholder border

* fixing product elements atomic block placeholder border

* fixing failing tests for cart-checkout test and class rename

* adding border style mixin

* newline addon

* linting fix and esc_attr addon

* adding border color to _colors.scss abstracts

* fixing cart-checkout block scss color

* removing class names from product-elements atomic block placeholder images

* css linting fix

* css linting fix

* css linting fix

* fixing empty className in cart-checkout

* adding cart-checkout fallback alt text to product name and css changes empty alt placeholder

* adding image fallback alt to AbstractProductGrid

* updating checkout snapshot to include alt

* code style changes

* removing unused scss code

* adding img alt style fix to prevent global changes
2021-10-28 13:57:20 +01:00
Tom Cafferkey b8fbb56055 Convert Title component to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/4891)
* Convert sharedConfig and Title blockConfig to TS

* Convert constants.tsx to TS

* Convert attributes.js to TS

* Amend attributes.ts record type

* Convert title component edit.js to TS

* Convert title component block.js to TS

* Amend product name index.tsx to prevent TS errors in product title block.tsx

* Amend product-name and base tsconfig

* Add rel to ProductName component element

* Replace ReactElement with JSX.Element

* Move TagName component to outside of the main component

* Add HTMLAttributes import

* WIP: Add props to TagName component

* Fix TagName typing

* Update TagName interface

* Replace ReactElement typing with JSX.Element

* Code review feedback amends

* Replace return type undefined to void

Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
2021-10-21 09:58:03 +01:00
Mike Jolley 5cd05b6d99 Add custom className support to Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4978)
* Pass classname from DOM to react components

* Actions Block ClassName support

* Form step field classname support

* Payment block className support

* Classname support for fields and totals

* Order summary classname support

* Classname support for order note block

* Express payment classname support

* Terms block custom class

* Let useBlockProps handle class in actions block
2021-10-20 17:18:13 +01:00
Niels Lange 02dbd8bf4f Correct WooCommerce branding color (https://github.com/woocommerce/woocommerce-blocks/pull/4959) 2021-10-20 10:30:16 +01:00
hafhaf10 4d0ba20d6d Fix correct branding color (https://github.com/woocommerce/woocommerce-blocks/pull/4911)
* Correct WooCommerce branding color

* Correct WooCommerce branding color

* Fixed lowercase colors

* Changed color in more files
2021-10-15 15:27:59 +01:00
Tom Cafferkey 0f4161aff9 Convert CategoryList to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/4909)
* Converted config files

* Converted constants file

* Converted attributes file

* Coverted edit file

* Convert block file

* Remove space from config
2021-10-12 09:21:00 +01:00
Michael P. Pfeiffer e39f175a0f Convert product elements shared config to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/4908)
* Convert product elements shared config to TypeScript

* Limit import to type

* Convert deprecated empty save function

* Add comment explaining omitted attributes and title properties

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2021-10-07 15:42:49 +02:00
Tom Cafferkey ee84901ab8 AttributePicker: Set default values if they exist (https://github.com/woocommerce/woocommerce-blocks/pull/4815)
* Update API to add default boolean to attribute values and use this within the component to set the default attributes.

* Modify and add unit tests for isObject and getDefaultAttributes

* Sanitize attribute name to accommodate for custom attributes being default values.

* Comments for sanitized_attribute_name variable

* Remove second argument from getAttributes
2021-10-06 09:48:13 +01:00
Mike Jolley 04387a7726 Checkout i2: Handle text nodes in inner block rendering (https://github.com/woocommerce/woocommerce-blocks/pull/4822)
* Handle text nodes

* Tidy and add inline doc
2021-09-24 15:06:21 +01:00
Mike Jolley 5c08c75612 Update Checkout to Checkout i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4745)
* Remove i2 from build

* Remove i2 php registration

* Rename old checkout dir

* Rename i2 dir

* Migrate i1 to i2 code

* Register block metadata to fix frontend rendering when migrating to i2

* Register in correct order

* Missing styles

* add register-components to side effectful list

* wrong block class in e2e test

* wp prefix missing on selector

* Fix top level block test

* Reselect labels to work around rerendering

* missing empty cart styles

* Consolodate duplicate styles

* remove init code

* update selectBlockByName

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2021-09-16 13:16:21 +01:00