woocommerce/plugins/woocommerce-blocks/assets/js/blocks/cart/inner-blocks
Saad Tarhi dc97e5af1e Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737)
* Try registering the "cart taxes" inner block

Registering server side. This example isn't working, but I'm pushing to
share it and see what's wrong with this implementation.

* Fix registering the cart taxes inner block issue

* Update translation script loading

* Remove unnecessary JS translation

The translation should work fine by getting the title & description from
the `block.json` file

* Put back the initial code in the 'Cart Taxes' inner block

We didn't provide the correct `block.json` file path server side,
that's why the `metadata` wasn't correctly registered

* Generate `block.json`files for inner blocks

This is the first step on fixing the missing translations of `metadata`
in `block.json` files

* Set the folder name exactly the same as the inner block name

We are doing this first test for the `Cart taxes` inner block.

The `Block` & its containing folder need to have the same name for:
- Consistency
- We use the `Block` name to get the file Path

* Update imports after folder renaming

* Get block name directly from the JSON metadata

Getting the block name from the JSON metadata is less error prone than
extracting it from the file path.

And no need to rename all our `inner-blocks` to get the correct
`block.json` path

* Revert folder naming change of `Cart taxes` inner block

Since we are getting the `block` name directly from the `block.json`
metadata instead of extracting it from the file path, there is no need
to keep their names in sync anymore

* Fix missing translations for the `Cart Subtotal` Block

* Register only the client-side settings on the client

When the block is registered on the server, you only need to register
the client-side settings on the client using the same block’s name.
See [docs](https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#javascript-client-side).

* Add schema validation to `block.json`

Development is improved by using a defined schema definition file.
Supported editors can provide help like tooltips, autocomplete, and
schema validation.

* Use the same `editor_script` as the parent block

This prevents WordPress from generating script tags to inexistant
inner blocks JS files

* Add C&C inner blocks in Cart.php & Checkout.php

This is a refactoring to keep the block types controller file less
overloaded

* Fix all Cart inner blocks missing translations

* Create the "AbstractInnerBlock" class

The "Inner Blocks" will use their parent's script, so no need to create
new scripts for each one of them

And, our "Inner Blocks" should always be registered using the metadata file

* Update the "Inner Blocks" PHP classes

* Fix PHP lint erros & update function description

* Fix missing translations bug for all Checkout Inner Blocks

* Update src/BlockTypes/Checkout.php

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* skip lazy loaded scripts

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2022-08-01 15:57:33 +01:00
..
cart-accepted-payment-methods-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-express-payment-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-items-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-line-items-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-coupon-form Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-discount Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-fee Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-heading Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-shipping Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-subtotal Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-order-summary-taxes Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
cart-totals-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
empty-cart-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
filled-cart-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
proceed-to-checkout-block Fix missing translations in inspector (https://github.com/woocommerce/woocommerce-blocks/pull/6737) 2022-08-01 15:57:33 +01:00
component-metadata.ts WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) 2022-04-01 15:45:18 +02:00
index.tsx WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) 2022-04-01 15:45:18 +02:00
register-components.ts Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00