From 6172e58d22918bf96742869f679a0453dfa0500e Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Tue, 13 Aug 2024 11:48:36 +0530 Subject: [PATCH 1/7] Removes language section from onboarding flow --- .../choose-audience-section.js | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js index cd74fb6085..c988bd4519 100644 --- a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js +++ b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js @@ -50,37 +50,6 @@ const ChooseAudienceSection = () => { > - - - { __( 'Language', 'google-listings-and-ads' ) } - - - { createInterpolateElement( - __( - 'Listings can only be displayed in your site language. Read more', - 'google-listings-and-ads' - ), - { - link: ( - - ), - } - ) } - - - { __( 'Location', 'google-listings-and-ads' ) } From 088fc95e686db5f41e1acb83c2859d94a8491894 Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Tue, 13 Aug 2024 11:48:57 +0530 Subject: [PATCH 2/7] Updates e2e tests for language secton --- .../specs/setup-mc/step-2-product-listings.test.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/e2e/specs/setup-mc/step-2-product-listings.test.js b/tests/e2e/specs/setup-mc/step-2-product-listings.test.js index 25cd591a51..a2a368f26f 100644 --- a/tests/e2e/specs/setup-mc/step-2-product-listings.test.js +++ b/tests/e2e/specs/setup-mc/step-2-product-listings.test.js @@ -103,11 +103,6 @@ test.describe( 'Configure product listings', () => { ).toBeVisible(); } ); - test( 'should select the default language English', async () => { - const languageRadioRow = productListingsPage.getLanguageRadioRow(); - await expect( languageRadioRow ).toBeChecked(); - } ); - test( 'should see US but should not see UK in the country search box', async () => { const countrySearchBoxContainer = getCountryInputSearchBoxContainer( page ); @@ -371,15 +366,6 @@ test.describe( 'Configure product listings', () => { await productListingsPage.checkSimpleShippingRateRadioButton(); } ); - test( 'should contain the correct URL for "Read more for Language" link', async () => { - const link = productListingsPage.getReadMoreLanguageLink(); - await expect( link ).toBeVisible(); - await expect( link ).toHaveAttribute( - 'href', - 'https://support.google.com/merchants/answer/160637' - ); - } ); - test( 'should contain the correct URL for "Read more for Shipping Rates" link', async () => { const link = productListingsPage.getReadMoreShippingRatesLink(); await expect( link ).toBeVisible(); From 5bfa90b09ba5c8758d15bbc90d387ab36ce4d039 Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Wed, 14 Aug 2024 10:54:14 +0530 Subject: [PATCH 3/7] Fixes linter warnings --- .../choose-audience-section/choose-audience-section.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js index c988bd4519..d0552be99f 100644 --- a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js +++ b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js @@ -1,16 +1,13 @@ /** * External dependencies */ -import { RadioControl } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies */ import { useAdaptiveFormContext } from '.~/components/adaptive-form'; import AppRadioContentControl from '.~/components/app-radio-content-control'; -import AppDocumentationLink from '.~/components/app-documentation-link'; import Section from '.~/wcdl/section'; import Subsection from '.~/wcdl/subsection'; import RadioHelperText from '.~/wcdl/radio-helper-text'; @@ -28,11 +25,9 @@ import './choose-audience-section.scss'; */ const ChooseAudienceSection = () => { const { - values, getInputProps, adapter: { renderRequestedValidation }, } = useAdaptiveFormContext(); - const { locale, language } = values; return ( <> From 8ccaf0e8721150885bb595fd501b9c8353d2f3a6 Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Wed, 21 Aug 2024 11:10:49 +0530 Subject: [PATCH 4/7] Removes unused styles per CR feedback --- .../choose-audience-section/choose-audience-section.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/src/components/free-listings/choose-audience-section/choose-audience-section.scss b/js/src/components/free-listings/choose-audience-section/choose-audience-section.scss index 542b48cd42..f7b1217601 100644 --- a/js/src/components/free-listings/choose-audience-section/choose-audience-section.scss +++ b/js/src/components/free-listings/choose-audience-section/choose-audience-section.scss @@ -1,8 +1,6 @@ .gla-choose-audience-section { - &__language-helper, .wcdl-radio-helper-text { font-style: normal; - color: $gray-700; } .wcdl-subsection-helper-text { From 33146ac3c332663760fd8d5ac6492506af568c0a Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Wed, 21 Aug 2024 11:12:14 +0530 Subject: [PATCH 5/7] Removes documentation link per CR feedback --- .../choose-audience-section/choose-audience-section.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js index d0552be99f..03ed5c00ea 100644 --- a/js/src/components/free-listings/choose-audience-section/choose-audience-section.js +++ b/js/src/components/free-listings/choose-audience-section/choose-audience-section.js @@ -20,8 +20,6 @@ import './choose-audience-section.scss'; * * To be used in onboarding and further editing. * Does not provide any save strategy, this is to be bound externaly. - * - * @fires gla_documentation_link_click with `{ context: 'setup-mc-audience', link_id: 'site-language', href: 'https://support.google.com/merchants/answer/160637' }` */ const ChooseAudienceSection = () => { const { From 5964f662dd1fdb85804ee854bfed9b5411f69542 Mon Sep 17 00:00:00 2001 From: Darshan Sawardekar Date: Wed, 21 Aug 2024 11:14:35 +0530 Subject: [PATCH 6/7] Removes unused code per CR feedback --- .../pages/setup-mc/step-2-product-listings.js | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/tests/e2e/utils/pages/setup-mc/step-2-product-listings.js b/tests/e2e/utils/pages/setup-mc/step-2-product-listings.js index ecd2d84116..53506a097f 100644 --- a/tests/e2e/utils/pages/setup-mc/step-2-product-listings.js +++ b/tests/e2e/utils/pages/setup-mc/step-2-product-listings.js @@ -37,18 +37,6 @@ export default class ProductListingsPage extends MockRequests { ); } - /** - * Get language radio row. - * - * @return {import('@playwright/test').Locator} Get language radio row. - */ - getLanguageRadioRow() { - return this.page.getByRole( 'radio', { - name: 'English', - exact: true, - } ); - } - /** * Get selected countries only radio row. * @@ -302,18 +290,6 @@ export default class ProductListingsPage extends MockRequests { } ); } - /** - * Get "Read more" for Language link. - * - * @return {import('@playwright/test').Locator} Get "Read more" for Language link. - */ - getReadMoreLanguageLink() { - return this.getAudienceCard().getByRole( 'link', { - name: 'Read more', - exact: true, - } ); - } - /** * Get "Read more" for Shipping rates link. * From 766e351558621f1be9184ea0869e0559444ec3ed Mon Sep 17 00:00:00 2001 From: Eason Su Date: Thu, 22 Aug 2024 14:35:42 +0800 Subject: [PATCH 7/7] Update tracking README. --- src/Tracking/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Tracking/README.md b/src/Tracking/README.md index 89d8094924..eb681d895e 100644 --- a/src/Tracking/README.md +++ b/src/Tracking/README.md @@ -322,7 +322,6 @@ When a documentation link is clicked. `href` | `string` | link's URL #### Emitters - [`AppDocumentationLink`](../../js/src/components/app-documentation-link/index.js#L29) -- [`ChooseAudienceSection`](../../js/src/components/free-listings/choose-audience-section/choose-audience-section.js#L29) with `{ context: 'setup-mc-audience', link_id: 'site-language', href: 'https://support.google.com/merchants/answer/160637' }` - [`ConnectAds`](../../js/src/components/google-ads-account-card/connect-ads/index.js#L42) with `{ context: 'setup-ads-connect-account', link_id: 'connect-sub-account', href: 'https://support.google.com/google-ads/answer/6139186' }` - [`ConnectGoogleAccountCard`](../../js/src/components/google-account-card/connect-google-account-card.js#L23) with `{ context: 'setup-mc-accounts', link_id: 'required-google-permissions', href: 'https://woocommerce.com/document/google-listings-and-ads/#required-google-permissions' }` - [`ContactInformation`](../../js/src/components/contact-information/index.js#L91) @@ -565,10 +564,10 @@ Clicking on the button to connect an existing Google Merchant Center account. #### Emitters - [`ConnectMC`](../../js/src/components/google-mc-account-card/connect-mc/index.js#L42) -### [`gla_mc_account_connect_different_account_button_click`](../../js/src/components/google-mc-account-card/connected-google-mc-account-card.js#L21) +### [`gla_mc_account_connect_different_account_button_click`](../../js/src/components/google-mc-account-card/connected-google-mc-account-card.js#L29) Clicking on the "connect to a different Google Merchant Center account" button. #### Emitters -- [`ConnectedGoogleMCAccountCard`](../../js/src/components/google-mc-account-card/connected-google-mc-account-card.js#L36) +- [`ConnectedGoogleMCAccountCard`](../../js/src/components/google-mc-account-card/connected-google-mc-account-card.js#L45) ### [`gla_mc_account_create_button_click`](../../js/src/components/google-mc-account-card/terms-modal/index.js#L16) Clicking on the button to create a new Google Merchant Center account, after agreeing to the terms and conditions. @@ -629,7 +628,7 @@ A modal is closed. `action` | `string` | Indicates the modal is closed by what action (e.g. `maybe-later`\|`dismiss` \| `create-another-campaign`) - `maybe-later` is used when the "Maybe later" button on the modal is clicked - `dismiss` is used when the modal is dismissed by clicking on "X" icon, overlay, generic "Cancel" button, or pressing ESC - `create-another-campaign` is used when the button "Create another campaign" is clicked - `create-paid-campaign` is used when the button "Create paid campaign" is clicked - `confirm` is used when the button "Confirm", "Save" or similar generic "Accept" button is clicked #### Emitters - [`AttributeMappingTable`](../../js/src/attribute-mapping/attribute-mapping-table.js#L59) When any of the modals is closed -- [`Dashboard`](../../js/src/dashboard/index.js#L33) when CES modal is closed. +- [`Dashboard`](../../js/src/dashboard/index.js#L34) when CES modal is closed. - [`ReviewRequest`](../../js/src/product-feed/review-request/index.js#L31) with `action: 'request-review-success' | 'maybe-later' | 'dismiss', context: REQUEST_REVIEW` - [`SubmissionSuccessGuide`](../../js/src/product-feed/submission-success-guide/index.js#L159) with `action: 'create-paid-campaign' | 'maybe-later' | 'view-product-feed' | 'dismiss'`