Commit Graph

1201 Commits

Author SHA1 Message Date
Mike Jolley 3840462cf0 Add Accepted Payment Methods Block (https://github.com/woocommerce/woocommerce-blocks/pull/4944)
* Remove icons from checkout button

* Add new block type

* Register new block

* Remove unused attribute

* Add to new template

* Remove duplicate attributes

* Update Inner Block handling to use consistent appender and unlock payment methods
2021-10-19 12:23:33 +01:00
Mike Jolley dad8331242 Cart i2 Attribute Audit (https://github.com/woocommerce/woocommerce-blocks/pull/4956)
* Add dark mode inputs toggle to top level block

* Remove top level attributes which moved to inner blocks

* Remove unused components

* Pass down hasDarkControls and currentView via context props
2021-10-18 17:12:36 +01:00
Niels Lange 3f530ac755 Add e2e tests for Best Selling Products (https://github.com/woocommerce/woocommerce-blocks/pull/4785) 2021-10-18 15:06:48 +01:00
Tung Du 277a20cca3 Fix: Spilled icecream error with Filter Products by Attribute when no attribute was selected (https://github.com/woocommerce/woocommerce-blocks/pull/4847) 2021-10-15 21:50:47 +07: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
Albert Juhé Lluveras c5bf549d9f Add Mini Cart block tests (https://github.com/woocommerce/woocommerce-blocks/pull/4938) 2021-10-15 12:53:44 +02:00
Mike Jolley 901a78979e Fix positioning of default locked blocks in the editor and frontend (https://github.com/woocommerce/woocommerce-blocks/pull/4937)
* Update default empty template on server side

* template->registeredBlocks wording

* useForcedLayout: insert in correct place

* Remove test div

* Clarify inline docs

* Apply changes to cart block
2021-10-15 10:48:57 +01:00
Raluca Stan 05dc130d21 Register as experimental the Cart i2 blocks and update the feature flag documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4936)
* Use registerExperimentalBlockType for registering Cart i2 related blocks

* Update feature flags and experimental interfaces doc
2021-10-14 13:44:46 +01:00
Ovidiu Liuta eb0ddbe29a Add a label to the textarea from the editor view of the Product search block (https://github.com/woocommerce/woocommerce-blocks/pull/4905)
* woocommerce/woocommerce-blocks#1682 fixing product search accesibility label

* fix duplicate text annoncement

* removing aria-hidden from label
2021-10-14 11:27:05 +01:00
Niels Lange 63b7766586 Increase error message spacing (https://github.com/woocommerce/woocommerce-blocks/pull/4896) 2021-10-14 12:05:13 +07: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
Ovidiu Liuta ae603f3e82 WordPress Coding Standards fix for .scss files (https://github.com/woocommerce/woocommerce-blocks/pull/4918)
* adding timerange limit

* woocommerce/woocommerce-blocks#3739 fixing scss coding standard and removing spaces from parantheses values

* removing unrelated changes

* fixing further instances for parantheses
2021-10-11 14:18:32 +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 c7e966fd28 Fix/price slider aria values (https://github.com/woocommerce/woocommerce-blocks/pull/4839)
* Calculate human readable price values for the purpose of screen readers and set them as the aria values

* Calculate human readable price values for the purpose of screen readers and set them as the aria values
2021-10-06 09:48:17 +01: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
Tung Du edce72e2fb Mini Cart block: improve button accessibility (https://github.com/woocommerce/woocommerce-blocks/pull/4852) 2021-10-04 10:54:28 +07:00
Tung Du 0f2c035423 Fix: remove IntersectionObserver shim (https://github.com/woocommerce/woocommerce-blocks/pull/4808) 2021-09-30 22:58:32 +07:00
Tung Du c1dc6dbc39 Fix: Filter button is not aligned with the input field (https://github.com/woocommerce/woocommerce-blocks/pull/4814)
* fix: filter button alignment

* fix: add dipsplay style class to .wc-block-attribute-filter for easier styling

* fix: overflow inside colum
2021-09-30 11:09:15 +02:00
github-actions[bot] cd5e31d9ba Release: 6.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/4850)
* Empty commit for release pull request

* add changelog

* change minimum_supported_wp_version to 5.6

* add testing instructions

* update testing steps with new code

* add terms and condition block testing steps

* Checkout i2: Show a notice if terms and conditions page (https://github.com/woocommerce/woocommerce-blocks/pull/4859)

* Make Terms block insertable

* add a notice to setup pages

* push updated error design in editor

* fix default text

* remove outline from checkbox-control in error

* update testing docs

* Update readme.txt

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

* Update readme.txt

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

* Update docs/testing/releases/600.md

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

* Update docs/testing/releases/600.md

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

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2021-09-29 11:23:49 +01:00
Seghir Nadir f01072fda1 Checkout i2: Show a notice if terms and conditions page (https://github.com/woocommerce/woocommerce-blocks/pull/4859)
* Make Terms block insertable

* add a notice to setup pages

* push updated error design in editor

* fix default text
2021-09-28 16:01:48 +01:00
Mike Jolley 1aaa00ed2a Cart i2: view switcher shared to children (https://github.com/woocommerce/woocommerce-blocks/pull/4817)
* Replace context with __experimentalShareWithChildBlocks

* Switch to parent block when changing views

* Swap order of views

* Drop default, use first view

* Improve block selection after changing views
2021-09-24 16:13:39 +01:00
Seghir Nadir 8e38c6b857 add blockProps to T&C block (https://github.com/woocommerce/woocommerce-blocks/pull/4843) 2021-09-24 15:59:41 +01:00
Seghir Nadir 244a2baa48 remove duplicate context (https://github.com/woocommerce/woocommerce-blocks/pull/4832) 2021-09-24 15:37:16 +01:00
Seghir Nadir 7769e437ef remove sample block (https://github.com/woocommerce/woocommerce-blocks/pull/4841) 2021-09-24 15:28:09 +01:00
Seghir Nadir f1c936b7d1 Add Cart Totals to cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4823)
* WIP getting to work on frontend

* restore frontend.tsx

* fix layout

* support emtpy cart in frontend

* add cart tital to correct place and move useEffect
2021-09-24 15:23:10 +01:00
Seghir Nadir 1d75435820 scope changes to checkout steps only (https://github.com/woocommerce/woocommerce-blocks/pull/4827) 2021-09-24 15:11:51 +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
Seghir Nadir f9f70893e0 Update Cart & Checkout i2 temporarily locking to be on the parent block (https://github.com/woocommerce/woocommerce-blocks/pull/4837)
* update locking to be on parent, not block

* include cart as well
2021-09-24 14:44:05 +01:00
Raluca Stan a2f39d07f1 Add documentation for registerPaymentMethodExtensionCallbacks (https://github.com/woocommerce/woocommerce-blocks/pull/4834)
* Improve the type for callbacks registered by extensions

The previous type was CanMakePaymentCallback, used for the payment methods's own canMakePayment callbacks, which could also return Promises. In order to eliminate the confusion, a new type has been created that defines callbacks that only return true or false.

* Document registerPaymentMethodExtensionCallbacks

* Update docs/extensibility/filtering-payment-methods.md

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

* Add information about payment method name in documentation

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2021-09-24 14:34:07 +01:00
Raluca Stan 8a657c32da Improve mocking of useStoreCart (https://github.com/woocommerce/woocommerce-blocks/pull/4826) 2021-09-24 10:47:05 +01:00
Seghir Nadir b6167bc179 Cart i2: Render filled and empty Carts on frontend (https://github.com/woocommerce/woocommerce-blocks/pull/4802)
* WIP getting to work on frontend

* restore frontend.tsx

* fix layout

* remove unit tests living where they shouldn't be living

* remove skeleton

* support emtpy cart in frontend

* remove extra todo

* use fragment instead of div

* Add empty cart event

* Remove extra fragment
2021-09-23 16:38:30 +01:00
Raluca Stan 27600b3309 Update canMakePayment to receive cart as argument and make it react to changes in billingData. (https://github.com/woocommerce/woocommerce-blocks/pull/4776)
* Add 	cartCoupons to canMakePayment argument

* Add cart to the paymentMethodArgument and improve the dependencies for the effect calling refreshCanMakePayments

* Debounce refreshCanMakePayments

The initial approach was to debounce billingData and use this value as a dependency for the useEffect that runs refreshCanMakePayments.
But because the depencies array can always change we decided to debounce the callback instead, ensuring this way that callback is not called multiple times: for example when typing a field in the billing address. Debounced was chosen instead of throttle because we want to call refreshCanMakePayments once the change event has stopped, with the final value.

* Update types and docs related to canMakePaymentArgument

* Mock the /cart call when testing payment methods

* Remove unused cartCoupons key in canMakePaymentArguments' interface
2021-09-23 16:27:02 +01:00
Ovidiu Liuta 63582e47b2 woocommerce/woocommerce-blocks#3906 screen reader fix for order summary block accessibility (https://github.com/woocommerce/woocommerce-blocks/pull/4810)
* woocommerce/woocommerce-blocks#3906 screen reader fix for order summary block

* removing tabIndex and extra accesibility text

* adding aria-hidden to total price and translation comments change order
2021-09-23 17:20:32 +02:00
Albert Juhé Lluveras d677ce2c70 Fix infinite recursion when removing an attribute filter from the Active filters block (https://github.com/woocommerce/woocommerce-blocks/pull/4816) 2021-09-23 13:53:24 +02:00
Raluca Stan 9f2cf245b9 Add support for extensions to filter express payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/4774)
* Support express payment methods filtering by extensions

* Add tests for getCanMakePayment and fix payment tests' TS errors

* Add comments for payment-method-config-helper test
2021-09-23 10:09:55 +01:00
Mike Jolley 2c412b2b3b Cart i2: Toolbar based view switcher (https://github.com/woocommerce/woocommerce-blocks/pull/4811)
* New icons

* Add new view switcher

* Context to pass down component controls

* Implement switcher
2021-09-22 16:00:19 +01:00
Mike Jolley 2af90f301c Add/empty and fillted cart wrapper (https://github.com/woocommerce/woocommerce-blocks/pull/4803)
* Update area/types

* Add empty and filled block wrappers

* Add missing useBlockProps

* Add templates and inner block structure
2021-09-21 16:41:09 +01:00
Seghir Nadir 614c7205ef add CartCheckoutFeedbackPrompt to cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4801) 2021-09-21 14:42:12 +01:00
Albert Juhé Lluveras bbbb280b4f Open Mini Cart drawer when adding to cart from the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/4772)
* Open Mini Cart drawer when adding to cart from the All Products block

* Rename param from invalidateCartData to preserveCartData
2021-09-21 15:25:44 +02:00
Seghir Nadir a459360dc1 Add Express Checkout block for Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4791)
* setup basic column blocks

* fix classnames

* move hacks back

* dubplciate columns

* add express payment block

* adjust styles

* fix locking after rebase
2021-09-21 13:38:56 +01:00
Seghir Nadir f2af87226c Adds Proceed to Checkout block to Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4783)
* setup basic column blocks

* fix classnames

* move hacks back

* dubplciate columns

* add proceed to checkout block

* dub code
2021-09-21 13:20:42 +01:00
Seghir Nadir aeb43084f7 Add Cart Summary block in cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4782)
* setup basic column blocks

* fix classnames

* move hacks back

* dubplciate columns

* add summary block

* dub code
2021-09-21 12:58:36 +01:00
Mike Jolley cdc730836a Validate state on options change (https://github.com/woocommerce/woocommerce-blocks/pull/4761) 2021-09-21 11:48:39 +01:00
Seghir Nadir 91f9f160d9 Add Cart Line Items Block to Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4781)
* setup basic column blocks

* fix classnames

* move hacks back

* dubplciate columns

* add cart line items block

* dub code
2021-09-21 11:47:20 +01:00
Seghir Nadir 56551347a6 Setup basic column blocks for Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4780)
* setup basic column blocks

* fix classnames

* fix broken block.json in cart items block

* move hacks back

* dubplciate columns
2021-09-21 11:18:27 +01:00
Mike Jolley f9b9679d62 Switch to external icon for shipping/payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/4760) 2021-09-21 11:01:12 +01:00
Mike Jolley 99f5a5aab3 Add object type to lock attributes (https://github.com/woocommerce/woocommerce-blocks/pull/4790) 2021-09-20 17:10:06 +01:00
Seghir Nadir f44784ffca Create Cart i2 block (https://github.com/woocommerce/woocommerce-blocks/pull/4718) 2021-09-17 16:29:58 +01:00
Mike Jolley da21021255 Show message if user has not yet calculated shipping (https://github.com/woocommerce/woocommerce-blocks/pull/4765) 2021-09-17 12:07:01 +01:00
Albert Juhé Lluveras c07fef9e57 Make All Reviews block honor 'ratings enabled' and 'show avatars' preferences (https://github.com/woocommerce/woocommerce-blocks/pull/4764)
* Make All Reviews block honor 'ratings enabled' and 'show avatars' preferences

* Only add space for image if image is rendered
2021-09-17 11:19:22 +02:00