From c740988d55c6c3a6b9af5bae08b46497331dbb40 Mon Sep 17 00:00:00 2001 From: louwie17 Date: Mon, 4 Mar 2024 17:18:58 -0400 Subject: [PATCH 01/18] Fix multiple warning in blocks in Atomic (#45283) * Set multiple to true * Add changelog --- .../product-editor/changelog/fix-multiple_warning_in_blocks | 4 ++++ .../src/blocks/generic/linked-product-list/block.json | 2 +- .../js/product-editor/src/blocks/generic/pricing/block.json | 2 +- .../js/product-editor/src/blocks/generic/taxonomy/block.json | 4 ++-- .../src/blocks/product-fields/attributes/block.json | 2 +- .../src/blocks/product-fields/catalog-visibility/block.json | 2 +- .../src/blocks/product-fields/downloads/block.json | 2 +- .../src/blocks/product-fields/images/block.json | 2 +- .../src/blocks/product-fields/inventory-email/block.json | 2 +- .../src/blocks/product-fields/inventory-quantity/block.json | 2 +- .../product-editor/src/blocks/product-fields/name/block.json | 2 +- .../src/blocks/product-fields/password/block.json | 2 +- .../src/blocks/product-fields/product-list/block.json | 2 +- .../src/blocks/product-fields/regular-price/block.json | 2 +- .../src/blocks/product-fields/sale-price/block.json | 2 +- .../src/blocks/product-fields/shipping-dimensions/block.json | 2 +- .../src/blocks/product-fields/summary/block.json | 2 +- .../product-editor/src/blocks/product-fields/tag/block.json | 2 +- .../src/blocks/product-fields/variation-items/block.json | 2 +- .../src/blocks/product-fields/variation-options/block.json | 2 +- 20 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 packages/js/product-editor/changelog/fix-multiple_warning_in_blocks diff --git a/packages/js/product-editor/changelog/fix-multiple_warning_in_blocks b/packages/js/product-editor/changelog/fix-multiple_warning_in_blocks new file mode 100644 index 000000000000..9d03c97206b7 --- /dev/null +++ b/packages/js/product-editor/changelog/fix-multiple_warning_in_blocks @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Set product editor blocks multiple support to true. diff --git a/packages/js/product-editor/src/blocks/generic/linked-product-list/block.json b/packages/js/product-editor/src/blocks/generic/linked-product-list/block.json index 54b1f2d11309..24eb00ae789f 100644 --- a/packages/js/product-editor/src/blocks/generic/linked-product-list/block.json +++ b/packages/js/product-editor/src/blocks/generic/linked-product-list/block.json @@ -20,7 +20,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/generic/pricing/block.json b/packages/js/product-editor/src/blocks/generic/pricing/block.json index 2a9ad347702b..1402b64c62f8 100644 --- a/packages/js/product-editor/src/blocks/generic/pricing/block.json +++ b/packages/js/product-editor/src/blocks/generic/pricing/block.json @@ -25,7 +25,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/generic/taxonomy/block.json b/packages/js/product-editor/src/blocks/generic/taxonomy/block.json index f0d8a2550ff9..68c10d07c190 100644 --- a/packages/js/product-editor/src/blocks/generic/taxonomy/block.json +++ b/packages/js/product-editor/src/blocks/generic/taxonomy/block.json @@ -5,7 +5,7 @@ "title": "Taxonomy", "category": "widgets", "description": "A block that displays a taxonomy field, allowing searching, selection, and creation of new items", - "keywords": [ "taxonomy"], + "keywords": [ "taxonomy" ], "textdomain": "default", "attributes": { "slug": { @@ -36,7 +36,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/attributes/block.json b/packages/js/product-editor/src/blocks/product-fields/attributes/block.json index 6612386c24e0..9e4ebdf00a13 100644 --- a/packages/js/product-editor/src/blocks/product-fields/attributes/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/attributes/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/catalog-visibility/block.json b/packages/js/product-editor/src/blocks/product-fields/catalog-visibility/block.json index cd9aecb69e28..b70967f8fa07 100644 --- a/packages/js/product-editor/src/blocks/product-fields/catalog-visibility/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/catalog-visibility/block.json @@ -21,7 +21,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/downloads/block.json b/packages/js/product-editor/src/blocks/product-fields/downloads/block.json index ac7e4dcd6971..4f081aa6a28b 100644 --- a/packages/js/product-editor/src/blocks/product-fields/downloads/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/downloads/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/images/block.json b/packages/js/product-editor/src/blocks/product-fields/images/block.json index e36cb7c5da4a..12fe90069306 100644 --- a/packages/js/product-editor/src/blocks/product-fields/images/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/images/block.json @@ -31,7 +31,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/inventory-email/block.json b/packages/js/product-editor/src/blocks/product-fields/inventory-email/block.json index 77459faf963d..5ac6cf80d4c7 100644 --- a/packages/js/product-editor/src/blocks/product-fields/inventory-email/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/inventory-email/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/inventory-quantity/block.json b/packages/js/product-editor/src/blocks/product-fields/inventory-quantity/block.json index eede24ab1a2e..fe649ca6a385 100644 --- a/packages/js/product-editor/src/blocks/product-fields/inventory-quantity/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/inventory-quantity/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/name/block.json b/packages/js/product-editor/src/blocks/product-fields/name/block.json index f0d26cad7fda..4196c26f22c0 100644 --- a/packages/js/product-editor/src/blocks/product-fields/name/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/name/block.json @@ -20,7 +20,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/password/block.json b/packages/js/product-editor/src/blocks/product-fields/password/block.json index 63ea5ba1ea65..15f4517dc22f 100644 --- a/packages/js/product-editor/src/blocks/product-fields/password/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/password/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/product-list/block.json b/packages/js/product-editor/src/blocks/product-fields/product-list/block.json index 3a670295ebf0..644a6a4a18b4 100644 --- a/packages/js/product-editor/src/blocks/product-fields/product-list/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/product-list/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/regular-price/block.json b/packages/js/product-editor/src/blocks/product-fields/regular-price/block.json index 3cf9fd51bc35..fffa0e8ca583 100644 --- a/packages/js/product-editor/src/blocks/product-fields/regular-price/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/regular-price/block.json @@ -26,7 +26,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/sale-price/block.json b/packages/js/product-editor/src/blocks/product-fields/sale-price/block.json index d5b698eaac15..5dfa1a7f5f51 100644 --- a/packages/js/product-editor/src/blocks/product-fields/sale-price/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/sale-price/block.json @@ -22,7 +22,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/shipping-dimensions/block.json b/packages/js/product-editor/src/blocks/product-fields/shipping-dimensions/block.json index d66452bd7817..84a8bea926a9 100644 --- a/packages/js/product-editor/src/blocks/product-fields/shipping-dimensions/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/shipping-dimensions/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/summary/block.json b/packages/js/product-editor/src/blocks/product-fields/summary/block.json index b1859bc2ffab..50a10675278d 100644 --- a/packages/js/product-editor/src/blocks/product-fields/summary/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/summary/block.json @@ -47,7 +47,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false diff --git a/packages/js/product-editor/src/blocks/product-fields/tag/block.json b/packages/js/product-editor/src/blocks/product-fields/tag/block.json index 7a897a4d967d..88349967497d 100644 --- a/packages/js/product-editor/src/blocks/product-fields/tag/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/tag/block.json @@ -23,7 +23,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/variation-items/block.json b/packages/js/product-editor/src/blocks/product-fields/variation-items/block.json index f29fc947aeed..7c0ad11950c4 100644 --- a/packages/js/product-editor/src/blocks/product-fields/variation-items/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/variation-items/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, diff --git a/packages/js/product-editor/src/blocks/product-fields/variation-options/block.json b/packages/js/product-editor/src/blocks/product-fields/variation-options/block.json index d2c038dca94b..c7aa348db3da 100644 --- a/packages/js/product-editor/src/blocks/product-fields/variation-options/block.json +++ b/packages/js/product-editor/src/blocks/product-fields/variation-options/block.json @@ -16,7 +16,7 @@ "supports": { "align": false, "html": false, - "multiple": false, + "multiple": true, "reusable": false, "inserter": false, "lock": false, From 75f037e31ecaa49e0ff2885b37612c620bfc197d Mon Sep 17 00:00:00 2001 From: nigeljamesstevenson <105309450+nigeljamesstevenson@users.noreply.github.com> Date: Tue, 5 Mar 2024 01:08:15 +0000 Subject: [PATCH 02/18] Update test-assistant-release-highlight-tracker.yml --- .github/workflows/test-assistant-release-highlight-tracker.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-assistant-release-highlight-tracker.yml b/.github/workflows/test-assistant-release-highlight-tracker.yml index fa58fda2ae48..fb2399cf29aa 100644 --- a/.github/workflows/test-assistant-release-highlight-tracker.yml +++ b/.github/workflows/test-assistant-release-highlight-tracker.yml @@ -81,7 +81,5 @@ jobs: <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> *Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }} *Monthly Release Milestone:* <${{ github.event.pull_request.milestone.html_url }}|${{ github.event.pull_request.milestone.title }}> (Release Date: ${{ env.MILESTONE_DATE }}) - *WooAF (weekly) Timeline: this PR can be tested from:* ${{ env.TEST_DATE_MESSAGE }} - Please visit the <#${{ secrets.WOO_CORE_RELEASES_SLACK_CHANNEL }}> to obtain the latest WooAF build for testing. slack-optional-unfurl_links: false slack-optional-unfurl_media: false From 64906823664245e6a37391315129c9103ee912cb Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Tue, 5 Mar 2024 10:43:32 +0800 Subject: [PATCH 03/18] Add "launch your store" task (#45270) * Add launch your store task * Update tasklist header style * Add changelog --- .../components/task-headers/index.ts | 2 + .../task-headers/launch-your-store.tsx | 52 +++++++++++++ .../task-list-completed-header.scss | 4 + .../task-lists/setup-task-list/style.scss | 18 ++++- .../launch-your-store-illustration.svg | 24 ++++++ .../changelog/add-launch-your-store-task | 4 + .../Features/OnboardingTasks/TaskLists.php | 1 + .../OnboardingTasks/Tasks/LaunchYourStore.php | 76 +++++++++++++++++++ 8 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/launch-your-store.tsx create mode 100644 plugins/woocommerce/assets/images/task_list/launch-your-store-illustration.svg create mode 100644 plugins/woocommerce/changelog/add-launch-your-store-task create mode 100644 plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/LaunchYourStore.php diff --git a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/index.ts b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/index.ts index 0e5389c2523a..1fa571eca53c 100644 --- a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/index.ts +++ b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/index.ts @@ -11,6 +11,7 @@ import ProductsHeader from './products'; import PurchaseHeader from './purchase'; import PaymentsHeader from './payments'; import WoocommercePaymentsHeader from './woocommerce-payments'; +import LaunchYourStoreHeader from './launch-your-store'; export const taskHeaders: Record< string, React.ElementType > = { store_details: StoreDetailsHeader, @@ -23,4 +24,5 @@ export const taskHeaders: Record< string, React.ElementType > = { products: ProductsHeader, purchase: PurchaseHeader, 'woocommerce-payments': WoocommercePaymentsHeader, + launch_your_store: LaunchYourStoreHeader, }; diff --git a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/launch-your-store.tsx b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/launch-your-store.tsx new file mode 100644 index 000000000000..bbe78e5a4fb5 --- /dev/null +++ b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/launch-your-store.tsx @@ -0,0 +1,52 @@ +/** + * External dependencies + */ +import { Button } from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; +import { TaskType } from '@woocommerce/data'; +/** + * Internal dependencies + */ +import { WC_ASSET_URL } from '../../../../utils/admin-settings'; + +const LaunchYourStoreHeader = ( { + task, + goToTask, +}: { + task: TaskType; + goToTask: React.MouseEventHandler; +} ) => { + return ( +
+ { +
+

+ { __( 'Your store is ready for launch!', 'woocommerce' ) } +

+

+ { __( + "It's time to celebrate – you're ready to launch your store! Woo! Hit the button to preview your store and make it public.", + 'woocommerce' + ) } +

+ +
+
+ ); +}; + +export default LaunchYourStoreHeader; diff --git a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-list-completed-header.scss b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-list-completed-header.scss index f2982e61321b..b9cdccfb6599 100644 --- a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-list-completed-header.scss +++ b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-list-completed-header.scss @@ -30,3 +30,7 @@ $ces-feedback-height: 64px; padding-right: 16px; padding-top: 9px; // align with header text } + +.woocommerce-task-header__contents-container.woocommerce-task-header__launch_your_store img.svg-background { + padding: 8px; +} diff --git a/plugins/woocommerce-admin/client/task-lists/setup-task-list/style.scss b/plugins/woocommerce-admin/client/task-lists/setup-task-list/style.scss index 94c94a9557c4..9ca80e8e4436 100644 --- a/plugins/woocommerce-admin/client/task-lists/setup-task-list/style.scss +++ b/plugins/woocommerce-admin/client/task-lists/setup-task-list/style.scss @@ -227,7 +227,7 @@ } .woocommerce-task-header__contents-container { - padding: 20px 24px; + padding: 24px 40px 24px 24px; position: relative; flex: 1; overflow: hidden; @@ -271,13 +271,27 @@ } max-width: 70%; + + h1 { + color: $gray-900; + font-size: 1.25rem; + font-style: normal; + font-weight: 400; + line-height: 28px; /* 140% */ + padding: 0; + } + p, span { color: $gray-700; + font-size: 0.8125rem; + font-style: normal; + font-weight: 400; + line-height: 16px; /* 123.077% */ } p:first-of-type { - margin-top: $gap-smallest; + margin-top: $gap-smaller; } // This is required in order to have svg image as background. diff --git a/plugins/woocommerce/assets/images/task_list/launch-your-store-illustration.svg b/plugins/woocommerce/assets/images/task_list/launch-your-store-illustration.svg new file mode 100644 index 000000000000..cf812067d175 --- /dev/null +++ b/plugins/woocommerce/assets/images/task_list/launch-your-store-illustration.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/woocommerce/changelog/add-launch-your-store-task b/plugins/woocommerce/changelog/add-launch-your-store-task new file mode 100644 index 000000000000..906e90b8bb5c --- /dev/null +++ b/plugins/woocommerce/changelog/add-launch-your-store-task @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add launch your store task diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php index aabc8fd6780a..fcbfe142cf4c 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php @@ -118,6 +118,7 @@ public static function init_default_lists() { 'Tax', 'Shipping', 'Marketing', + 'LaunchYourStore', ); if ( Features::is_enabled( 'core-profiler' ) ) { diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/LaunchYourStore.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/LaunchYourStore.php new file mode 100644 index 000000000000..786de8006ea6 --- /dev/null +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/LaunchYourStore.php @@ -0,0 +1,76 @@ + Date: Tue, 5 Mar 2024 11:09:36 +0700 Subject: [PATCH 04/18] [Experimental] Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block (#45276) Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block --- .../components/inspector-controls.tsx | 17 ++++++++--------- .../inner-blocks/attribute-filter/edit.tsx | 7 +------ plugins/woocommerce/changelog/followup-44757 | 4 ++++ 3 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 plugins/woocommerce/changelog/followup-44757 diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/components/inspector-controls.tsx b/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/components/inspector-controls.tsx index 9fbf58f3bde4..d7ace3085e9d 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/components/inspector-controls.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/components/inspector-controls.tsx @@ -18,17 +18,12 @@ import { * Internal dependencies */ import { AttributeSelectControls } from './attribute-select-controls'; -import { BlockAttributes } from '../types'; +import { EditProps } from '../types'; -export const Inspector = ( { - attributes, - setAttributeId, -}: { - attributes: BlockAttributes; - setAttributeId: ( id: unknown ) => void; -} ) => { +export const Inspector = ( { attributes, setAttributes }: EditProps ) => { const { attributeId, showCounts, queryType, displayStyle, selectType } = attributes; + return ( @@ -122,7 +117,11 @@ export const Inspector = ( { { + setAttributes( { + attributeId: id, + } ); + } } /> diff --git a/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/edit.tsx b/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/edit.tsx index 1220ff155dfb..2be98d1ecdc7 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/edit.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/attribute-filter/edit.tsx @@ -241,18 +241,13 @@ const Edit = ( props: EditProps ) => { ); - const inspectorProps = { - ...props, - setAttributeId, - }; - return ( - + { displayStyle === 'dropdown' ? ( Date: Tue, 5 Mar 2024 11:11:31 +0100 Subject: [PATCH 05/18] [CYS on Core] Display the theme switch modal only if the current active theme is not TT4 (#45296) * Ensure the active theme switch modal is displayed only if the theme is different than TT4 * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions --- .../customize-store/intro/intro-banners.tsx | 21 ++++++++++++++++++- ...heme-has-been-already-modified-by-the-user | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/45296-45281-cys-on-core-identify-if-the-current-active-tt4-theme-has-been-already-modified-by-the-user diff --git a/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx b/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx index cb009400825c..ccc1319be29e 100644 --- a/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx +++ b/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx @@ -9,6 +9,7 @@ import { recordEvent } from '@woocommerce/tracks'; import interpolateComponents from '@automattic/interpolate-components'; import { Link } from '@woocommerce/components'; import { useState } from '@wordpress/element'; +import { useSelect } from '@wordpress/data'; /** * Internal dependencies @@ -222,6 +223,15 @@ export const NoAIBanner = ( { sendEvent: React.ComponentProps< typeof Intro >[ 'sendEvent' ]; } ) => { const [ isModalOpen, setIsModalOpen ] = useState( false ); + interface Theme { + stylesheet?: string; + } + + const currentTheme = useSelect( ( select ) => { + return select( 'core' ).getCurrentTheme() as Theme; + }, [] ); + + const isDefaultTheme = currentTheme?.stylesheet === 'twentytwentyfour'; return ( <> @@ -234,7 +244,13 @@ export const NoAIBanner = ( { bannerClass="no-ai-banner" bannerButtonText={ __( 'Start designing', 'woocommerce' ) } bannerButtonOnClick={ () => { - setIsModalOpen( true ); + if ( ! isDefaultTheme ) { + setIsModalOpen( true ); + } else { + sendEvent( { + type: 'DESIGN_WITHOUT_AI', + } ); + } } } showAIDisclaimer={ false } /> @@ -271,6 +287,9 @@ export const NoAIBanner = ( { type: 'DESIGN_WITHOUT_AI', } ); setIsModalOpen( false ); + recordEvent( + 'customize_your_store_agree_to_theme_switch_click' + ); } } variant="primary" > diff --git a/plugins/woocommerce/changelog/45296-45281-cys-on-core-identify-if-the-current-active-tt4-theme-has-been-already-modified-by-the-user b/plugins/woocommerce/changelog/45296-45281-cys-on-core-identify-if-the-current-active-tt4-theme-has-been-already-modified-by-the-user new file mode 100644 index 000000000000..48497cdfa9e3 --- /dev/null +++ b/plugins/woocommerce/changelog/45296-45281-cys-on-core-identify-if-the-current-active-tt4-theme-has-been-already-modified-by-the-user @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Display the theme switch modal in the Customize Your Store flow only if the currently active theme is not TT4 \ No newline at end of file From ed624844f86f38f86405f49a1a00fac1998566a7 Mon Sep 17 00:00:00 2001 From: Patricia Hillebrandt Date: Tue, 5 Mar 2024 11:15:09 +0100 Subject: [PATCH 06/18] [CYS on Core] Ensure the user is directed to the in app marketplace whenever clicking on 'Browse all themes' (#45288) * Ensure the user is directed to the in app marketplace whenever clicking on 'Browse all themes' on core. * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions --- .../client/customize-store/index.tsx | 12 +++++++++--- ...arketplace-whenever-clicking-on-browse-all-themes | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 plugins/woocommerce/changelog/45288-45284-cys-on-core-ensure-the-user-is-directed-to-the-in-app-marketplace-whenever-clicking-on-browse-all-themes diff --git a/plugins/woocommerce-admin/client/customize-store/index.tsx b/plugins/woocommerce-admin/client/customize-store/index.tsx index a1d1a4eb2a7b..33a3a2c1093e 100644 --- a/plugins/woocommerce-admin/client/customize-store/index.tsx +++ b/plugins/woocommerce-admin/client/customize-store/index.tsx @@ -83,9 +83,15 @@ const redirectToWooHome = () => { }; const redirectToThemes = ( _context: customizeStoreStateMachineContext ) => { - window.location.href = - _context?.intro?.themeData?._links?.browse_all?.href ?? - getAdminLink( 'themes.php' ); + if ( isWooExpress() ) { + window.location.href = + _context?.intro?.themeData?._links?.browse_all?.href ?? + getAdminLink( 'themes.php' ); + } else { + window.location.href = getAdminLink( + 'admin.php?page=wc-admin&tab=themes&path=%2Fextensions' + ); + } }; const markTaskComplete = async () => { diff --git a/plugins/woocommerce/changelog/45288-45284-cys-on-core-ensure-the-user-is-directed-to-the-in-app-marketplace-whenever-clicking-on-browse-all-themes b/plugins/woocommerce/changelog/45288-45284-cys-on-core-ensure-the-user-is-directed-to-the-in-app-marketplace-whenever-clicking-on-browse-all-themes new file mode 100644 index 000000000000..b140e047126c --- /dev/null +++ b/plugins/woocommerce/changelog/45288-45284-cys-on-core-ensure-the-user-is-directed-to-the-in-app-marketplace-whenever-clicking-on-browse-all-themes @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Ensure the user is directed to the in-app marketplace whenever clicking on 'Browse all themes' within the Customize Your Store flow. \ No newline at end of file From 8c927169842b7353fb5ce4c46baf62a3c4f91a97 Mon Sep 17 00:00:00 2001 From: nigeljamesstevenson <105309450+nigeljamesstevenson@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:00:00 +0000 Subject: [PATCH 07/18] Update changelog.txt to remove 7.2.0 and 7.2.1 duplicate entries (#45309) Update changelog.txt --- changelog.txt | 122 -------------------------------------------------- 1 file changed, 122 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6501dc732ae6..a6f0eca56b00 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2055,128 +2055,6 @@ * Enhancement - Select the current new added shipping class [#35123](https://github.com/woocommerce/woocommerce/pull/35123) * Enhancement - Tweaks the PR template for GitHub pull requests [#34597](https://github.com/woocommerce/woocommerce/pull/34597) - -= 7.2.1 2022-12-16 = - -**WooCommerce** - -* Update - Include taxes migration in MigrationHelper::migrate_country_states [#35967](https://github.com/woocommerce/woocommerce/pull/35967) - -= 7.2.0 2022-12-14 = - -**WooCommerce** - -* Fix - Drop usage of WP 5.9 function in the product quantity selector template. [#36054](https://github.com/woocommerce/woocommerce/pull/36054) -* Fix - Add a data migration for changed New Zealand and Ukraine state codes [#35669](https://github.com/woocommerce/woocommerce/pull/35669) -* Fix - Fix error in onboarding wizard when plugin is activated but includes unexpected output. [#35866](https://github.com/woocommerce/woocommerce/pull/35866) -* Fix - Increased margin so that overflow modal content doesn't clip header [#35780](https://github.com/woocommerce/woocommerce/pull/35780) -* Fix - Added default additional content to emails via filter woocommerce_email_additional_content_. [#35195](https://github.com/woocommerce/woocommerce/pull/35195) -* Fix - Corrects the currency symbol for Libyan Dinar (LYD). [#35395](https://github.com/woocommerce/woocommerce/pull/35395) -* Fix - Fix 'Invalid payment method' error upon double click on Delete button of Payment methods table [#30884](https://github.com/woocommerce/woocommerce/pull/30884) -* Fix - Fix bg color that was not covering the full page [#35476](https://github.com/woocommerce/woocommerce/pull/35476) -* Fix - Fix class name for class FirstDownlaodableProduct [#35383](https://github.com/woocommerce/woocommerce/pull/35383) -* Fix - Fixed "Unsupported operand types" error. [#34327](https://github.com/woocommerce/woocommerce/pull/34327) -* Fix - Fix inconsistent return type of class WC_Shipping_Rate->get_shipping_tax() [#35453](https://github.com/woocommerce/woocommerce/pull/35453) -* Fix - Fix invalid wcadmin_install_plugin_error event props [#35411](https://github.com/woocommerce/woocommerce/pull/35411) -* Fix - Fix JS error when the business step is accessed directly via URL without completing the previous steps [#35045](https://github.com/woocommerce/woocommerce/pull/35045) -* Fix - fix popper position for in-app marketplace tour [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Fix - Fix WooCommerce icons not loading in the site editor. [#35532](https://github.com/woocommerce/woocommerce/pull/35532) -* Fix - FQCN for WP_Error in PHPDoc. [#35305](https://github.com/woocommerce/woocommerce/pull/35305) -* Fix - Make the user search metabox for orders show the same information for the loaded user and for search results [#35244](https://github.com/woocommerce/woocommerce/pull/35244) -* Fix - Override filter_meta_data method, since it should be a no-op anyway. [#35192](https://github.com/woocommerce/woocommerce/pull/35192) -* Fix - Remove the direct dependency on `$_POST` when validating checkout data. [#35329](https://github.com/woocommerce/woocommerce/pull/35329) -* Fix - Revert change that auto collapses the product short description field. [#35213](https://github.com/woocommerce/woocommerce/pull/35213) -* Fix - Skip flaky settings API test [#35338](https://github.com/woocommerce/woocommerce/pull/35338) -* Fix - Update Playwright from 1.26.1 to 1.27.1 [#35106](https://github.com/woocommerce/woocommerce/pull/35106) -* Fix - When the minimum and maximum quantity are identical, render the quantity input and set it to disabled. [#34282](https://github.com/woocommerce/woocommerce/pull/34282) -* Add - Add "Empty Trash" functionality to HPOS list table. [#35489](https://github.com/woocommerce/woocommerce/pull/35489) -* Add - Add add attribute modal to the attribute field in the new product management MVP [#34999](https://github.com/woocommerce/woocommerce/pull/34999) -* Add - Add add new option for the category dropdown within the product MVP [#35132](https://github.com/woocommerce/woocommerce/pull/35132) -* Add - Add contextual product more menu [#35447](https://github.com/woocommerce/woocommerce/pull/35447) -* Add - Added a guided tour for WooCommerce Extensions page [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Add - Added npm script for Playwright API Core Tests [#35283](https://github.com/woocommerce/woocommerce/pull/35283) -* Add - Added states for Senegal. [#35199](https://github.com/woocommerce/woocommerce/pull/35199) -* Add - Added the "Tour the WooCommerce Marketplace" task to onboarding tasks list [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Add - Added Ukrainian subdivisions. [#35493](https://github.com/woocommerce/woocommerce/pull/35493) -* Add - Adding attribute edit modal for new product screen. [#35269](https://github.com/woocommerce/woocommerce/pull/35269) -* Add - Add manual stock management section to product management experience [#35047](https://github.com/woocommerce/woocommerce/pull/35047) -* Add - Add new Category dropdown field to the new Product Management screen. [#34400](https://github.com/woocommerce/woocommerce/pull/34400) -* Add - add new track events for in-app marketplace tour [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Add - Add option and modal to create new attribute terms within MVP attribute modal. [#35131](https://github.com/woocommerce/woocommerce/pull/35131) -* Add - Add placeholder to description field [#35286](https://github.com/woocommerce/woocommerce/pull/35286) -* Add - Add playwright api-core-tests for data crud operations [#35347](https://github.com/woocommerce/woocommerce/pull/35347) -* Add - Add playwright api-core-tests for payment gateways crud operations [#35279](https://github.com/woocommerce/woocommerce/pull/35279) -* Add - Add playwright api-core-tests for product reviews crud operations [#35163](https://github.com/woocommerce/woocommerce/pull/35163) -* Add - Add playwright api-core-tests for product variations crud operations [#35355](https://github.com/woocommerce/woocommerce/pull/35355) -* Add - Add playwright api-core-tests for reports crud operations [#35388](https://github.com/woocommerce/woocommerce/pull/35388) -* Add - Add playwright api-core-tests for settingss crud operations [#35253](https://github.com/woocommerce/woocommerce/pull/35253) -* Add - Add playwright api-core-tests for system status crud operations [#35254](https://github.com/woocommerce/woocommerce/pull/35254) -* Add - Add playwright api-core-tests for webhooks crud operations [#35292](https://github.com/woocommerce/woocommerce/pull/35292) -* Add - Add Product description title in old editor for clarification. [#35154](https://github.com/woocommerce/woocommerce/pull/35154) -* Add - Add product inventory advanced section [#35164](https://github.com/woocommerce/woocommerce/pull/35164) -* Add - Add product management description to new product management experience [#34961](https://github.com/woocommerce/woocommerce/pull/34961) -* Add - Add product state badge to product form header [#35460](https://github.com/woocommerce/woocommerce/pull/35460) -* Add - Add product title to header when available [#35431](https://github.com/woocommerce/woocommerce/pull/35431) -* Add - Add scheduled sale support to new product edit page. [#34538](https://github.com/woocommerce/woocommerce/pull/34538) -* Add - Adds new Inbox Note to provide more information about WooCommerce Payments to users who dismiss the WCPay promo but say that they want more information in the exit survey. [#35581](https://github.com/woocommerce/woocommerce/pull/35581) -* Add - Add summary to new product page experience [#35201](https://github.com/woocommerce/woocommerce/pull/35201) -* Add - Include order datastore information in status report. [#35487](https://github.com/woocommerce/woocommerce/pull/35487) -* Add - Make it possible to add custom bulk action handling to the admin order list screen (when HPOS is enabled). [#35442](https://github.com/woocommerce/woocommerce/pull/35442) -* Add - Set In-App Marketplace Tour as completed on tour close [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Add - When custom order tables are not authoritative, admin UI requests will be redirected to the matching legacy order screen as appropriate. [#35463](https://github.com/woocommerce/woocommerce/pull/35463) -* Update - Woo Blocks 8.9.2 [#35805](https://github.com/woocommerce/woocommerce/pull/35805) -* Update - Comment: Update WooCommerce Blocks to 8.7.2 [#35101](https://github.com/woocommerce/woocommerce/pull/35101) -* Update - Comment: Update WooCommerce Blocks to 8.7.3 [#35219](https://github.com/woocommerce/woocommerce/pull/35219) -* Update - Comment: Update WooCommerce Blocks to 8.9.1 [#35564](https://github.com/woocommerce/woocommerce/pull/35564) -* Update - CustomOrdersTableController::custom_orders_table_usage_is_enabled returns now false if the HPOS feature is disabled [#35597](https://github.com/woocommerce/woocommerce/pull/35597) -* Update - Disable inventory stock toggle when product stock management is disabled [#35059](https://github.com/woocommerce/woocommerce/pull/35059) -* Update - Improve the loading time of WooCommerce setup widget for large databases [#35334](https://github.com/woocommerce/woocommerce/pull/35334) -* Update - Permit showing a guided tour for WooCommerce Extensions page on desktops only [#35278](https://github.com/woocommerce/woocommerce/pull/35278) -* Update - Remove adding and managing products note [#35319](https://github.com/woocommerce/woocommerce/pull/35319) -* Update - Remove first downloadable product note [#35318](https://github.com/woocommerce/woocommerce/pull/35318) -* Update - Remove InsightFirstProductAndPayment note [#35309](https://github.com/woocommerce/woocommerce/pull/35309) -* Update - Remove insight on first sale note [#35341](https://github.com/woocommerce/woocommerce/pull/35341) -* Update - Remove manage store activity note [#35320](https://github.com/woocommerce/woocommerce/pull/35320) -* Update - Remove Popover.Slot usage and make use of exported SelectControlMenuSlot. [#35353](https://github.com/woocommerce/woocommerce/pull/35353) -* Update - Remove update store details note [#35322](https://github.com/woocommerce/woocommerce/pull/35322) -* Update - Update Array checks in playwright api-core-tests as some of the existing tests would produce false positives [#35462](https://github.com/woocommerce/woocommerce/pull/35462) -* Update - Update playwright api-core-tests for shipping crud operations [#35332](https://github.com/woocommerce/woocommerce/pull/35332) -* Update - Update playwright api-core-tests to execute for both base test environment and base JN environment with WooCommerce [#35522](https://github.com/woocommerce/woocommerce/pull/35522) -* Update - Update products task list UI [#35611](https://github.com/woocommerce/woocommerce/pull/35611) -* Update - Update ShippingLabelBanner add_meta_box action to only trigger on shop_order pages and remove deprecated function call. [#35212](https://github.com/woocommerce/woocommerce/pull/35212) -* Update - Update WooCommerce Blocks to 8.9.0 [#35521](https://github.com/woocommerce/woocommerce/pull/35521) -* Dev - Add variation price shortcut [#34948](https://github.com/woocommerce/woocommerce/pull/34948) -* Dev - Cleanup and deprecate unused Task properties and methods [#35450](https://github.com/woocommerce/woocommerce/pull/35450) -* Dev - Enable Playwright tests on Daily Smoke Test workflow and upload its Allure reports to S3 bucket. [#35114](https://github.com/woocommerce/woocommerce/pull/35114) -* Dev - Move product action buttons to header menu [#35214](https://github.com/woocommerce/woocommerce/pull/35214) -* Dev - Revert the changes introduced in PR #35282 [#35337](https://github.com/woocommerce/woocommerce/pull/35337) -* Dev - Show a dismissible snackbar if the server responds with an error [#35160](https://github.com/woocommerce/woocommerce/pull/35160) -* Dev - Update api-core-tests readme for consistency with new command and updates to other commands too. [#35303](https://github.com/woocommerce/woocommerce/pull/35303) -* Dev - Updated the COT plugin URL now that this feature can be enabled in a different way. [#34990](https://github.com/woocommerce/woocommerce/pull/34990) -* Dev - Update the list of tags for WC plugin on .org [#35573](https://github.com/woocommerce/woocommerce/pull/35573) -* Dev - Update unit test install script for db sockets. [#35152](https://github.com/woocommerce/woocommerce/pull/35152) -* Dev - Use plugins/woocommerce/tests/e2e-pw folder for saving test outputs [#35206](https://github.com/woocommerce/woocommerce/pull/35206) -* Dev - Uses the globa-setup.js to setup permalinks structure [#35282](https://github.com/woocommerce/woocommerce/pull/35282) -* Tweak - Move HPOS hook woocommerce_before_delete_order before deleting order. [#35517](https://github.com/woocommerce/woocommerce/pull/35517) -* Tweak - Adds new filter `woocommerce_get_customer_payment_tokens_limit` to set limit on number of payment methods fetched within the My Account page. [#29850](https://github.com/woocommerce/woocommerce/pull/29850) -* Tweak - Add source parameter for calls to the subscriptions endpoint on WooCommerce.com [#35051](https://github.com/woocommerce/woocommerce/pull/35051) -* Tweak - Fix @version header in form-login.php [#35479](https://github.com/woocommerce/woocommerce/pull/35479) -* Tweak - Move HPOS hook woocommerce_before_delete_order before deleting order. [#35517](https://github.com/woocommerce/woocommerce/pull/35517) -* Tweak - typo fix [#35111](https://github.com/woocommerce/woocommerce/pull/35111) -* Tweak - Unwrap product page input props and pass via getInputProps [#35034](https://github.com/woocommerce/woocommerce/pull/35034) -* Tweak - Updates the currency symbol used for the Azerbaijani manat. [#30605](https://github.com/woocommerce/woocommerce/pull/30605) -* Tweak - Use new Tooltip component instead of EnrichedLabel [#35024](https://github.com/woocommerce/woocommerce/pull/35024) -* Enhancement - Change the product info section title to Product Details [#35255](https://github.com/woocommerce/woocommerce/pull/35255) -* Enhancement - Fix the display of letter descenders in the shipping class dropdown menu [#35258](https://github.com/woocommerce/woocommerce/pull/35258) -* Enhancement - Improve the communication around required and optional [#35266](https://github.com/woocommerce/woocommerce/pull/35266) -* Enhancement - Increase the spacing between the shipping box illustration and the dimensions fields [#35259](https://github.com/woocommerce/woocommerce/pull/35259) -* Enhancement - Optimize query usage in the Onboarding tasks [#35065](https://github.com/woocommerce/woocommerce/pull/35065) -* Enhancement - Remove some placeholder values [#35267](https://github.com/woocommerce/woocommerce/pull/35267) -* Enhancement - Replace the trash can icon in the attribute list [#35133](https://github.com/woocommerce/woocommerce/pull/35133) -* Enhancement - Select the current new added shipping class [#35123](https://github.com/woocommerce/woocommerce/pull/35123) -* Enhancement - Tweaks the PR template for GitHub pull requests [#34597](https://github.com/woocommerce/woocommerce/pull/34597) - - = 7.1.1 2022-12-07 = **WooCommerce** From 25d24509b86843148c1e040b2a49abf2ddaca7f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:19:44 +0800 Subject: [PATCH 08/18] Delete changelog files based on PR 45249 (#45312) Delete changelog files for 45249 Co-authored-by: WooCommerce Bot --- plugins/woocommerce/changelog/fix-missing-shipping-notices | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 plugins/woocommerce/changelog/fix-missing-shipping-notices diff --git a/plugins/woocommerce/changelog/fix-missing-shipping-notices b/plugins/woocommerce/changelog/fix-missing-shipping-notices deleted file mode 100644 index aa8e11563bb4..000000000000 --- a/plugins/woocommerce/changelog/fix-missing-shipping-notices +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix issue where no text would be displayed if no shipping methods are available in the cart/checkout From 9f7a6779f6d4134d9bc74b9655dcac6dbe108360 Mon Sep 17 00:00:00 2001 From: Seghir Nadir Date: Tue, 5 Mar 2024 14:49:33 +0100 Subject: [PATCH 09/18] Fix styling for select in Site Editor (#45252) * Fix styling for select in Site Editor * Add changefile(s) from automation for the following project(s): woocommerce-blocks --------- Co-authored-by: github-actions --- .../assets/js/base/components/combobox/style.scss | 5 +++++ .../assets/js/base/components/country-input/style.scss | 5 ----- .../assets/js/base/components/state-input/style.scss | 5 ----- .../woocommerce/changelog/45252-fix-select-styling-in-editor | 4 ++++ 4 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 plugins/woocommerce/changelog/45252-fix-select-styling-in-editor diff --git a/plugins/woocommerce-blocks/assets/js/base/components/combobox/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/combobox/style.scss index eb1feb1419da..e9fcc9cd3392 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/combobox/style.scss +++ b/plugins/woocommerce-blocks/assets/js/base/components/combobox/style.scss @@ -10,6 +10,11 @@ @include reset-typography(); @include reset-box(); + // Fixes width in the editor. + .components-flex { + width: 100%; + } + .components-base-control__field { @include reset-box(); position: relative; diff --git a/plugins/woocommerce-blocks/assets/js/base/components/country-input/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/country-input/style.scss index f6bee67990aa..c700efc0c516 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/country-input/style.scss +++ b/plugins/woocommerce-blocks/assets/js/base/components/country-input/style.scss @@ -4,9 +4,4 @@ .wc-block-components-country-input { margin-top: $gap; - - // Fixes width in the editor. - .components-flex { - width: 100%; - } } diff --git a/plugins/woocommerce-blocks/assets/js/base/components/state-input/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/state-input/style.scss index 088f4154a29d..47288567e821 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/state-input/style.scss +++ b/plugins/woocommerce-blocks/assets/js/base/components/state-input/style.scss @@ -1,8 +1,3 @@ .wc-block-components-state-input { margin-top: $gap; - - // Fixes width in the editor. - .components-flex { - width: 100%; - } } diff --git a/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor b/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor new file mode 100644 index 000000000000..949791044961 --- /dev/null +++ b/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: Styling issue for unreleased code. + From 33d38be479c9d6dedf0ff4a79b67fd4f1c4c5c86 Mon Sep 17 00:00:00 2001 From: Maikel Perez Date: Tue, 5 Mar 2024 11:12:31 -0300 Subject: [PATCH 10/18] Add Post-purchase note field to the Inventory tab (#45244) * Add Post-purchase note field to the Inventory tab * Add changelog file --- plugins/woocommerce/changelog/add-41740 | 4 ++++ .../ProductTemplates/SimpleProductTemplate.php | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 plugins/woocommerce/changelog/add-41740 diff --git a/plugins/woocommerce/changelog/add-41740 b/plugins/woocommerce/changelog/add-41740 new file mode 100644 index 000000000000..841315bf6472 --- /dev/null +++ b/plugins/woocommerce/changelog/add-41740 @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add Post-purchase note field to the Inventory tab diff --git a/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php b/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php index db266efa9163..8e6ba456b818 100644 --- a/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php +++ b/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php @@ -853,6 +853,20 @@ private function add_inventory_group_blocks() { 'hideConditions' => $product_stock_status_hide_conditions, ) ); + + $product_inventory_section->add_block( + array( + 'id' => 'product-purchase-note', + 'blockName' => 'woocommerce/product-text-area-field', + 'order' => 20, + 'attributes' => array( + 'property' => 'purchase_note', + 'label' => __( 'Post-purchase note', 'woocommerce' ), + 'placeholder' => __( 'Enter an optional note attached to the order confirmation message sent to the shopper.', 'woocommerce' ), + ), + ) + ); + $product_inventory_advanced = $product_inventory_section->add_block( array( 'id' => 'product-inventory-advanced', From 21ba2275dae75846908bb69b1ba079048192de7e Mon Sep 17 00:00:00 2001 From: Brent MacKinnon Date: Tue, 5 Mar 2024 11:01:52 -0400 Subject: [PATCH 11/18] Update accessibility.md (#45316) * Update accessibility.md * Update docs-manifest.json --- docs/docs-manifest.json | 4 ++-- docs/ux-guidelines-extensions/accessibility.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs-manifest.json b/docs/docs-manifest.json index 12db6f3324bc..7b88f5b79ed2 100644 --- a/docs/docs-manifest.json +++ b/docs/docs-manifest.json @@ -988,7 +988,7 @@ "post_title": "WooCommerce Extension Guidelines - Accessibility", "menu_title": "Accessibility", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/ux-guidelines-extensions/accessibility.md", - "hash": "3b8d43390d349279d984ae750e95a3cbb9c4f9b39177325bb7e95ba5505d839a", + "hash": "b147dbdb658b941e7bd45bec21f68ca83667915a1ba51f0d4b0e856899d0202d", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/ux-guidelines-extensions/accessibility.md", "id": "e085da13824f41a311b3eeb391386a1c2f67da32" } @@ -1204,5 +1204,5 @@ "categories": [] } ], - "hash": "919aaa18bc145996f6a7dc0259f810f29363cc12721bac513d0d4234b30c50a7" + "hash": "220fde7d5cc624e61bca7647071b804e013adf7ea40f84e4196af5d9851f4de5" } \ No newline at end of file diff --git a/docs/ux-guidelines-extensions/accessibility.md b/docs/ux-guidelines-extensions/accessibility.md index 07ad5f9db4f1..141e634137a8 100644 --- a/docs/ux-guidelines-extensions/accessibility.md +++ b/docs/ux-guidelines-extensions/accessibility.md @@ -3,6 +3,6 @@ post_title: WooCommerce Extension Guidelines - Accessibility menu_title: Accessibility --- -Your extensions must meet the [Web Content Accessibility Guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/) (WCAG). Meeting 100% conformance with WCAG 2.0 is hard work; meet the AA level of conformance at a minimum. +Your extensions must meet the [WordPress Accessibility Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/) For more information on accessibility, check out the [WordPress accessibility quick start guide](https://make.wordpress.org/accessibility/handbook/best-practices/quick-start-guide/). From e549712ebf80a23fcf471c5b0bdee80f5195c57a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 23:43:44 +0800 Subject: [PATCH 12/18] Delete changelog files based on PR 45252 (#45319) Delete changelog files for 45252 Co-authored-by: WooCommerce Bot --- .../woocommerce/changelog/45252-fix-select-styling-in-editor | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 plugins/woocommerce/changelog/45252-fix-select-styling-in-editor diff --git a/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor b/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor deleted file mode 100644 index 949791044961..000000000000 --- a/plugins/woocommerce/changelog/45252-fix-select-styling-in-editor +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix -Comment: Styling issue for unreleased code. - From 1c68e2dd9f67aabc181859df137faa7857eb74c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Tue, 5 Mar 2024 18:21:44 +0100 Subject: [PATCH 13/18] [CYS] Fix the selected pattern in footer, header and homepage (#45240) * Check also the number of inner blocks before checking the attributes * Add classes to assembler footer patterns * Add classes to assembler header patterns * Add changefile(s) from automation for the following project(s): woocommerce * Mark the current homepage template as selected * Remove unused import --------- Co-authored-by: github-actions --- .../sidebar-navigation-screen-homepage.tsx | 17 ++++++++++++++++- .../assembler-hub/sidebar/utils.ts | 10 +++++++--- .../changelog/45240-45215-fix-selected-footer | 4 ++++ plugins/woocommerce/patterns/footer-large.php | 2 +- .../woocommerce/patterns/footer-simple-menu.php | 2 +- .../patterns/footer-with-3-menus.php | 2 +- .../patterns/header-centered-pattern.php | 2 +- .../woocommerce/patterns/header-essential.php | 2 +- plugins/woocommerce/patterns/header-large.php | 2 +- plugins/woocommerce/patterns/header-minimal.php | 2 +- 10 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 plugins/woocommerce/changelog/45240-45215-fix-selected-footer diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-homepage.tsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-homepage.tsx index 38826cbbb880..744b07968f25 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-homepage.tsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-homepage.tsx @@ -92,8 +92,23 @@ export const SidebarNavigationScreenHomepage = () => { return; } - setSelectedPattern( selectedPattern ); + const currentSelectedPattern = homePatterns.find( ( patterns ) => { + //'blocks' contains all blocks in the template, including the + // header and footer blocks, while the 'patterns.blocks' does + // not. For that reason we are removing the first and last + // blocks from the 'blocks' to be able to compare then + const homeBlocks = blocks.slice( 1, blocks.length - 1 ); + if ( patterns.blocks.length !== homeBlocks.length ) { + return false; + } + + return homeBlocks.every( + ( block, i ) => block.name === patterns.blocks[ i ].name + ); + } ); + + setSelectedPattern( currentSelectedPattern ); // eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to re-run this effect when currentSelectedPattern changes }, [ blocks, homePatterns ] ); diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/utils.ts b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/utils.ts index 535c84d9c60e..25096c886a38 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/utils.ts +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/utils.ts @@ -24,8 +24,12 @@ export const findPatternByBlock = ( '' ); } + return patterns.find( ( pattern ) => { + const patternBlocks = pattern.blocks[ 0 ]; + if ( patternBlocks.innerBlocks.length !== block.innerBlocks.length ) { + return false; + } - return patterns.find( ( pattern ) => - isEqual( pattern.blocks[ 0 ].attributes, blockAttributes ) - ); + return isEqual( patternBlocks.attributes, blockAttributes ); + } ); }; diff --git a/plugins/woocommerce/changelog/45240-45215-fix-selected-footer b/plugins/woocommerce/changelog/45240-45215-fix-selected-footer new file mode 100644 index 000000000000..0ae0fbecfb3f --- /dev/null +++ b/plugins/woocommerce/changelog/45240-45215-fix-selected-footer @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +CYS - Fix the selected pattern in footer in the assembler. \ No newline at end of file diff --git a/plugins/woocommerce/patterns/footer-large.php b/plugins/woocommerce/patterns/footer-large.php index 10a495f976ab..a82fd7d62349 100644 --- a/plugins/woocommerce/patterns/footer-large.php +++ b/plugins/woocommerce/patterns/footer-large.php @@ -8,7 +8,7 @@ ?> -