From 21a1fea12282af175b12226447bcf81075d81060 Mon Sep 17 00:00:00 2001 From: Luigi Date: Mon, 30 Jan 2023 16:31:45 +0100 Subject: [PATCH] remove support global styles --- .../product-elements/product-image-gallery/block.json | 10 +--------- .../product-elements/product-image-gallery/edit.tsx | 5 ++++- .../product-elements/product-image-gallery/editor.scss | 4 ---- src/BlockTypes/ProductImageGallery.php | 10 ---------- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/assets/js/atomic/blocks/product-elements/product-image-gallery/block.json b/assets/js/atomic/blocks/product-elements/product-image-gallery/block.json index 76aa69ac84e..9dd08179132 100644 --- a/assets/js/atomic/blocks/product-elements/product-image-gallery/block.json +++ b/assets/js/atomic/blocks/product-elements/product-image-gallery/block.json @@ -7,15 +7,7 @@ "category": "woocommerce", "supports": { "align": true, - "reusable": false, - "spacing": { - "margin": true - }, - "__experimentalBorder": { - "radius": true, - "__experimentalSkipSerialization": true - }, - "__experimentalSelector": ".wp-block-woocommerce-product-image-gallery img" + "reusable": false }, "keywords": [ "WooCommerce" ], "usesContext": [ "postId", "postType", "queryId" ], diff --git a/assets/js/atomic/blocks/product-elements/product-image-gallery/edit.tsx b/assets/js/atomic/blocks/product-elements/product-image-gallery/edit.tsx index 0643dab1315..7740bccab2a 100644 --- a/assets/js/atomic/blocks/product-elements/product-image-gallery/edit.tsx +++ b/assets/js/atomic/blocks/product-elements/product-image-gallery/edit.tsx @@ -6,6 +6,7 @@ import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings'; import { isEmptyObject } from '@woocommerce/types'; import { useBlockProps } from '@wordpress/block-editor'; import { BlockAttributes } from '@wordpress/blocks'; +import { Disabled } from '@wordpress/components'; /** * Internal dependencies @@ -63,7 +64,9 @@ const Edit = ( { context, attributes }: Props ) => { if ( isEmptyObject( context ) ) { return (
- + + +
); } diff --git a/assets/js/atomic/blocks/product-elements/product-image-gallery/editor.scss b/assets/js/atomic/blocks/product-elements/product-image-gallery/editor.scss index 5c176af5243..ad1d09c6d26 100644 --- a/assets/js/atomic/blocks/product-elements/product-image-gallery/editor.scss +++ b/assets/js/atomic/blocks/product-elements/product-image-gallery/editor.scss @@ -1,16 +1,12 @@ .wc-block-editor-product-gallery { - border-style: none; - img { width: 500px; height: 500px; - border-radius: inherit; } .wc-block-editor-product-gallery__gallery { img { width: 100px; height: 100px; - border-radius: inherit; } } } diff --git a/src/BlockTypes/ProductImageGallery.php b/src/BlockTypes/ProductImageGallery.php index 3ce3fdc312f..23f0b0865f7 100644 --- a/src/BlockTypes/ProductImageGallery.php +++ b/src/BlockTypes/ProductImageGallery.php @@ -24,16 +24,6 @@ protected function get_block_type_uses_context() { return [ 'query', 'queryId', 'postId' ]; } - /** - * Get block attributes. - * - * @return array - */ - protected function get_block_type_supports() { - return array( - '__experimentalSelector' => 'img', - ); - } /** * Include and render the block.