-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2650 from woocommerce/feature/2538-performance-ca…
…rd-sep Show Ads value prop in Paid Campaign performance card
- Loading branch information
Showing
17 changed files
with
401 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
svg { | ||
flex: 0 0 auto; | ||
fill: #007017; | ||
fill: $gla-color-green; | ||
} | ||
|
||
&__title { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 2 additions & 33 deletions
35
js/src/dashboard/summary-section/paid-campaign-promotion-card.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
js/src/dashboard/summary-section/paid-features/free-ad-credit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import GridiconGift from 'gridicons/dist/gift'; | ||
import { createInterpolateElement } from '@wordpress/element'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import AppDocumentationLink from '.~/components/app-documentation-link'; | ||
|
||
/** | ||
* Render the Free Ads Credit inside the Paid Features component. | ||
* | ||
* @fires gla_documentation_link_click with `{ context: 'dashboard', link_id: 'free-ad-credit-terms', href: 'https://www.google.com/ads/coupons/terms/' }` | ||
* @return {JSX.Element} Free Ads Credit component. | ||
*/ | ||
const FreeAdCredit = () => { | ||
return ( | ||
<div className="gla-free-ad-credit-claim"> | ||
<GridiconGift /> | ||
<div> | ||
{ createInterpolateElement( | ||
__( | ||
'Claim $500 in ads credit when you spend your first $500 with Google Ads. <termLink>Terms and conditions apply</termLink>.', | ||
'google-listings-and-ads' | ||
), | ||
{ | ||
termLink: ( | ||
<AppDocumentationLink | ||
context="dashboard" | ||
linkId="free-ad-credit-terms" | ||
href="https://www.google.com/ads/coupons/terms/" | ||
/> | ||
), | ||
} | ||
) } | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FreeAdCredit; |
101 changes: 101 additions & 0 deletions
101
js/src/dashboard/summary-section/paid-features/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import { createInterpolateElement } from '@wordpress/element'; | ||
import { Flex, FlexBlock, FlexItem } from '@wordpress/components'; | ||
import GridiconCheckmark from 'gridicons/dist/checkmark'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { ContentLink } from '.~/components/guide-page-content'; | ||
import CampaignPreview from '.~/components/paid-ads/campaign-preview'; | ||
import AddPaidCampaignButton from '.~/components/paid-ads/add-paid-campaign-button'; | ||
import FreeAdCredit from './free-ad-credit'; | ||
import VerticalGapLayout from '.~/components/vertical-gap-layout'; | ||
import './index.scss'; | ||
|
||
function FeatureList() { | ||
const featuresItems = [ | ||
{ | ||
Icon: GridiconCheckmark, | ||
content: __( | ||
'Reach more customer by advertising your products across Google Ads channels like Search, YouTube and Discover.', | ||
'google-listings-and-ads' | ||
), | ||
}, | ||
{ | ||
Icon: GridiconCheckmark, | ||
content: __( | ||
'Set a daily budget and only pay when people click on your ads.', | ||
'google-listings-and-ads' | ||
), | ||
}, | ||
{ | ||
Icon: GridiconCheckmark, | ||
content: createInterpolateElement( | ||
__( | ||
"Performance Max uses the best of Google's AI to show the most impactful ads for your products at the right time and place. <link>Learn more about Performance Max technology.</link>", | ||
'google-listings-and-ads' | ||
), | ||
{ | ||
link: ( | ||
<ContentLink | ||
href="https://support.google.com/google-ads/answer/10724817" | ||
context="campaign-creation-performance-max" | ||
/> | ||
), | ||
} | ||
), | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className="gla-paid-features__feature-list"> | ||
{ featuresItems.map( ( { Icon, content }, idx ) => ( | ||
<Flex key={ idx } align="flex-start"> | ||
<Icon size="18" /> | ||
<FlexBlock>{ content }</FlexBlock> | ||
</Flex> | ||
) ) } | ||
</div> | ||
); | ||
} | ||
|
||
/** | ||
* Returns a component with paid features content. | ||
* | ||
* @return {JSX.Element} Paid Features component. | ||
*/ | ||
const PaidFeatures = () => { | ||
return ( | ||
<VerticalGapLayout size="medium" className="gla-paid-features"> | ||
<Flex | ||
align="center" | ||
gap={ 9 } | ||
className="gla-paid-features__content" | ||
> | ||
<FlexItem> | ||
<CampaignPreview /> | ||
</FlexItem> | ||
<FlexBlock> | ||
<FeatureList /> | ||
</FlexBlock> | ||
</Flex> | ||
<FreeAdCredit /> | ||
<AddPaidCampaignButton | ||
isPrimary | ||
isSecondary={ false } | ||
isSmall={ false } | ||
eventProps={ { | ||
context: 'add-paid-campaign-promotion', | ||
} } | ||
> | ||
{ __( 'Create Campaign', 'google-listings-and-ads' ) } | ||
</AddPaidCampaignButton> | ||
</VerticalGapLayout> | ||
); | ||
}; | ||
|
||
export default PaidFeatures; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.gla-paid-features { | ||
|
||
&__content { | ||
flex-direction: column; | ||
|
||
@media (min-width: $break-small) { | ||
align-items: flex-start; | ||
flex-direction: row; | ||
gap: $grid-unit-20; | ||
} | ||
} | ||
|
||
&__feature-list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: $grid-unit-20; | ||
line-height: $gla-line-height-smaller; | ||
color: $gray-800; | ||
text-align: left; | ||
|
||
.gridicon { | ||
fill: $alert-green; | ||
} | ||
} | ||
|
||
.gla-free-ad-credit-claim { | ||
text-align: left; | ||
background-color: $white; | ||
display: flex; | ||
align-items: flex-start; | ||
gap: $grid-unit; | ||
padding: $grid-unit-20 $grid-unit-15; | ||
color: $gray-900; | ||
|
||
.gridicon { | ||
fill: $gla-color-green; | ||
flex: 0 0 auto; | ||
} | ||
} | ||
|
||
.components-button { | ||
align-self: flex-end; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.