* Empty commit for release pull request
* Add changelog and version info
* 6.6.0 testing notes
* Remove mini cart from testing instructions
* Clarify testing instructions
* Remove experimental feature from changelog
* fix not found template for the template editor
* update zip
* Remove test instructions for icon
* Testing steps for 5425
* Link order controller to cart routes
* Remove order controller from checkout route
* Fix PHP warnings in abstract schema
* Fix PHP warnings in abstract route
* Update shipping phone handling
* Includes are handled in core now
* Remove maybe_update_order_from_customer
* Add cart_updated routine to all cart routes
* Remove abstract method
* Remove test for woocommerce_blocks_cart_update_order_from_customer_request
* Remove do_order_callback
* Update readme
* Update tests
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Migrate stories for `ProductName` to latest Storybook. Also add props
documentation and add named export.
* Migrate `TotalsFooterItem` to TypeScript and latest Storybook
* Add a `LooselyMustHave` utility type.
* Export `allSettings` so that they can be manipulated in stories and tests
* Implement a way to easily define and reuse Storybook controls
Implement a currency control for a common use-case of selecting currencies.
It currently implements EUR and USD as they have different properties.
* Migrate `TotalsDiscount` to TypeScript and implement stories
* Migrate `TotalsCoupon` to TypeScript and fix stories
* Change Coupon name within Storybook
* Nicer handling of removal of a coupon from Storybook
It now dynamically calculates the discount from the actual coupons.
* Update packages to latest Storybook deps
* Migrate `ReadMore` component and its utils to TypeScript
* Add type definitions for `trim-html` package
* Migrate `ReadMore` stories to newest Storybook
Fixeswoocommerce/woocommerce-blocks#5254
* Convert `ErrorPlaceholder` and `ErrorMessage` to TypeScript
* Add stories for `ErrorPlaceholder` and `ErrorMessage` (https://github.com/woocommerce/woocommerce-blocks/pull/5255)
Stories include:
* Default generic error
* API error
* Unknown error
* Error without possibility to retry
* Base Error atom
Where applicable, the **Retry** button will not only trigger the appropriate
action, but also simulate the loading state of the error component.
* Update references to `ErrorMessage` component to leave the file extension out
Fixwoocommerce/woocommerce-blocks#5255
Refs woocommerce/woocommerce-blocks#5249
* Migrate Storybook to 6.4.0 and enable auto-detection of controls (https://github.com/woocommerce/woocommerce-blocks/pull/5249)
Previously our Babel configuration conflicted with the one provided by
default by Storybook, making us unable to leverage the automatic
detection of properties from both JS and TS components to create
controls (formerly known as knobs).
Upgrading to 6.4.0 fixes a bug that makes it easier to work with
Babel configurations. Also done here:
* Removed a few deprecated addons in favor of the replacement ones
bundled within Storybook Essentials.
* Add auto-detection of certain control types depending on the property names
* Add support for TS stories
More context: https://github.com/storybookjs/storybook/issues/12292
* Use `react-docgen` only in development environments
This should reduce production bundle size dramatically. The only
problem here is that Storybook runs its `build` command with the
`NODE_ENV` set to `production`. For this reason, we change the
script to provide `BABEL_ENV` set to `development` to still make sure
the correct configuration is loaded, while trying to reduce any
side-effects on changing the whole `NODE_ENV`.
* Empty commit for release pull request
* Update readme.txt with release changelog
* Add testing instructions for 6.3.0 release
* Update testing instructions as MD tables didn't work
* Update testing instructions
* Update testing instructions
* Update testing instructions
* Update readme.txt
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update docs/testing/releases/630.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update readme.txt
* Update release zip in testing note
* Update testing instructions
* Remove feature gate condition for Legacy Template block (https://github.com/woocommerce/woocommerce-blocks/pull/5158)
* Update testing instructions
* Update testing instructions
* Update testing instructions
* Update readme.txt
* Update testing instructions
* Update testing instructions
* Update release zip in testing note
* Update testing instructions for SE templates
* Update testing instructions for SE templates II
* Update testing instructions
* Bumping version strings to new version.
* Release: 6.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/5169)
* Empty commit for release pull request
* Fix state validation to compare state codes, and only validate if a country is given (https://github.com/woocommerce/woocommerce-blocks/pull/5132)
* Only get valid states from wc if there is a country
* Shared validation logic which uses keys
* Fix 'Country is required' error on the Cart block when updating shipping address (https://github.com/woocommerce/woocommerce-blocks/pull/5129)
* Fix error on the Cart block
* Created a cartIsHydrated variable in useStoreCart hook and used this to update the billing address in the internal state of the useCustomerData hook
* Fix the country is required error on the Cart page using refs
* Separate api calls to update shipping and billingUpdate billing and shipping addresses only when needed in API calls
* Remove redundant check for customerDataToUpdate
* remove use of refs in initial values
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Make order note block removable (https://github.com/woocommerce/woocommerce-blocks/pull/5139)
* unforce order note
* show block in inserter
* Mini Cart block fatal error caused by append_script_and_deps_src (https://github.com/woocommerce/woocommerce-blocks/pull/5142)
* Remove unused use statements
* Fix types for $script
* `get_script_from_handle` might return null so handle this case to prevent errors
* Missing escaping
* Replace do_action_deprecated with the WC equivalent (https://github.com/woocommerce/woocommerce-blocks/pull/5151)
* Remove feature gate condition for Legacy Template block (https://github.com/woocommerce/woocommerce-blocks/pull/5158)
* Update readme.txt
* Update testing instructions
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Alex Florisca <alexflorisca@gmail.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Alex Florisca <alexflorisca@gmail.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Bump dependencies to fix e2e on m1 macs
* Disable welcome guide more reliably - see 3da717b8d0/packages/e2e-test-utils/src/create-new-post.js
* Update selectors and fixture data for cart block
* unused dep
* Remove duplicate block wrapper
* Remove unused jest configuration files
* More robust click in view switcher test
* Revert fixture data change
* Empty commit for release pull request
* Update readme.txt with release changelog
* Add testing instructions for 6.2.0 release
* Return an element instead of a component in useViewSwitcher (https://github.com/woocommerce/woocommerce-blocks/pull/5016)
* return element instead of component in viewSwitcher
* use ToolbarGroup instead of Toolbar
(cherry picked from commit ad133ba901)
* Update release zip in testing note
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* move empty cart
* remove Cart and rename Cart i2 to Cart
* graduate blocks
* setup template migration from Cart i1 to Cart i2
* back to js so we have a good diff
* add migration
* fix bug in empty cart template
* add useForceLayout hook to edit
* migrate from old block to new block
* migrate styles
* respect align
* add tests
* Include latest cart line item improvements from cart-i1
* Missing changes from cart-i1
* Line items table should be disabled
* Fix e2e tests for cart i2
* update tests to adapt for inner blocks
* update select to resolveSelect to remove warning checker
* rename test/block to test/index
* move blocks to their own file
* undo rename to keep diff clean
* remove .tsx and update jest config
* Revert "update select to resolveSelect to remove warning checker"
This reverts commit 79d55de30edcfe36bbdfe7506df7a09460824f03.
* revert resolveControl
* Fix empty cart editor E2E test by scrolling to the view switch
* parse attributes for order summary block
* migrate attributes when resaving
* Update documentation
Automatic update after running npm run build:docs
* add align options to filled cart and empty cart
* append instead of replcae
* import style.scss in frontend
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* 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>