Commit Graph

3797 Commits

Author SHA1 Message Date
Tung Du 1ba3ca2ba1 Fix: Mini Cart content scrolling issue (https://github.com/woocommerce/woocommerce-blocks/pull/6565) 2022-06-15 15:18:50 +07:00
Albert Juhé Lluveras 027ee07b57 Fix linting errors in WC Blocks 7.8.1 testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/6564) 2022-06-14 10:56:07 +02:00
Tung Du 6531c4cb0b Fix: Convert Filter Products by Price Block to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6514) 2022-06-14 15:48:49 +07:00
Albert Juhé Lluveras 680ebba7cb Fix an endless loop when using product grid blocks inside product descriptions (https://github.com/woocommerce/woocommerce-blocks/pull/6471)
* Fix an endless loop when using product grid blocks inside product descriptions

* Add array_key_exists protection

* Typo in comment

* 👌IMPROVE: Improve comments - woocommerce/woocommerce-blocks#6416

Co-authored-by: Panos (Panagiotis) Synetos <panos.synetos@automattic.com>
2022-06-14 11:24:48 +03:00
Niels Lange 10d6e97833 Use default .editorconfig settings for *.md files (https://github.com/woocommerce/woocommerce-blocks/pull/6553) 2022-06-13 23:10:21 +02:00
Albert Juhé Lluveras bfd62a3f78 Add Testing steps for version 7.8.1 2022-06-13 15:50:02 +02:00
Albert Juhé Lluveras 3cae916042 Add changelog to readme.txt 2022-06-13 15:49:55 +02:00
Niels Lange 15a22db4f4 Update README.md 2022-06-13 14:37:05 +02:00
Michael P. Pfeiffer d7820b98bb Featured items: fix focal point block json spacing (https://github.com/woocommerce/woocommerce-blocks/pull/6552) 2022-06-13 14:06:48 +02:00
Luigi Teschio 04ebfd2264 Fix E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/6415)
* Fix E2E tests woocommerce/woocommerce-blocks#6415

Fix E2E tests

* Add full state in customer data and exclude it from details check

* update webpack configuration

* Revert change to combobox index

* don't splitChunk frontend scripts

* simplfy output folders

* reduce minimum chunk size to 10kb

* add all inner blocks for loading

* better splitChunks

* update translation code

* wait for scripts

* try sleeping

* fix loading translation

* fix tests for mini cart

* simplfy po logic

* automate loading chunks

* rename webpack group file

* rename block.json path

* remove test

* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* restore wp-env json configuration

* restore .wp-env.json

* address feedback

* add comment

* address comments

* improve utils function

* install puppeteer

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-13 11:15:29 +02:00
Tung Du 876e955125 Fix: Convert Filter Products by Stock to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6533) 2022-06-13 08:39:09 +07:00
Niels Lange d7d043cb5b Rename billingData to billingAddress (https://github.com/woocommerce/woocommerce-blocks/pull/6369)
* Rename billingData to billingAddress

* Add unit test to ensure billingData remains accessible

* add integration tests for slots

* Keep billingData in usePaymentMethodRegistration for backwards compatibility

* Gate `billingData` in deprecation gate

* Replace deprecation call

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-06-10 18:59:25 +02:00
Niels Lange d348db4779 Add docs about translation handling (https://github.com/woocommerce/woocommerce-blocks/pull/6405)
* Create translation handling files

* Add docs about “Translation basics”

* Update docs for “Translation basics”

* Add docs about “Translations in PHP files”

* Add docs about “Translations in JS/TS files”

* Update docs for “Translation basics”

* Add docs for “Translation management”

* Add docs for “Translations in FSE templates”

* Add “Translations” to “WooCommerce Blocks Handbook”

* Add docs for “Lazy-load translations”

* Rewrite first paragraph of “Translations in FSE templates”

* Fix typo

* Update repo URL

* Remove obsolete space and comma

* Update repo URL

* Rename lazy-load file

* Add section about “sprintf()” to “Translations in JS/TS files”

* Remove reference to “npm install @wordpress/i18n”

* Add docs for “Translation files and loading”

* Rename readme.md to README.md

* Remove double file extension

* Remove self-explaining explenations

* Update docs/README.md

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

* Update docs/translations/translation-basics.md

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

* Update docs/translations/translation-basics.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-loading.md

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

* Update docs/translations/translation-management.md

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

* Update docs/translations/translations-in-FSE-templates.md

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

* Clarify how to use variables in translations

* Change “i18n” to “internationalization (i18n)”

* Link translation functions to the WordPress reference

* Add Translation management to Translation management

* Update “Translations in FSE templates”

* Lint Markdown files

* Update chunk translation register functions

* Update function that loads the translation file

* Update information about lazy-loading

* Adjust lazy-loading docs title and file name

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-06-10 17:40:05 +02:00
Michael P. Pfeiffer a432a85bf0 Cart: ensure express checkout placeholder does not stick to checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/6547)
* Cart: ensure express checkout placeholder does not stick to checkout button

* Display to affect description only
2022-06-10 15:20:41 +02:00
Luigi Teschio 8ac7fd2440 Restore package.json and package-lock.json (https://github.com/woocommerce/woocommerce-blocks/pull/6546) 2022-06-10 14:05:51 +02:00
Niels Lange 3208da551b Improve the structure of the WooCommerce Blocks Handbook (https://github.com/woocommerce/woocommerce-blocks/pull/6429)
* Improve the structure of the WooCommerce Blocks Handbook

Co-authored-by: Rania Lang <rania.langouretou@automattic.com>
2022-06-09 17:52:19 +02:00
Tung Du 45f48e6b0a Fix: Register Filter Blocks using `block.json` (https://github.com/woocommerce/woocommerce-blocks/pull/6505) 2022-06-09 21:45:24 +07:00
Luigi Teschio abd5c6afd1 Fix ESLint: use window.localstorage instead localstorage woocommerce/woocommerce-blocks#6442 (https://github.com/woocommerce/woocommerce-blocks/pull/6540)
Fix ESLint: use window.localstorage instead localstorage
2022-06-09 14:47:17 +02:00
Niels Lange a748f533a8 Format Markdown files using wp-scripts (https://github.com/woocommerce/woocommerce-blocks/pull/6462)
* Format Markdown files using Prettier

* Format Markdown files using wp-scripts

* Adjust MD linting
2022-06-09 14:43:17 +02:00
Alex Florisca 295184a734 Change Checkout.md to correct mistake (https://github.com/woocommerce/woocommerce-blocks/pull/6541) 2022-06-09 13:18:25 +03:00
Thomas Roberts 0aa3bcd9cb Access correct property of package destination in Store API (https://github.com/woocommerce/woocommerce-blocks/pull/6470)
* Access correct property of package destination

* Check for address_1 first then address
2022-06-09 12:45:00 +03:00
Tung Du 111b4eca48 Convert `useCollectionData` hook to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6535) 2022-06-09 16:05:11 +07:00
renovate[bot] 2bc09b13e6 Update dependency cross-env to v7 (https://github.com/woocommerce/woocommerce-blocks/pull/6504)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2022-06-09 11:26:23 +03:00
Albert Juhé Lluveras b5252dbd8f Disable page scroll when Mini Cart is open (https://github.com/woocommerce/woocommerce-blocks/pull/6532) 2022-06-09 09:58:29 +02:00
Albert Juhé Lluveras d994f06803 Fix PHP notice in Mini Cart when prices included taxes (https://github.com/woocommerce/woocommerce-blocks/pull/6537) 2022-06-09 09:57:37 +02:00
Luigi Teschio 9a80ad3f6a bump version and update tested up value for WordPress and WooCommerce (https://github.com/woocommerce/woocommerce-blocks/pull/6534) 2022-06-07 15:58:18 +02:00
github-actions[bot] 7a05f8559d Release: 7.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6517)
* Empty commit for release pull request

* Add changelog for the 7.8.0 release

* Add testing notes for 7.8.0 release

* move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519)

* update changelog and testing instructions after the cherry-pick

* add link

* Featured Item: Fix colors from default palette not being applied (https://github.com/woocommerce/woocommerce-blocks/pull/6525)

Gutenberg uses two different attributes for text colors:

* `style.color.text`, and
* `textColor`

However, the second one is used only when a color from the default
palette is selected AND the post is saved and reloaded.

With this fix we use the human readable string from the default palette
as a CSS variable.

Please note that while Gutenberg correctly assigns the appropriate CSS
class to render the right color, the problem is that if the color is
handled by a class, it can be overridden for example by themes.

See woocommerce/woocommerce-blocks#6492

* upload new zip

* update changelog

* Revert "Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465)" (https://github.com/woocommerce/woocommerce-blocks/pull/6531)

This reverts commit 4976afad58.

* upload new zip

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-07 15:40:54 +02:00
Albert Juhé Lluveras 40231ea1f9 Revert "Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465)" (https://github.com/woocommerce/woocommerce-blocks/pull/6531)
This reverts commit 4976afad58.
2022-06-07 14:09:50 +02:00
Luigi Teschio bbda7f42b5 Update step for the section 'Create the Testing Notes' (https://github.com/woocommerce/woocommerce-blocks/pull/6523)
* update step for the section 'Create the Testing Notes'

* Update .github/patch-initial-checklist.md

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

* Update .github/release-initial-checklist.md

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

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-07 11:07:42 +02:00
Lucio Giannotta 7531428b31 Featured Item: Fix colors from default palette not being applied (https://github.com/woocommerce/woocommerce-blocks/pull/6525)
Gutenberg uses two different attributes for text colors:

* `style.color.text`, and
* `textColor`

However, the second one is used only when a color from the default
palette is selected AND the post is saved and reloaded.

With this fix we use the human readable string from the default palette
as a CSS variable.

Please note that while Gutenberg correctly assigns the appropriate CSS
class to render the right color, the problem is that if the color is
handled by a class, it can be overridden for example by themes.

See woocommerce/woocommerce-blocks#6492
2022-06-07 10:44:45 +02:00
Luigi Teschio 96b9cbf0c6 Add the button to migrate to the blockified version of the Product Grid Block woocommerce/woocommerce-blocks#6483 (https://github.com/woocommerce/woocommerce-blocks/pull/6485)
Add the button to migrate to the blockified version of the Product Grid Block
2022-06-06 16:49:19 +02:00
Seghir Nadir 87a5e41e05 move legacy payment processing to its own class (https://github.com/woocommerce/woocommerce-blocks/pull/6519) 2022-06-06 13:44:52 +01:00
renovate[bot] ec7705d5ce Update storybook monorepo to v6.5.7 (https://github.com/woocommerce/woocommerce-blocks/pull/6503)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-06 10:38:22 +02:00
Tung Du fb84599f42 Fix: Use `register_block_type_from_metadata` function (https://github.com/woocommerce/woocommerce-blocks/pull/6511) 2022-06-03 10:10:08 +07:00
Michael P. Pfeiffer f38e0819ad Featured items: ensure valid DOM nesting in inspector controls (https://github.com/woocommerce/woocommerce-blocks/pull/6501) 2022-06-01 10:02:24 +02:00
Albert Juhé Lluveras 70a1af8288 Add WC core release thread tasks to release checklist (https://github.com/woocommerce/woocommerce-blocks/pull/6502)
* Add WC core release thread tasks to release checklist

* Apply suggestions from code review

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>

Co-authored-by: Michael P. Pfeiffer <frontdevde@users.noreply.github.com>
2022-06-01 08:42:23 +02:00
Lucio Giannotta 52b946bd29 Featured Item: Fix default color being overridden by themes (https://github.com/woocommerce/woocommerce-blocks/pull/6492)
This fix applies the user selected color on the block's parent element.

Also: Fix default and custom colors not being applied to title correctly.
2022-05-31 17:43:03 +02:00
Alba Rincón 2a99207fac Set the default value for focalPoint on block.json (https://github.com/woocommerce/woocommerce-blocks/pull/6499) 2022-05-31 13:26:36 +02:00
Michael P. Pfeiffer d17bb32c02 Filter Products by Price: Decrease step sequence from 10 to 1 (https://github.com/woocommerce/woocommerce-blocks/pull/6486) 2022-05-31 12:44:50 +02:00
Tung Du d3ab637ba2 Show a warning to notify the user if the WC Blocks version is behind the one bundled in WC Core (https://github.com/woocommerce/woocommerce-blocks/pull/6459)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-05-31 07:42:28 +07:00
Tung Du 775e149ad7 Fix: All translations related to JS blocks are loaded even if the block is not used (https://github.com/woocommerce/woocommerce-blocks/pull/6478) 2022-05-30 23:00:40 +07:00
Lucio Giannotta d63c5dafc1 Migrate Featured Items Blocks to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/6439)
Also:

* Refactored some composed components into one inclusive HOC,
called `withUpdateButtonAttributes`.

* The HOC `withTransformSingleSelectToMultipleSelect` allows for the wrong
type to be passed to its wrapped component: if a single element is
passed, that is wrapped into an array.

This didn't play well with TypeScript which obviously complains about
the wrong type being passed to the component.

So we now allow for arrays to be passed as props and ignored by the HOC
2022-05-30 16:38:52 +02:00
Daniel Dudzic b15050909e Mini Cart: Add font size and font family controls (https://github.com/woocommerce/woocommerce-blocks/pull/6396)
* Mini Cart: Add font size and family controls

* Remove redundant property from the path

* Add conditional check for isFeaturePluginBuild
2022-05-30 10:45:15 +02:00
Alba Rincón 7ab9cb214b Refactor: `Featured product` and `Featured category` classes (https://github.com/woocommerce/woocommerce-blocks/pull/6443)
* Add `Fixed/Repeated background` to the `Featured Category` block

* Reorganize `Featured Product` and `Feature Category` before unification

* Add new `FeaturedItem` class with the shared code for `Featured Product/Category`

* Remove space

* Small tweaks after review feedback
2022-05-30 09:08:53 +02:00
Seghir Nadir 3ff8440643 Respect low stock setting (https://github.com/woocommerce/woocommerce-blocks/pull/6444) 2022-05-27 20:55:46 +01:00
Luigi Teschio 90736d1742 Update RenovateBot configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6477)
* Update RenovateBot configuration

* increase priority for devDeps

* update conf
2022-05-27 15:47:27 +02:00
Alex Florisca f85e0c6347 Only assign a reviewer when a PR is ready for review (https://github.com/woocommerce/woocommerce-blocks/pull/6461)
* Only assign a reviewer when a PR is ready for review

* Also run reviwer action when opening a normal PR

* Only assign a reviewer when a PR is ready for review
2022-05-27 18:05:54 +07:00
Luigi Teschio b72b1556d8 Update RenovateBot configuration (https://github.com/woocommerce/woocommerce-blocks/pull/6469)
* Update RenovateBot configuration

* increase priority for devDeps
2022-05-27 11:33:24 +02:00
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 4976afad58 Remove Combobox patch (https://github.com/woocommerce/woocommerce-blocks/pull/6465) 2022-05-26 12:31:29 +02:00
Daniel Dudzic 9488b9186d Post-release version bump to 7.8.0-dev 2022-05-26 11:08:20 +02:00
github-actions[bot] 7f32bc4c14 Release: 7.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6448)
* Empty commit for release pull request

* Add changelog for the 7.7.0 release

* Add testing notes for the 7.7.0 release

* Fix being able to remove Cart Totals block (https://github.com/woocommerce/woocommerce-blocks/pull/6449)

* Update .zip link for the 7.7.0 release

* Revert changes to webpack build output (https://github.com/woocommerce/woocommerce-blocks/pull/6456)

* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

* bail early if there is no build folder

* check if current folder exist (https://github.com/woocommerce/woocommerce-blocks/pull/6460)

* Update the 7.7.0 release .zip file

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-05-26 11:03:56 +02:00
Seghir Nadir f031f8f83a check if current folder exist (https://github.com/woocommerce/woocommerce-blocks/pull/6460) 2022-05-26 10:34:29 +02:00
Saad Tarhi 25cb047483 Remove `useStoreSnackbarNotices` and interact directly with data store instead (https://github.com/woocommerce/woocommerce-blocks/pull/6411)
* Use wp store directly instead of React Context

We are using now actions directly from wp store in 'useStoreCartCoupons'
hook to apply and remove coupon.

* Remove unused "useStoreSnackbarNotices" related
files

* Add NoticeContext TS definition

* Remove the Provider references and refactor code

* Fix snackbar notice creation bug

* Fix "clear out snackbar coupon notice" bug

* Update "notices" API documentation

Remove snackbar hooks mentions since it's not used anymore
2022-05-25 22:00:47 +01:00
Seghir Nadir d3c2f638fa Revert changes to webpack build output (https://github.com/woocommerce/woocommerce-blocks/pull/6456)
* revert changes to webpack file

* fix loading of chunks

* revert changes to assets api as well

* include chunks from other blocks

* bail early if there is no build folder
2022-05-25 16:59:51 +01:00
Saad Tarhi 8a702ab50f Fix broken link 2022-05-25 08:12:54 +01:00
Alba Rincón 983a13c8bf Add `Fixed/Repeated background` to the `Featured Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6440)
* Add `Fixed/Repeated background` to the `Featured Category` block

* Reorganize `Featured Product` and `Feature Category` before unification

* Fix gradient overlay
2022-05-24 16:10:16 +02:00
Alex Florisca 3f0e93268e Fix being able to remove Cart Totals block (https://github.com/woocommerce/woocommerce-blocks/pull/6449) 2022-05-24 12:49:53 +01:00
Alex Florisca 52a87760c3 Cache node_modules between workflows (https://github.com/woocommerce/woocommerce-blocks/pull/6404)
* Running actions

* Cache node_modules

* Correct cache-name-prop

* rejig if statements

* cache node_modules everywhere

* Simplify unit test action

* Add checkout action back into other unit test action steps

* Share node_modules and build assets between jobs

* Cache node_modules between jobs

* Fix github error

* Tidy up

* Change wp-env-with-gutenberg to support multiple plugins

* Fix permissions issue

* Remove chmod

* Pass woocommerce.zip as a string

* Revert change to plugins override in unit test workflow

* Revert wp-env-with-gutenberg change

* Revert wp-env-with-gutenberg change

* Revert wp-env-with-gutenberg change

* Refactor check-modified-assets workflow

* Fix missed dependency

* Revert breaking the check-modified-assets.yml
2022-05-24 12:42:54 +01:00
Thomas Roberts 4a7b8ae1cf Revert "Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (https://github.com/woocommerce/woocommerce-blocks/pull/6426)" (https://github.com/woocommerce/woocommerce-blocks/pull/6447)
This reverts commit b1f4e35c00.
2022-05-24 10:49:17 +02:00
Seghir Nadir 238ab01ab2 Refactor webpack splitting to fix missing translation (https://github.com/woocommerce/woocommerce-blocks/pull/6420)
* don't splitChunk frontend scripts

* simplfy output folders

* reduce minimum chunk size to 10kb

* add all inner blocks for loading

* better splitChunks

* update translation code

* wait for scripts

* try sleeping

* fix loading translation

* fix tests for mini cart

* simplfy po logic

* automate loading chunks

* rename webpack group file

* rename block.json path
2022-05-23 15:58:13 +01:00
Luigi Teschio 33a9e654ca Enable ESLint for E2E folder woocommerce/woocommerce-blocks#6410 (https://github.com/woocommerce/woocommerce-blocks/pull/6413)
Enable ESLint for E2E folder; fix ESLint errors
2022-05-23 14:05:30 +02:00
Alex Florisca 903f96f677 Locked blocks cannot be unlocked and removed (https://github.com/woocommerce/woocommerce-blocks/pull/6419)
* DIsable the locking/unlocking mechansism for the cart-items-block so it cannot be unlocked and deleted

* Update all locked inner blocks with support: { lock: false } to disable locking/unlocking the blocks
2022-05-23 13:59:07 +02:00
Alba Rincón a18e44e1a7 Convert `Products by Attribute` to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6418)
* Convert `Products by Attribute` block to TS

* Small tweaks after review

* Extract InspectorControls and EditMode into components

* Refactor: move the edit related code to the edit.jsx file

* Remove the `editMode` attribute and control the edit mode inside the edit component

* Remove edit mode

* Change `isEditing` depending on attributes are selected or not

* Improved interfaces/props after review

* Add enum allowed values to `attrOperator` and `orderby` on the `block.json`

* Move `withSpokenMessages` to wrap the whole Edit block
2022-05-23 10:45:54 +02:00
Alba Rincón eec68ed371 Convert `Handpicked Products` block to TS (https://github.com/woocommerce/woocommerce-blocks/pull/6417)
* Convert `Handpicked Products` block to TS

* Extract InspectorControls and EditMode into components

* Refactor edit and remove the `editMode` attribute

* Change `isEditing` default depending on products selected or not

* Improve interfaces/props after review

* Move withSpokenMessages to wrap the whole Edit block
2022-05-23 10:14:51 +02:00
Alba Rincón d61c5116ad Start using `block.json` for the `Products by Attribute` block (https://github.com/woocommerce/woocommerce-blocks/pull/6414) 2022-05-23 10:10:06 +02: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
Alba Rincón 6e5ebdff85 Start using the `block.json` metadata file for `Products by Tag` (https://github.com/woocommerce/woocommerce-blocks/pull/6403)
* Start using the block.json metadata file for `Products by Tag`

* Remove comment

* Add version, schema, and text domain

* Add defaults

* Remove wrong keyword

* Add tag icon when registering the block
2022-05-20 14:43:43 +02:00
Alba Rincón 3b86ff6b39 Fix padding for the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6435) 2022-05-20 14:20:57 +02:00
Lucio Giannotta 7fcc561db1 Refactor Featured Category and Featured Product blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6406)
This PR creates a new directory called `featured-items` which includes both blocks.
All the shared code lives at the top level of that directory.

Individual blocks still have their own directories, with their `block.json` and all other relevant configuration.

All the functionalities have been refactored out into their own files, accepting configuration when relevant, but mostly de-duplicating all the code.

Styles have also been refactored using mixins and extends and they mostly live in one place.
2022-05-19 18:16:46 +02:00
Thomas Roberts b1f4e35c00 Add `requireExactMatch` prop to `ComboBox` to prevent wrong country/state values being sent to the server (https://github.com/woocommerce/woocommerce-blocks/pull/6426)
* Add requireExactMatch prop to ComboBox & only run onChange if value matches

* Set requireExactMatch to true for Country and State inputs

* Add unit tests for ComboBox

* Update expected value for onChange call

* Re-add autocomplete option to country input

* Use correct case for autoComplete in country input
2022-05-18 18:32:42 +01:00
Alba Rincón 22e6394d47 Implement `Fixed image` and `Repeated image` media controls for the `Featured Product` (https://github.com/woocommerce/woocommerce-blocks/pull/6344)
* Add `Fixed` and `Repeated` background controls to `Featured Product`

* Add `Repeated background` feature when the toggle is activated

* Extract `get_image_url` function

* Add the styles for rendering the repeated image on the frontend

* Add `hasParallax` and `isRepeated` to the `block.json` file

* Adjust styles

* Remove unused function, improve phpdoc

* Use alt and product name

Fix error rebasing master

* Hide alt if isRepeat is true

When isRepeated is true, the image is a background so it does not
make sense to have an alt attribute.

* Add `Fixed image` behaviour

* Remove unnecessary single quotes

* Remove duplicated const due to rebasing

* Fix focal point getting lost after enabling Fixed bg

* Fix duotone for fixed and repeated images

* Fix duotone for fixed and repeated images on the front end

* Don't allow alt if the image is a bg not an img element
2022-05-18 16:08:32 +02:00
Alba Rincón 89a553a8a7 Fix phpunit path after the repo renaming (https://github.com/woocommerce/woocommerce-blocks/pull/6421)
* Fix phpunit path after the repo renaming

* Use the current folder name to run phpunit tests
2022-05-18 14:58:22 +02:00
Thomas Roberts 622f873c80 Update release PR checklist template (https://github.com/woocommerce/woocommerce-blocks/pull/6422) 2022-05-17 13:01:43 +01:00
Niels Lange c6d22b9471 Rename readme.md to README.md 2022-05-16 09:29:38 +07:00
Niels Lange 98063e454a Rename readme.md to README.md 2022-05-16 09:28:50 +07:00
Luigi Teschio 38c8a2ae32 Add E2E tests for the Active Filters Block (https://github.com/woocommerce/woocommerce-blocks/pull/6393)
* wip

* set editor using env var instead

* fix attribute missing issue when watching the test

* wip php templates test

* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* create clickLink util

* Add E2E tests for the Active Filters Block woocommerce/woocommerce-blocks#6377

add E2E tests for the Active Filters Block

* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* improve checks

* remove globals.d.ts file

* replace waitForTimeout

* create clickLint utils

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-05-13 15:18:51 +02:00
Alba Rincón 42166068b6 Start using the `block.json` metadata file for `Handpicked products` (https://github.com/woocommerce/woocommerce-blocks/pull/6392)
* Start using the `block.json` metadata file for `Handpicked products`

* Add the `properties` attribute to properly parse booleans

* Remove comment

* Add schema, delete version
2022-05-13 14:57:34 +02:00
Luigi Teschio 07e6878700 Add E2E tests for the Filter Products By Price Block (https://github.com/woocommerce/woocommerce-blocks/pull/6373)
* Add E2E tests for the Filter Products By Price Block woocommerce/woocommerce-blocks#6363

add E2E tests for the Filter Products By Price Block

* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* remove globals.d.ts file

* replace waitForTimeout
2022-05-13 14:15:33 +02:00
Alba Rincón bedd25ead6 Remove unnecessary `index.js` on Featured Category (https://github.com/woocommerce/woocommerce-blocks/pull/6394) 2022-05-13 12:36:46 +02:00
Luigi Teschio ac609f05dc Add E2E tests for the Filter Products By Stock Block (https://github.com/woocommerce/woocommerce-blocks/pull/6357)
* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* Add E2E tests for the Filter Products By Stock Block woocommerce/woocommerce-blocks#6323

add E2E tests for the Filter Products By Stock Block

* improve checks

* improve checks

* remove globals.d.ts file
2022-05-13 11:11:02 +02:00
renovate[bot] 76383c781c Update dependency @types/react to v17.0.45 (https://github.com/woocommerce/woocommerce-blocks/pull/6397)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 19:36:14 +02:00
renovate[bot] 7f501b41df Update dependency @types/wordpress__data to v4.6.11 (https://github.com/woocommerce/woocommerce-blocks/pull/6398)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 19:06:36 +02:00
renovate[bot] 11de221b85 Update dependency react-number-format to v4.9.3 (https://github.com/woocommerce/woocommerce-blocks/pull/6399)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-12 17:52:03 +02:00
Luigi Teschio ded12079cf Add E2E tests for the Filter Products By Attribute Block (https://github.com/woocommerce/woocommerce-blocks/pull/6355)
* Add E2E tests for the Filter Products By Attribute Block woocommerce/woocommerce-blocks#6322

add E2E tests for the Filter Products By Attribute Block

* improve checks
2022-05-12 17:15:53 +02:00
Thomas Roberts 2bfc687093 Bump version numbers following release PR merge 2022-05-10 12:55:02 +01:00
github-actions[bot] 07b201664a Release: 7.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6388)
* Empty commit for release pull request

* Bump version numbers and add changelog

* Add testing notes

* Add correct list of blocks to 6302 notes

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-05-10 12:50:11 +01:00
Thomas Roberts 9f13888d3a Merge branch 'trunk' into release/7.6.0 2022-05-10 12:49:50 +01:00
Thomas Roberts f3dc80c6f7 Bump version numbers to 7.7.0-dev 2022-05-10 09:54:22 +01:00
Thomas Roberts 712a6a6429 Bumping version strings to new version. 2022-05-10 09:37:40 +01:00
Thomas Roberts 88f921eb0d Add correct list of blocks to 6302 notes 2022-05-09 16:12:45 +01:00
Thomas Roberts e6d1341980 Add testing notes 2022-05-09 12:20:22 +01:00
Thomas Roberts 44a7e7f6bf Bump version numbers and add changelog 2022-05-09 12:03:39 +01:00
Tom Cafferkey fffe7903d7 Check asset_data_registry keys do not exist before adding them for PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6384)
* Check key does not exists before adding it

* Use third param to check if duplicate key exists instead of condition
2022-05-09 11:50:22 +01:00
Daniel Dudzic 0b3acfad27 Add the product image control for all blocks utilizing GridContentControl (https://github.com/woocommerce/woocommerce-blocks/pull/6302) 2022-05-09 12:04:33 +02:00
Tung Du 773db56bc5 Fix: Empty Mini Cart Contents view in editor is not vertically centered on WP 6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6379) 2022-05-06 18:05:54 +07:00
Artur Piszek 62024321b9 Fix relative include paths (https://github.com/woocommerce/woocommerce-blocks/pull/6365) 2022-05-06 09:46:54 +02:00
Michael P. Pfeiffer 3aba1b4339 Featured Product: add background color option (https://github.com/woocommerce/woocommerce-blocks/pull/6367) 2022-05-06 07:13:11 +02:00
Lucio Giannotta 3ed91db9e7 Add media controls to the Featured Category block (https://github.com/woocommerce/woocommerce-blocks/pull/6360)
Also:

* Make sure media controls are unavailable unless there is media
2022-05-05 17:55:53 +02:00
Michael P. Pfeiffer 3f6b197063 Featured Category: add background color option (https://github.com/woocommerce/woocommerce-blocks/pull/6368) 2022-05-05 16:12:01 +02:00
Tung Du a22c93f00b Disable lock menu item for Mini Carts Contents and its inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6374) 2022-05-05 17:31:57 +07:00
Tarun Vijwani 2440fb6f36 Fixed Release Schedule link in release and patch initial checklist (https://github.com/woocommerce/woocommerce-blocks/pull/6338) 2022-05-05 14:01:37 +04:00
Tarun Vijwani 51495ff32c Meaningful comment for skipping the e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/6353)
* Added meaningful comment for skipping the tests if it's a WooCommerce Core process environment.

* Fixed the flag number for MiniCart
2022-05-05 12:19:38 +04:00
Tung Du 26fbb3f569 Shop page: Remove the Template panel from the Setting Sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/6366) 2022-05-05 08:08:10 +07:00
Tung Du 217c822b76 Fix: Mini Cart block is not available from the Edit template screen (https://github.com/woocommerce/woocommerce-blocks/pull/6351)
* revert woocommerce/woocommerce-blocks#5653

* remove unused global variable

* fix class name
2022-05-05 07:41:35 +07:00
Tung Du 5930ee6a94 Remove custom ensureSidebarOpened() (https://github.com/woocommerce/woocommerce-blocks/pull/6359) 2022-05-05 07:14:07 +07:00
Daniel Dudzic cd8196fa5f Product Tag Cloud: Hide from Widgets screen in classic themes (https://github.com/woocommerce/woocommerce-blocks/pull/6327)
* Product Tag Cloud: Hide from Widgets screen in classic themes
* Fix code indentation
2022-05-04 16:57:25 +02:00
Albert Juhé Lluveras 3d8043ca6b Add clarification about 'Do not include in the Testing Notes' checkbox in PR template (https://github.com/woocommerce/woocommerce-blocks/pull/6370) 2022-05-04 15:14:54 +02:00
Tung Du 206672f27e Classic Template: set the default alignment to wide (https://github.com/woocommerce/woocommerce-blocks/pull/6356) 2022-05-04 18:02:42 +07:00
renovate[bot] 18f7d5f3c5 Update dependency @types/react-dom to v17.0.16 (https://github.com/woocommerce/woocommerce-blocks/pull/6361)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 11:15:30 +02:00
Tarun Vijwani 02a1b9f78d Remove redundant front-end Checkout block test case (https://github.com/woocommerce/woocommerce-blocks/pull/6352)
* Removed redundant front-end test case
2022-05-04 09:58:12 +04:00
renovate[bot] 8ffd0928c3 Update dependency @types/wordpress__block-editor to v6.0.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6362)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 04:02:30 +00:00
Alba Rincón dcc4e60dda Parse categories coming from the back-end as a json array (https://github.com/woocommerce/woocommerce-blocks/pull/6358)
* Parse categories coming from the back-end as a json array

The category ids that come from php are in json array format (e.g. '[40,41]'),
so it's necessary to parse them and convert them into a js array before
processing them. Otherwise the api request will fail.

* Only parse category ids if not undefined
2022-05-03 16:09:20 +02:00
Tung Du ab797e8237 Fix: Prevent page reloads twice when the shopper sets a price filter and attribute filter using blocks in a PHP template (https://github.com/woocommerce/woocommerce-blocks/pull/6350) 2022-05-03 17:04:44 +07:00
Lucio Giannotta 9a38c6445e Add media controls to the Featured Product block (https://github.com/woocommerce/woocommerce-blocks/pull/6348)
This PR adds image editing controls to the Featured Product block. In particular, user can now:

* Rotate the image
* Crop the image
* Change the aspect ratio of the image
* Zoom the image

Each edit gets saved in the database as a new image.
2022-05-03 09:11:13 +02:00
renovate[bot] 28ddbbac83 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6354)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 08:52:16 +02:00
renovate[bot] a83c98f0d5 Update dependency @types/puppeteer to v5.4.6 (https://github.com/woocommerce/woocommerce-blocks/pull/6329)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-02 13:49:23 +02:00
renovate[bot] 587f01dd05 Update dependency @types/lodash to v4.14.182 (https://github.com/woocommerce/woocommerce-blocks/pull/6328)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-02 12:43:45 +02:00
Alex Florisca 2f9b54ae03 Try to fix E2E tests once and for all (https://github.com/woocommerce/woocommerce-blocks/pull/6337)
* Try to fix account.test.js

* Remove language installations for woo core and wp core and take screenshots

* Upload screenshots to artifacts

* npm install instead of npm ci

* Upload artifacts  not matter what

* fsdf

* fsdfsf

* remove screenshoting from account.test.js and only run checkout-terms.test.js

* Print NODE_ENV

* Better handling of overriding wp-env.json

* Run all tests

* Re-enable translations for WP and Woo

* Wait for Cart & Checkout blocks to load before moving on

* Uncomment github actions

* Try to fix shipping test

* fill checkout before placing order, duuuh

* Wait until networkidel0 instead of domcontentloaded for page navigations

* Fix account.test.js

* change visitBlockPage() to  use Promise.all()

* Remove screenshot taking

* I think Promise.all() is being funny and not throwing properly, testing

* wait for checkbox to be visible before clicking

* Remove try catch around Promise.all()

* Fix linting issues

* Remove screenshot dir

* Raluca feedback:

* Timeout back to 30000

* Login to merhcant before changing settings

* merchant.logout()
2022-05-01 12:33:58 +01:00
Albert Juhé Lluveras 027a5d2490 Updates to release checklist and PR template to improve processes (https://github.com/woocommerce/woocommerce-blocks/pull/6293)
* Updates to release checklist to clarify testers, blockers, etc.

* Specify that commits related to failing PRs need to be reverted

* Update PR & Release templates

Release template
- the Write testing notes has been moved to the PR template, and removed from the release checklist
- mention that common functionality should be tested by both porters
- update the instructions on how to create the WC PR's changelog

Pull request template
- better visibility for the feature flag/experimental changes
- add before/after table for screenshots
- add WooCommerce Visibility to help with the changelog of the WC PR
- add an extra check to not include a PR in The testing notes

* Remove duplication on pinging porters for testing

* Clarify PR author is the responsible to fix failing PRs

* Update .github/patch-initial-checklist.md

Co-authored-by: Raluca Stan <ralucastn@gmail.com>

* Update .github/release-initial-checklist.md

Co-authored-by: Raluca Stan <ralucastn@gmail.com>

* Include information about testing the Store API

* Add information about logging issues that appear during testing

* Fix punctuation

* Remove Manual Testing section from PR template

* Close milestones when creating the release branch

* Add create a milestone for the next version step

Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-29 11:53:57 +02:00
Alba Rincón bdfd1da4c5 Start using the `block.json` metadata file for the `Featured Category` block (https://github.com/woocommerce/woocommerce-blocks/pull/6300)
* Start using the `block.json` metadata file for the `Featured Category` block

* Get default attributes from the `block.json` file

* Remove unnecessary `get_block_metadata_defaults` function

* Add alt attribute to the block.json file

* Remove unused imports
2022-04-28 17:31:59 +02:00
Alba Rincón 0aac2c59ef Start using the `block.json` metadata file for the `Featured Product` block (https://github.com/woocommerce/woocommerce-blocks/pull/6296)
* Start using the `block.json` metadata file for the `Feature Product` block

* Get default attributes from the block.json file

* Add removed comment

* Remove unnecessary `get_block_metadata_defaults` function

* Add alt default to block.json
2022-04-28 17:04:56 +02:00
Alba Rincón 964f6e5965 Add new `alt` attribute to the `Featured Product` media settings (https://github.com/woocommerce/woocommerce-blocks/pull/6308)
* Add new `alt` attribute to Media Settings

Allow to define an alt text for the Feature Product block

* Simplify on change

* Improve alt description and use name instead of short description

Short description can contain html and images, so it's not adequate to use on the alt attribute
2022-04-28 16:28:22 +02:00
Alba Rincón ec73743d0f Add new `alt` attribute to the `Featured Category` media settings (https://github.com/woocommerce/woocommerce-blocks/pull/6341) 2022-04-28 16:28:09 +02:00
Albert Juhé Lluveras 2455d7a390 Cleanup AttributeFilterBlock code (https://github.com/woocommerce/woocommerce-blocks/pull/6333) 2022-04-28 10:29:54 +02:00
Albert Juhé Lluveras 81f348b466 Ensure Filter Products by Attribute block reloads the page when interacting with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6332) 2022-04-28 09:51:24 +02:00
Tarun Vijwani 1d0acebfa9 Update to dev version: 7.6.0-dev (https://github.com/woocommerce/woocommerce-blocks/pull/6336)
* update to dev version: 7.6.0-dev
2022-04-27 17:54:51 +04:00
github-actions[bot] a0d7400432 Release: 7.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6312)
* Release: 7.5.0
2022-04-27 17:19:21 +04:00
renovate[bot] 1412f779e2 Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/6304)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-27 12:35:57 +01:00
Tom Cafferkey 6fb43ed8cb Deprecate legacy filter widgets with block alternatives (https://github.com/woocommerce/woocommerce-blocks/pull/6299)
* Transform object for woocommerce_price_filter legacy widget to be replaced with block alternative

* Filter products by price transform

* Price Filter formatting

* Set set_filterable_product_data data on the widgets screen

* Prevent rendering the Price Filter block if there are no products to filter

* Prevent Classic Price Filter Widget from being available as a widget

* Transform layered nav classic widget to attribute filter block

* Allow Filter Products by Stock block to be added as a widget

* Allow Active Filters widget to be transformed to Active Filters block

* Set showFilterButton to true and showInputFields to false in the transform of Price Filter to minic widgets more

* Change displayStyle property to be display_type instead of incorrectly using title

* mock @woocommerce/settings for has_filterable_products setting

* try: add All Products block to render that filter on the front end

* Revert "try: add All Products block to render that filter on the front end"

This reverts commit 5ad09e964b77e5c6499b4134cf58d7a6c226424d.

* try: add all product block to bypass has_filterable_products check

* fix: backend e2e test for attribute filter

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-04-27 08:36:00 +01:00
Albert Juhé Lluveras 48e415b39b Remove Mini Cart block from the list of experimental flags (https://github.com/woocommerce/woocommerce-blocks/pull/6291) 2022-04-26 17:04:29 +02:00
Tung Du db2cb044f9 Active Filters: Add support for Filters Products by Rating widget (https://github.com/woocommerce/woocommerce-blocks/pull/6319) 2022-04-26 19:36:06 +07:00
Tom Cafferkey 781de225da Only set data is_rendering_php_template in Classic Themes on WooCommerce product archive templates where filters are being used. (https://github.com/woocommerce/woocommerce-blocks/pull/6324) 2022-04-26 12:22:43 +01:00
Tung Du 2e829bca05 Active Filters block: Clear All button work with all types of permalink settings. (https://github.com/woocommerce/woocommerce-blocks/pull/6315) 2022-04-26 16:39:34 +07:00
Tung Du a999a3d992 Active Filters block: support Filter Products by Rating widget (https://github.com/woocommerce/woocommerce-blocks/pull/6316)
* support rating filter

* use plural form for consistency
2022-04-26 16:22:30 +07:00
Tung Du e0f140c7e2 Fix: Customizer fatal error for bundled woocommerce-blocks package (https://github.com/woocommerce/woocommerce-blocks/pull/6317) 2022-04-26 15:21:14 +07:00
Seghir Nadir bbd7e53598 graduate draft orders (https://github.com/woocommerce/woocommerce-blocks/pull/6288) 2022-04-25 15:08:37 +01:00
Seghir Nadir bcd490a78f udpate attributes docs (https://github.com/woocommerce/woocommerce-blocks/pull/6272) 2022-04-25 15:08:14 +01:00
Seghir Nadir 162c21a84d show attributes in simple products (https://github.com/woocommerce/woocommerce-blocks/pull/6274) 2022-04-25 15:07:47 +01:00
Niels Lange f10bb2da82 Critical flows: Merchant → Checkout → Can adjust T&S and Privacy Policy options (https://github.com/woocommerce/woocommerce-blocks/pull/6211)
* Add test to check if T&C and Privacy links are visible

* Fix filling wrong type of form error

With a virtual product we shouldn't need to fill the shipping details
We need to fill the billing instead

* Fix undefined 'termsCheckbox' bug

* Fix terms checkbox name

* Activate test case

* Replace static URL with dynamic one

* Convert external plugin into mock

* Fix JS linting issue

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-04-25 10:48:54 +02:00
Tung Du ce99a47fb4 Fix: Make Active Filters work with PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6295)
* make active filters block work with PHP templates

* use getSettingWithCoercion

* redirect to the base url when clicking Clear All link

* fix: eslint error and warning
2022-04-22 16:30:40 +01:00
Tom Cafferkey eb3537bcc1 Fix ESLint errors and warnings (https://github.com/woocommerce/woocommerce-blocks/pull/6298) 2022-04-22 11:46:51 +01:00
Tomasz Tunik f366eaeddf Fix attribute filter dropdown list z-index; (https://github.com/woocommerce/woocommerce-blocks/pull/6294)
was conflicting with other components like:
- sale badge
- all products placeholder items
2022-04-22 09:16:50 +02:00
Tom Cafferkey 5573485daa Filter Products by Attribute: Fix the page reload which happens when clicking the filter button on PHP templates (https://github.com/woocommerce/woocommerce-blocks/pull/6287)
* Move redirect logic to its own callback

* Update comment for updateAttributeFilter

* Remove condition for updating state for active filters only when filter button is not available

* Replace onSubmit with updateAttributeFilter

* Update logic lost in merge

* Replace checked stateful data with activeFilters data from URL

* Remove catalog_visibility from filteredCounts useCollectionData query for PHP templates
2022-04-22 07:38:33 +01:00
dependabot[bot] c98e33d5fc Bump async from 2.6.3 to 2.6.4 (https://github.com/woocommerce/woocommerce-blocks/pull/6265)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-21 14:22:59 +02:00
Harris Papazoglou f46d912cc9 Product Query: pass any product taxonomies existing in the URL parameters. (https://github.com/woocommerce/woocommerce-blocks/pull/6152)
* Product Query: pass any product taxonomies existing in the URL parameters.

* Products API: add custom product taxonomy in docs.

* Docs: fixes type.

* Linting the docs.

* Product Query: add [product-taxonomy]_operator docs.

* Product Query: fixes the taxonomies merge order.

* Product Query: make sure that tax keys are unique and sanitized.

* Product Query: adds `tax_` prefix to docs.

* Product Query: fixes not_in for categories, taxonomies, and tags.

* Product Query: updates attribute operator enum.

* Product query: uses `_unstable_tax_` instead of `tax_` prefix for custom taxonomies.

Co-authored-by: cpap <papazoglou.charalampos@gmail.com>
2022-04-21 15:00:11 +03:00
renovate[bot] 54f82d841e Update dependency @actions/github to v5.0.1 (https://github.com/woocommerce/woocommerce-blocks/pull/6198)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 11:36:01 +02:00
Alba Rincón df206284a3 Make `Filters Products by Price` work with `Active Filters` block (https://github.com/woocommerce/woocommerce-blocks/pull/6245)
* Set the min and max price from the URL to make the active filters work with PHP templates

* Extract price formatting into a separate function

* Rename the `hasSetPriceDefault` variable and improve comments

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-04-21 10:25:17 +02:00
Luigi Teschio 881c202717 Make Filter Products by Stock block compatible with PHP rendered Classic Template block (https://github.com/woocommerce/woocommerce-blocks/pull/6261)
* Enable Attribute Filter block to work with the PHP rendered Classic Template block

* Check for presence of option before rendering it

* improve filter product by attribute

* fix pagination problem

* fix check when two filter block with same attribute are used

* fix filter by stock for PHP templates

* fix naming and comment

* Update filter key in ClassicTemplate

* Update stock filter block for PHP templates when the filter button is enabled

* Remove unused useEffect and fix ESLint error

* Set active stock filter and track using local state

* ESLint fix

* Remove unncessary dependencies from useEffect

Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
2022-04-21 08:28:41 +01:00
Lucio Giannotta 268d6e1a34 Enable more style options for the Featured Category block (https://github.com/woocommerce/woocommerce-blocks/pull/6276)
* Enable more options for the Featured Category block

* Fix the focal point picker
* Fix the resizeable handle
* Fix the overlay and move to own section
* Enable gradient and duotone
* Add padding and fix min height

* Export ConstrainedResizeable from Featured Product

* Wrap duotone in feature plugin flag

* Add support for `border-radius`

* Change prop order

* Add SSR for new options on Featured Category block

* Optional chaining on border radius

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>

* Add default to overlay and height

* Optional chaining on border radius for Featured Product block

* Fix gradient persistence and default overlay discrepacies

* Explicitly add box-sizing to the featured-product/category wrapper

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2022-04-21 08:20:10 +01:00