woocommerce/plugins/woocommerce-blocks/assets/js/blocks/checkout/block.json

54 lines
1022 B
JSON
Raw Normal View History

Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594) * Add block title to AbstractBlock class * Add block title to Checkout block * Include all block.json files in tsconfig * Add get_block_title method to Checkout.php * Remove redundant block_title field * Add block.json and remove static attributes from attributes.ts * Register block using attributes from block.json * Add metadata_path to AbstractBlock * Add function to AssetsApi to get the metadata path from the plugin root * Register the block using metadata if it's set in the block's class * Remove get_block_title method * Only add supports and attributes to the block when not registering with metadata * Change get_block_metadata to get_block_metadata_path * Change indentation to tabs in block.json * Update comment to clarify why attributes and supports are set later * Check if path to metadata is not empty instead of set and not empty * Move checkout block out of cart-checkout directory * Update get_block_metadata_path function to find block.json automatically * Remove metadata path from AbstractBlock * Check if there's a metadata file and register blocks with metadata if so * Move deprecated attributes out of metadata and into attributes.ts * Re-add deprecated attributes to checkout index * Move order notes test * Move test for checkout phone number in edito * Fix indentation in checkout/block.json * Move checkout terms tests * Try forcing storefront theme in e2e tests * Revert "Try forcing storefront theme in e2e tests" This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625. * Try capturing screenshot on test failures * Try uploading error in try catch * Try uploading artefacts on error * Test uploading artefacts * Screenshot just before looking for edit post layout * Revert "Screenshot just before looking for edit post layout" This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450. * Revert "Test uploading artefacts" This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665. * Revert "Try uploading artefacts on error" This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516. * Revert "Try uploading error in try catch" This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6. * Revert "Try capturing screenshot on test failures" This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f. Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
{
"name": "woocommerce/checkout",
"version": "1.0.0",
"title": "Checkout",
"description": "Display a checkout form so your customers can submit orders.",
"category": "woocommerce",
"keywords": [ "WooCommerce" ],
"supports": {
"align": [ "wide" ],
"html": false,
"multiple": false
},
"example": {
"attributes": {
"isPreview": true
},
"viewportWidth": 800
},
Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594) * Add block title to AbstractBlock class * Add block title to Checkout block * Include all block.json files in tsconfig * Add get_block_title method to Checkout.php * Remove redundant block_title field * Add block.json and remove static attributes from attributes.ts * Register block using attributes from block.json * Add metadata_path to AbstractBlock * Add function to AssetsApi to get the metadata path from the plugin root * Register the block using metadata if it's set in the block's class * Remove get_block_title method * Only add supports and attributes to the block when not registering with metadata * Change get_block_metadata to get_block_metadata_path * Change indentation to tabs in block.json * Update comment to clarify why attributes and supports are set later * Check if path to metadata is not empty instead of set and not empty * Move checkout block out of cart-checkout directory * Update get_block_metadata_path function to find block.json automatically * Remove metadata path from AbstractBlock * Check if there's a metadata file and register blocks with metadata if so * Move deprecated attributes out of metadata and into attributes.ts * Re-add deprecated attributes to checkout index * Move order notes test * Move test for checkout phone number in edito * Fix indentation in checkout/block.json * Move checkout terms tests * Try forcing storefront theme in e2e tests * Revert "Try forcing storefront theme in e2e tests" This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625. * Try capturing screenshot on test failures * Try uploading error in try catch * Try uploading artefacts on error * Test uploading artefacts * Screenshot just before looking for edit post layout * Revert "Screenshot just before looking for edit post layout" This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450. * Revert "Test uploading artefacts" This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665. * Revert "Try uploading artefacts on error" This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516. * Revert "Try uploading error in try catch" This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6. * Revert "Try capturing screenshot on test failures" This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f. Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
"attributes": {
"isPreview": {
"type": "boolean",
"default": false,
"save": false
},
"showCompanyField": {
"type": "boolean",
"default": false
},
"requireCompanyField": {
"type": "boolean",
"default": false
},
"showApartmentField": {
"type": "boolean",
"default": true
},
"showPhoneField": {
"type": "boolean",
"default": true
},
"requirePhoneField": {
"type": "boolean",
"default": false
},
"align": {
"type": "string",
"default": "wide"
Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594) * Add block title to AbstractBlock class * Add block title to Checkout block * Include all block.json files in tsconfig * Add get_block_title method to Checkout.php * Remove redundant block_title field * Add block.json and remove static attributes from attributes.ts * Register block using attributes from block.json * Add metadata_path to AbstractBlock * Add function to AssetsApi to get the metadata path from the plugin root * Register the block using metadata if it's set in the block's class * Remove get_block_title method * Only add supports and attributes to the block when not registering with metadata * Change get_block_metadata to get_block_metadata_path * Change indentation to tabs in block.json * Update comment to clarify why attributes and supports are set later * Check if path to metadata is not empty instead of set and not empty * Move checkout block out of cart-checkout directory * Update get_block_metadata_path function to find block.json automatically * Remove metadata path from AbstractBlock * Check if there's a metadata file and register blocks with metadata if so * Move deprecated attributes out of metadata and into attributes.ts * Re-add deprecated attributes to checkout index * Move order notes test * Move test for checkout phone number in edito * Fix indentation in checkout/block.json * Move checkout terms tests * Try forcing storefront theme in e2e tests * Revert "Try forcing storefront theme in e2e tests" This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625. * Try capturing screenshot on test failures * Try uploading error in try catch * Try uploading artefacts on error * Test uploading artefacts * Screenshot just before looking for edit post layout * Revert "Screenshot just before looking for edit post layout" This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450. * Revert "Test uploading artefacts" This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665. * Revert "Try uploading artefacts on error" This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516. * Revert "Try uploading error in try catch" This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6. * Revert "Try capturing screenshot on test failures" This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f. Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
}
},
"textdomain": "woo-gutenberg-products-block",
"apiVersion": 2,
"$schema": "https://schemas.wp.org/trunk/block.json"
Move Checkout block attributes into metadata (`block.json`) (https://github.com/woocommerce/woocommerce-blocks/pull/5594) * Add block title to AbstractBlock class * Add block title to Checkout block * Include all block.json files in tsconfig * Add get_block_title method to Checkout.php * Remove redundant block_title field * Add block.json and remove static attributes from attributes.ts * Register block using attributes from block.json * Add metadata_path to AbstractBlock * Add function to AssetsApi to get the metadata path from the plugin root * Register the block using metadata if it's set in the block's class * Remove get_block_title method * Only add supports and attributes to the block when not registering with metadata * Change get_block_metadata to get_block_metadata_path * Change indentation to tabs in block.json * Update comment to clarify why attributes and supports are set later * Check if path to metadata is not empty instead of set and not empty * Move checkout block out of cart-checkout directory * Update get_block_metadata_path function to find block.json automatically * Remove metadata path from AbstractBlock * Check if there's a metadata file and register blocks with metadata if so * Move deprecated attributes out of metadata and into attributes.ts * Re-add deprecated attributes to checkout index * Move order notes test * Move test for checkout phone number in edito * Fix indentation in checkout/block.json * Move checkout terms tests * Try forcing storefront theme in e2e tests * Revert "Try forcing storefront theme in e2e tests" This reverts commit 5b0fd47a2c39aadb0141a4ed28cbc0e6baa89625. * Try capturing screenshot on test failures * Try uploading error in try catch * Try uploading artefacts on error * Test uploading artefacts * Screenshot just before looking for edit post layout * Revert "Screenshot just before looking for edit post layout" This reverts commit 61dff027789ce13a0d84e7b6f11e431637c5a450. * Revert "Test uploading artefacts" This reverts commit adf5cc55bcdb677f889bf5a62803b4150d98e665. * Revert "Try uploading artefacts on error" This reverts commit 7441a832a113a95fef89cc1b8db6dc79271be516. * Revert "Try uploading error in try catch" This reverts commit ca412ce505d56286b164f588a201a451f6bceeb6. * Revert "Try capturing screenshot on test failures" This reverts commit 0de6e97df19b116091a7bb3b8652713867d2d80f. Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-01-28 16:37:06 +00:00
}