Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the billing setup page from the Ads setup flow #2577

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
40ea4eb
remove ads campaign steps
kt-12 Sep 4, 2024
8a9a10a
cs fixes
kt-12 Sep 4, 2024
94c8208
e2e support
kt-12 Sep 4, 2024
39a2090
cs fixes
kt-12 Sep 4, 2024
09871a5
cs fixes
kt-12 Sep 4, 2024
5b14c07
fix cs issue
kt-12 Sep 4, 2024
9728b03
address review comments and also add submitbuttontext
kt-12 Sep 7, 2024
f06b5d2
fix doc block
kt-12 Sep 7, 2024
3409919
cs fixes
kt-12 Sep 7, 2024
0c74f98
cs fixes
kt-12 Sep 9, 2024
779eac3
sert default submitButtonText
kt-12 Sep 11, 2024
ef31827
update doc block and remove unused files
kt-12 Sep 13, 2024
e7afe1e
Update tests/e2e/specs/add-paid-campaigns/add-paid-campaigns.test.js
kt-12 Sep 13, 2024
daa483a
fix e2e
kt-12 Sep 13, 2024
71c81ec
Merge branch 'feature/2536-remove-billing' of https://github.com/wooc…
kt-12 Sep 13, 2024
b5a2467
Update js/src/components/paid-ads/ads-campaign.js
kt-12 Sep 13, 2024
0ca45f1
clear jest files
kt-12 Sep 17, 2024
98cd72d
Update js/src/components/paid-ads/ads-campaign.js
kt-12 Sep 17, 2024
52ca19d
conditional enabling continue button
kt-12 Sep 19, 2024
b8178b4
remove file
kt-12 Sep 19, 2024
c5be7e0
update disabled button logic
kt-12 Sep 19, 2024
1833363
only to check in setup-ads context
kt-12 Sep 19, 2024
d053b77
fix billing e2e
kt-12 Sep 26, 2024
c8ee77f
ads campaign request
kt-12 Sep 26, 2024
1b31ca9
change mock
kt-12 Sep 27, 2024
e7da33a
move billing page to bottom
kt-12 Sep 27, 2024
a6d79a0
create a new mock for campaign creation.
kt-12 Sep 27, 2024
7edeb3b
Merge branch 'feature/2536-remove-billing' of https://github.com/wooc…
kt-12 Sep 27, 2024
4ff5165
move budget to top.
kt-12 Sep 27, 2024
b90f77c
e2e cr fixes
kt-12 Sep 30, 2024
0c6d250
remove title button component
kt-12 Sep 30, 2024
fdd3aae
Merge branch 'feature/2459-campaign-creation-flow' into feature/2536-…
joemcgill Sep 30, 2024
104b368
remove accidently functions
kt-12 Oct 1, 2024
2c84851
remove newly introduced function
kt-12 Oct 2, 2024
fe7bab6
Add ContinueButton component.
asvinb Oct 2, 2024
659f560
seperate continue button
kt-12 Oct 8, 2024
836d1a6
continue button component
kt-12 Oct 8, 2024
fdfedba
fix continue button logic on edit and create page
kt-12 Oct 8, 2024
88ba4e8
fix continue button
kt-12 Oct 8, 2024
c82396b
change text
kt-12 Oct 8, 2024
ed886d8
Omit the billing status check for now
joemcgill Oct 8, 2024
cfd7879
Add inline note about the need to update for billing
joemcgill Oct 8, 2024
2564a42
fix review feedback
kt-12 Oct 10, 2024
dc716ec
change prop name
kt-12 Oct 10, 2024
6b85d4d
handleContinueClick to onClick and return type
kt-12 Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions js/src/components/paid-ads/ads-campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,23 @@ import FaqsSection from './faqs-section';
/**
* Renders the container of the form content for campaign management.
*
* Please note that this component relies on an CampaignAssetsForm's context and custom adapter,
* so it expects a `CampaignAssetsForm` to existing in its parents.
* Please note that this component relies on a CampaignAssetsForm's context and custom adapter,
* so it expects a `CampaignAssetsForm` to exist in its parents.
*
* @fires gla_documentation_link_click with `{ context: 'create-ads' | 'edit-ads' | 'setup-ads', link_id: 'see-what-ads-look-like', href: 'https://support.google.com/google-ads/answer/6275294' }`
*
* @param {Object} props React props.
* @param {Campaign} [props.campaign] Campaign data to be edited. If not provided, this component will show campaign creation UI.
* @param {() => void} props.onContinue Callback called once continue button is clicked.
* @param {() => boolean} props.isLoading Callback called once continue button is clicked.
kt-12 marked this conversation as resolved.
Show resolved Hide resolved
* @param {string} props.submitButtonText Text to display on submit button.
kt-12 marked this conversation as resolved.
Show resolved Hide resolved
* @param {'create-ads'|'edit-ads'|'setup-ads'} props.trackingContext A context indicating which page this component is used on. This will be the value of `context` in the track event properties.
*/
export default function AdsCampaign( {
campaign,
onContinue,
isLoading,
submitButtonText = __( 'Continue', 'google-listings-and-ads' ),
trackingContext,
} ) {
const isCreation = ! campaign;
Expand Down Expand Up @@ -102,9 +106,10 @@ export default function AdsCampaign( {
<AppButton
isPrimary
disabled={ ! isValidForm }
loading={ isLoading }
onClick={ onContinue }
>
{ __( 'Continue', 'google-listings-and-ads' ) }
{ submitButtonText }
</AppButton>
</StepContentFooter>
</StepContent>
Expand Down
22 changes: 8 additions & 14 deletions js/src/setup-ads/ads-stepper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useState } from '@wordpress/element';
*/
import SetupAccounts from './setup-accounts';
import AdsCampaign from '.~/components/paid-ads/ads-campaign';
import SetupBilling from './setup-billing';
asvinb marked this conversation as resolved.
Show resolved Hide resolved
import useEventPropertiesFilter from '.~/hooks/useEventPropertiesFilter';
import {
recordStepperChangeEvent,
Expand All @@ -22,8 +21,8 @@ import {
/**
* @param {Object} props React props
* @param {Object} props.formProps Form props forwarded from `Form` component.
* @fires gla_setup_ads with `{ triggered_by: 'step1-continue-button' | 'step2-continue-button' , action: 'go-to-step2' | 'go-to-step3' }`.
* @fires gla_setup_ads with `{ triggered_by: 'stepper-step1-button' | 'stepper-step2-button', action: 'go-to-step1' | 'go-to-step2' }`.
* @fires gla_setup_ads with `{ triggered_by: 'step1-continue-button', action: 'go-to-step2' }`.
* @fires gla_setup_ads with `{ triggered_by: 'stepper-step1-button', action: 'go-to-step1'}`.
*/
const AdsStepper = ( { formProps } ) => {
const [ step, setStep ] = useState( '1' );
Expand Down Expand Up @@ -58,10 +57,6 @@ const AdsStepper = ( { formProps } ) => {
continueStep( '2' );
};

const handleCreateCampaignContinue = () => {
continueStep( '3' );
};

return (
// This Stepper with this class name
// should be refactored into separate shared component.
Expand Down Expand Up @@ -92,17 +87,16 @@ const AdsStepper = ( { formProps } ) => {
content: (
<AdsCampaign
trackingContext="setup-ads"
onContinue={ handleCreateCampaignContinue }
onContinue={ formProps.handleSubmit }
isLoading={ formProps.isSubmitting }
submitButtonText={ __(
'Launch paid campaign',
'google-listings-and-ads'
) }
/>
),
onClick: handleStepClick,
},
{
key: '3',
label: __( 'Set up billing', 'google-listings-and-ads' ),
content: <SetupBilling formProps={ formProps } />,
onClick: handleStepClick,
},
] }
/>
);
Expand Down

This file was deleted.

This file was deleted.

88 changes: 0 additions & 88 deletions js/src/setup-ads/ads-stepper/setup-billing/index.js

This file was deleted.

Loading
Loading