Commit Graph

3730 Commits

Author SHA1 Message Date
Michael P. Pfeiffer 521f93619b Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566)
* Remove mixed tabs and spaces in tsconfig.json

* Update formatting in json files

* Upgrade wp-prettier to 2.6.2
2022-06-15 11:56:52 +02:00
Tomasz Tunik 0dfc1ad58b provide span wrapper for category list item name (https://github.com/woocommerce/woocommerce-blocks/pull/6574)
will enable adding text overflow of other effects that user might not want to interfere with the image element
2022-06-15 11:37:21 +02:00
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