Skip to content

Commit

Permalink
Merge pull request #2481 from woocommerce/tweak/rebranding
Browse files Browse the repository at this point in the history
Rebranding Google Listings and Ads
  • Loading branch information
puntope authored Jul 26, 2024
2 parents 23dafb9 + c02abe3 commit c3f4679
Show file tree
Hide file tree
Showing 75 changed files with 297 additions and 109 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing

Thanks for your interest in contributing to Google Listings and Ads!
Thanks for your interest in contributing to Google for WooCommerce!

## Guidelines

Like the WooCommerce project, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](./CODE_OF_CONDUCT.md).

If you wish to contribute code, please read the information in the sections below. Then [fork](https://help.github.com/articles/fork-a-repo/) Google Listings and Ads, commit your changes, and [submit a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 🎉
If you wish to contribute code, please read the information in the sections below. Then [fork](https://help.github.com/articles/fork-a-repo/) Google for WooCommerce, commit your changes, and [submit a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 🎉

Google Listings and Ads is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.
Google for WooCommerce is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.

## Reporting Security Issues

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Google Listings & Ads
# Google for WooCommerce

[![PHP Unit Tests](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-unit-tests.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-unit-tests.yml)
[![JavaScript Unit Tests](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-unit-tests.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-unit-tests.yml)
Expand All @@ -19,7 +19,7 @@ This repository is not suitable for support. Please don't use our issue tracker

For self help, start with our [user documentation](https://woocommerce.com/document/google-listings-and-ads/).

The best place to get support is the [WordPress.org Google Listings and Ads forum](https://wordpress.org/support/plugin/google-listings-and-ads/).
The best place to get support is the [WordPress.org Google for WooCommerce forum](https://wordpress.org/support/plugin/google-listings-and-ads/).

If you have a WooCommerce.com account, you can [start a chat or open a ticket on WooCommerce.com](https://woocommerce.com/my-account/contact-support/).

Expand Down
6 changes: 3 additions & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*** WooCommerce Google Listings and Ads Changelog ***
*** Google for WooCommerce Changelog ***

= 2.7.7 - 2024-07-24 =
* Dev - Fix E2E tests failed with WC 9.1.
Expand Down Expand Up @@ -350,7 +350,7 @@
* Add - Declare compatibility for High Performance Order Storage.
* Dev - Selectively externalize bundled packages.
* Fix - E2E Testing: Reduce the false positive rate and adjust the running events on GitHub Actions.
* Fix - Move the order of Google Listings & Ads below the Coupons in the Marketing menu of WooCommerce admin page.
* Fix - Move the order of Google Listings and Ads below the Coupons in the Marketing menu of WooCommerce admin page.
* Fix - WC 6.9 compatibility: Shipping time settings should not appear after selecting the "complex" shipping option.
* Fix - WC 6.9 compatibility: The free shipping threshold should be cleared after selecting the "No" free shipping option.
* Fix - WC 6.9 compatibility: The selected free shipping option should be reset after setting all shipping rates to 0.
Expand Down Expand Up @@ -560,7 +560,7 @@
= 1.12.0 - 2022-03-29 =
* Add - Additional data points for tracker snapshot.
* Add - Enables merchants to select multiple countries as their audience when creating a Google Ads campaign (Smart Shopping Campaign).
* Add - Google Listings And Ads product attributes icon.
* Add - Google Listings and Ads product attributes icon.
* Add - Integration with WooCommerce Shipping Zone to automatically sync shipping settings to Merchant Center.
* FIx - Show right link and message in Paid Campaigns report when there is no data available.
* Fix - Cleanup synced products locally when disconnecting Merchant Center account.
Expand Down
4 changes: 2 additions & 2 deletions docs/gtag-consent-mode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Google Analytics (gtag) Consent Mode

Unless you're running the [Google Analytics for WooCommerce](https://woocommerce.com/products/woocommerce-google-analytics/) extension for a more sophisticated configuration, Google Listings and Ads will add Google's `gtag` to help you track some customer behavior.
Unless you're running the [Google Analytics for WooCommerce](https://woocommerce.com/products/woocommerce-google-analytics/) extension for a more sophisticated configuration, Google for WooCommerce will add Google's `gtag` to help you track some customer behavior.

To respect your customers' privacy, we set up the default state of [consent mode](https://support.google.com/analytics/answer/9976101). We set it to deny all the parameters for visitors from the EEA region.

Expand All @@ -12,4 +12,4 @@ After the page loads, the consent for particular parameters can be updated by ot

The extension does not provide any UI, like a cookie banner, to let your visitors grant consent for tracking. However, it's integrated with [WP Consent API](https://wordpress.org/plugins/wp-consent-api/), so you can pick another extension that provides a banner that meets your needs.

Each of those extensions may require additional setup or registration. Usually, the basic default setup works out of the box, but there may be some integration caveats.
Each of those extensions may require additional setup or registration. Usually, the basic default setup works out of the box, but there may be some integration caveats.
2 changes: 1 addition & 1 deletion google-listings-and-ads.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Plugin Name: Google Listings and Ads
* Plugin Name: Google for WooCommerce
* Plugin URL: https://wordpress.org/plugins/google-listings-and-ads/
* Description: Native integration with Google that allows merchants to easily display their products across Google’s network.
* Version: 2.7.7
Expand Down
2 changes: 2 additions & 0 deletions js/src/attribute-mapping/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Section from '.~/wcdl/section';
import AttributeMappingDescription from './attribute-mapping-description';
import AttributeMappingTable from './attribute-mapping-table';
import NavigationClassic from '.~/components/navigation-classic';
import RebrandingTour from '.~/components/tours/rebranding-tour';
import './index.scss';

/**
Expand All @@ -21,6 +22,7 @@ const AttributeMapping = () => {
return (
<div className="gla-attribute-mapping">
<NavigationClassic />
<RebrandingTour />
<Section
title={ __( 'Manage attributes', 'google-listings-and-ads' ) }
description={ <AttributeMappingDescription /> }
Expand Down
29 changes: 28 additions & 1 deletion js/src/attribute-mapping/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,14 @@ jest.mock( '.~/hooks/usePolling', () => ( {
} ),
} ) );

jest.mock( '.~/components/tours/rebranding-tour', () =>
jest.fn().mockReturnValue( null ).mockName( 'RebrandingTour' )
);

/**
* External dependencies
*/
import { render, fireEvent } from '@testing-library/react';
import { render, fireEvent, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import userEvent from '@testing-library/user-event';

Expand All @@ -153,6 +157,7 @@ import {
} from '.~/data/actions';
import AttributeMappingSync from '.~/attribute-mapping/attribute-mapping-sync';
import usePolling from '.~/hooks/usePolling';
import RebrandingTour from '.~/components/tours/rebranding-tour';

describe( 'Attribute Mapping', () => {
test( 'Renders table', () => {
Expand Down Expand Up @@ -378,4 +383,26 @@ describe( 'Attribute Mapping', () => {
const { queryByText } = render( <AttributeMappingSync /> );
expect( queryByText( 'Scheduled for sync' ) ).toBeTruthy();
} );

describe( 'Rebranding Tour', () => {
test( 'Not rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return null;
} );

render( <AttributeMapping /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).not.toBeInTheDocument();
} );

test( 'Rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return <div role="dialog" aria-label="tour" />;
} );

render( <AttributeMapping /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).toBeInTheDocument();
} );
} );
} );
18 changes: 18 additions & 0 deletions js/src/components/tours/rebrading-tour.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.gla-rebranding-tour {
&__heading {
display: flex;
align-items: center;
gap: $grid-unit-10;
fill: var(--wp-admin-theme-color);
}

// Hide the footer content but leave the padding-bottom because
// TourKit doesn't offer a way not to use the primary button.
.components-card__footer {
padding-top: 0;

> * {
display: none;
}
}
}
67 changes: 67 additions & 0 deletions js/src/components/tours/rebranding-tour.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { createInterpolateElement } from '@wordpress/element';
import { TourKit } from '@woocommerce/components';

/**
* Internal dependencies
*/
import useTour from '.~/hooks/useTour';
import './rebrading-tour.scss';

const TOUR_ID = 'rebranding-tour';

/**
* Renders the tour for notifying about the new extension rebranding
*/
export default function RebrandingTour() {
const { tourChecked, setTourChecked } = useTour( TOUR_ID );

if ( tourChecked ) {
return null;
}

const config = {
steps: [
{
referenceElements: {
desktop:
'.toplevel_page_woocommerce-marketing a[href*="google"]',
},
meta: {
heading: (
<div className="gla-rebranding-tour__heading">
{ __(
'New name, same great solution',
'google-listings-and-ads'
) }
</div>
),
descriptions: {
desktop: (
<>
{ createInterpolateElement(
__(
'Google Listings & Ads is now <strong>Google for WooCommerce</strong>.',
'google-listings-and-ads'
),
{ strong: <strong /> }
) }
</>
),
},
},
},
],
options: {
classNames: 'gla-admin-page,gla-rebranding-tour',
effects: { overlay: false },
},
placement: 'top',
closeHandler: () => setTourChecked( true ),
};

return <TourKit config={ config } />;
}
2 changes: 1 addition & 1 deletion js/src/dashboard/all-programs-table-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { FREE_LISTINGS_PROGRAM_ID, CAMPAIGN_TYPE_PMAX } from '.~/constants';
import AddPaidCampaignButton from '.~/components/paid-ads/add-paid-campaign-button';
import ProgramToggle from './program-toggle';
import FreeListingsDisabledToggle from './free-listings-disabled-toggle';
import CampaignAssetsTour from './campaign-assets-tour';
import CampaignAssetsTour from '.~/components/tours/campaign-assets-tour';

const PROGRAMS_TABLE_CARD_CLASS_NAME = 'gla-all-programs-table-card';
const CAMPAIGN_EDIT_BUTTON_CLASS_NAME = 'gla-campaign-edit-button';
Expand Down
4 changes: 2 additions & 2 deletions js/src/dashboard/all-programs-table-card/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { screen, within, render } from '@testing-library/react';
* Internal dependencies
*/
import AllProgramsTableCard from './';
import CampaignAssetsTour from './campaign-assets-tour';
import CampaignAssetsTour from '.~/components/tours/campaign-assets-tour';
import useAdsCampaigns from '.~/hooks/useAdsCampaigns';
import useAdsCurrency from '.~/hooks/useAdsCurrency';

jest.mock( './campaign-assets-tour', () =>
jest.mock( '.~/components/tours/campaign-assets-tour', () =>
jest
.fn()
.mockReturnValue( <div role="dialog" aria-label="tour" /> )
Expand Down
2 changes: 2 additions & 0 deletions js/src/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import EditPaidAdsCampaign from '.~/pages/edit-paid-ads-campaign';
import CreatePaidAdsCampaign from '.~/pages/create-paid-ads-campaign';
import { CTA_CREATE_ANOTHER_CAMPAIGN, CTA_CONFIRM } from './constants';
import { recordGlaEvent } from '.~/utils/tracks';
import RebrandingTour from '.~/components/tours/rebranding-tour';
import './index.scss';

/**
Expand Down Expand Up @@ -88,6 +89,7 @@ const Dashboard = () => {
<div className="gla-dashboard">
<DifferentCurrencyNotice context="dashboard" />
<NavigationClassic />
<RebrandingTour />
<div className="gla-dashboard__filter">
<AppDateRangeFilterPicker
trackEventReportId={ trackEventReportId }
Expand Down
37 changes: 37 additions & 0 deletions js/src/dashboard/index.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
jest.mock( '.~/components/tours/rebranding-tour', () =>
jest.fn().mockReturnValue( null ).mockName( 'RebrandingTour' )
);

/**
* External dependencies
*/
Expand All @@ -11,6 +15,7 @@ import { getQuery } from '@woocommerce/navigation';
*/
import Dashboard from './index';
import isWCTracksEnabled from '.~/utils/isWCTracksEnabled';
import RebrandingTour from '.~/components/tours/rebranding-tour';
import { GUIDE_NAMES } from '.~/constants';

jest.mock( '@woocommerce/settings', () => {
Expand Down Expand Up @@ -137,4 +142,36 @@ describe( 'Dashboard', () => {
).not.toBeInTheDocument();
} );
} );

describe( 'Rebranding Tour', () => {
beforeAll( () => {
getQuery.mockImplementation( () => {
return {};
} );
} );

afterAll( () => {
getQuery.mockReset();
} );

test( 'Not rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return null;
} );

render( <Dashboard /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).not.toBeInTheDocument();
} );

test( 'Rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return <div role="dialog" aria-label="tour" />;
} );

render( <Dashboard /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).toBeInTheDocument();
} );
} );
} );
2 changes: 1 addition & 1 deletion js/src/get-started-page/benefits-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const BenefitsCard = () => {
<img
src={ benefitsImageURL }
alt={ __(
'Google Listings & Ads Benefits',
'Google for WooCommerce Benefits',
'google-listings-and-ads'
) }
width="100%"
Expand Down
4 changes: 2 additions & 2 deletions js/src/get-started-page/faqs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const faqItems = [
answer: (
<p>
{ __(
'The Google Listings and Ads plugin allows you to upload your store and product data to Google. Your products will sync automatically to make relevant information available for free listings, Google Ads, and other Google services. You can create a new Merchant Center account or link an existing account to connect your store and list products across Google.',
'The Google for WooCommerce plugin allows you to upload your store and product data to Google. Your products will sync automatically to make relevant information available for free listings, Google Ads, and other Google services. You can create a new Merchant Center account or link an existing account to connect your store and list products across Google.',
'google-listings-and-ads'
) }
</p>
Expand Down Expand Up @@ -220,7 +220,7 @@ const faqItems = [
<>
<p>
{ __(
'Create a new Google Ads account through Google Listings & Ads and a promotional code will be automatically applied to your account. You’ll have 60 days to spend $500 to qualify for the $500 ads credit.',
'Create a new Google Ads account through Google for WooCommerce and a promotional code will be automatically applied to your account. You’ll have 60 days to spend $500 to qualify for the $500 ads credit.',
'google-listings-and-ads'
) }
</p>
Expand Down
2 changes: 1 addition & 1 deletion js/src/get-started-page/features-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const FeaturesCard = () => {
variant="body"
>
{ __(
'With Google Listings & Ads, connect with the right shoppers at the right moment when they’re looking to buy products like yours.',
'With Google for WooCommerce, connect with the right shoppers at the right moment when they’re looking to buy products like yours.',
'google-listings-and-ads'
) }
</Text>
Expand Down
2 changes: 1 addition & 1 deletion js/src/get-started-page/get-started-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const GetStartedCard = () => {
className="gla-get-started-card__title"
>
{ __(
'Get your products in front of more shoppers with Google Listings & Ads',
'Get your products in front of more shoppers with Google for WooCommerce',
'google-listings-and-ads'
) }
</Text>
Expand Down
4 changes: 2 additions & 2 deletions js/src/get-started-page/unsupported-notices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const UnsupportedLanguage = () => {
>
{ createInterpolateElement(
__(
'Your site language is <language />. This language is currently not supported by Google Listings & Ads. <settingsLink>You can change your site language here</settingsLink>. <supportedLanguagesLink>Read more about supported languages</supportedLanguagesLink>',
'Your site language is <language />. This language is currently not supported by Google for WooCommerce. <settingsLink>You can change your site language here</settingsLink>. <supportedLanguagesLink>Read more about supported languages</supportedLanguagesLink>',
'google-listings-and-ads'
),
{
Expand Down Expand Up @@ -85,7 +85,7 @@ const UnsupportedCountry = () => {
>
{ createInterpolateElement(
__(
'Your store’s country is <country />. This country is currently not supported by Google Listings & Ads. However, you can still choose to list your products in another supported country, if you are able to sell your products to customers there. <settingsLink>Change your store’s country here</settingsLink>. <supportedCountriesLink>Read more about supported countries</supportedCountriesLink>',
'Your store’s country is <country />. This country is currently not supported by Google for WooCommerce. However, you can still choose to list your products in another supported country, if you are able to sell your products to customers there. <settingsLink>Change your store’s country here</settingsLink>. <supportedCountriesLink>Read more about supported countries</supportedCountriesLink>',
'google-listings-and-ads'
),
{
Expand Down
2 changes: 1 addition & 1 deletion js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ addFilter(
}

initialBreadcrumbs.push(
__( 'Google Listings & Ads', 'google-listings-and-ads' )
__( 'Google for WooCommerce', 'google-listings-and-ads' )
);

const pluginAdminPages = [
Expand Down
Loading

0 comments on commit c3f4679

Please sign in to comment.