From 776d567f304149d371a2469eb4aa52c08b8346bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maikel=20David=20P=C3=A9rez=20G=C3=B3mez?= Date: Wed, 19 Jul 2023 10:11:03 -0400 Subject: [PATCH] Create the Organization tab (#39232) * Add Organization to the right of General tab * Add Product catalog and Attributes sections to the Organization tab * Add Categories and Disable product reviews blocks to Product catalog section * Add attributes block to the attributes section * Add changelog files * Fix php linter error * Remove Categories and Attributes blocks from the General tab * Change Disable product reviews by Enable product reviews --- .../changelog/enhancement-38823 | 4 +++ .../src/blocks/checkbox/editor.scss | 4 +++ .../woocommerce/changelog/enhancement-38823 | 4 +++ .../Features/ProductBlockEditor/Init.php | 28 +++++++++++++------ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 packages/js/product-editor/changelog/enhancement-38823 create mode 100644 plugins/woocommerce/changelog/enhancement-38823 diff --git a/packages/js/product-editor/changelog/enhancement-38823 b/packages/js/product-editor/changelog/enhancement-38823 new file mode 100644 index 00000000000..3b282e31327 --- /dev/null +++ b/packages/js/product-editor/changelog/enhancement-38823 @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Remove the margin bottom of the checkbox label diff --git a/packages/js/product-editor/src/blocks/checkbox/editor.scss b/packages/js/product-editor/src/blocks/checkbox/editor.scss index 70fca8e4f5e..c23122275d5 100644 --- a/packages/js/product-editor/src/blocks/checkbox/editor.scss +++ b/packages/js/product-editor/src/blocks/checkbox/editor.scss @@ -12,6 +12,10 @@ align-items: center; margin-bottom: 0; } + + .components-checkbox-control__label { + margin-bottom: 0; + } } .woocommerce-product-form__checkbox-wrapper { diff --git a/plugins/woocommerce/changelog/enhancement-38823 b/plugins/woocommerce/changelog/enhancement-38823 new file mode 100644 index 00000000000..8732a32e7a1 --- /dev/null +++ b/plugins/woocommerce/changelog/enhancement-38823 @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Create the Organization tab diff --git a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php index cdbcd131523..0098b7b10ba 100644 --- a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php +++ b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php @@ -336,11 +336,20 @@ class Init { ), ), ), + ), + ), + array( + 'woocommerce/product-tab', + array( + 'id' => 'organization', + 'title' => __( 'Organization', 'woocommerce' ), + 'order' => 15, + ), + array( array( 'woocommerce/product-section', array( - 'title' => __( 'Organization & visibility', 'woocommerce' ), - 'description' => __( 'Help customers find this product by assigning it to categories or featuring it across your sales channels.', 'woocommerce' ), + 'title' => __( 'Product catalog', 'woocommerce' ), ), array( array( @@ -349,18 +358,19 @@ class Init { 'name' => 'categories', ), ), + array( + 'woocommerce/product-checkbox-field', + array( + 'label' => __( 'Enable product reviews', 'woocommerce' ), + 'property' => 'reviews_allowed', + ), + ), ), ), array( 'woocommerce/product-section', array( - 'title' => __( 'Attributes', 'woocommerce' ), - 'description' => sprintf( - /* translators: %1$s: Attributes guide link opening tag. %2$s: Attributes guide link closing tag.*/ - __( 'Add descriptive pieces of information that customers can use to filter and search for this product. %1$sLearn more%2$s', 'woocommerce' ), - '', - '' - ), + 'title' => __( 'Attributes', 'woocommerce' ), ), array( array(