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

Conversation

kt-12
Copy link
Collaborator

@kt-12 kt-12 commented Sep 4, 2024

Changes proposed in this Pull Request:

Closes #2536 .

Billing setup page should be removed and also Launch Paid Campaign should be possible from second step.

Screenshots:

Detailed test instructions:

  1. delete any residual DELETE FROM `wp_options` WHERE `option_name` = 'gla_ads_setup_completed_at';
  2. Click on Add paid campaign
    Screenshot 2024-09-04 at 17 55 11
  3. Click on continue on Set up your accounts page
    Screenshot 2024-09-04 at 17 55 23
  4. You should be able to see disabled Launch Paid Campaign button which enables on adding Daily Average Cost
    Screenshot 2024-09-04 at 17-56-39 Setup Google Ads ‹ Google for WooCommerce ‹ Marketing ‹ WooCommerce ‹ google-woo — WooCommerce

Additional details:

Changelog entry

Update - Remove the billing setup step from the paid campaign setup flow.

@kt-12 kt-12 marked this pull request as draft September 4, 2024 12:34
@kt-12 kt-12 changed the base branch from develop to feature/2460-simplify-paid-ads-setup September 4, 2024 12:39
@kt-12 kt-12 marked this pull request as ready for review September 4, 2024 17:06
@kt-12
Copy link
Collaborator Author

kt-12 commented Sep 4, 2024

@joemcgill Based on your comment on issue, I have not modified Jest tests here.

Copy link
Collaborator

@asvinb asvinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kt-12 Thanks for the PR! Works well. I suggested a couple of improvements though. Can you kindly let me know what you think?
Also, let's update the tracking comments here:

* @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' }`.

It should be:

 * @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'}`.

js/src/components/paid-ads/ads-campaign.js Outdated Show resolved Hide resolved
js/src/setup-ads/ads-stepper/index.js Outdated Show resolved Hide resolved
Comment on lines 92 to 95
submitButtonText={ __(
'Launch paid campaign',
'google-listings-and-ads'
) }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdsCampaign component is used in 2 flow. One setting up our first paid campaign flow (here). And another for the setting up other paid campaing.

Next is once the first campaign set up you see a button in the right hand side of dashboard- Add paid campaign ,
Screenshot 2024-09-06 at 18 01 35

once you click that you see a different flow where AdsCampaign is the first component in the flow.

Screenshot 2024-09-06 at 18-05-51 Dashboard ‹ Google for WooCommerce ‹ Marketing ‹ WooCommerce ‹ google-woo — WooCommerce

submitButtonText was introduced to make change to button text in a way it doesn't effect the other flow.

@joemcgill

Copy link
Collaborator

@asvinb asvinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kt-12 Can you kindly check my comment about the default value for the submitButtonText parameter please?

js/src/components/paid-ads/ads-campaign.js Outdated Show resolved Hide resolved
@kt-12
Copy link
Collaborator Author

kt-12 commented Sep 11, 2024

@kt-12 Can you kindly check my comment about the default value for the submitButtonText parameter please?

Done. I have addressed other open review comments too.

Copy link
Collaborator

@asvinb asvinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kt-12 I left some more comments. Can you check them out please?
Also why we have this error message for the PR?
Check failure on line 90 in js/src/setup-ads/ads-stepper/index.test.js

js/src/components/paid-ads/ads-campaign.js Outdated Show resolved Hide resolved
js/src/setup-ads/ads-stepper/index.js Show resolved Hide resolved
@asvinb
Copy link
Collaborator

asvinb commented Sep 13, 2024

@kt-12 Can you please fix the linting and unit tests errors please?

@kt-12
Copy link
Collaborator Author

kt-12 commented Sep 13, 2024

@kt-12 Can you please fix the linting and unit tests errors please.

Unit test changes are not handled in this ticket. It is handled in a separate ticket 2579, which merges 2534, 2536 and 2535

kt-12 and others added 2 commits September 13, 2024 20:40
Co-authored-by: Asvin Balloo <asvin.balloo@gmail.com>
@joemcgill
Copy link
Collaborator

I'm updating this PR to point to the new consolidated feature branch feature/2459-campaign-creation-flow. We'll need to resolve the merge conflicts and then send it back for review.

@joemcgill
Copy link
Collaborator

@eason9487 besides the changes requested for the continue button, I think this is ready for another look.

@kt-12
Copy link
Collaborator Author

kt-12 commented Oct 2, 2024

@eason9487 #2577 (comment)

Thank you, you were correct. awating after button is clicked did solve waiting indefinitely issue. I have also removed the newly introduced function.

@kt-12
Copy link
Collaborator Author

kt-12 commented Oct 2, 2024

@eason9487 we have addressed your review comments and also moved continue button out of AdsCampaign. Moving it back to you for CR.

@@ -57,6 +57,10 @@ const AdsStepper = ( { formProps } ) => {
continueStep( '2' );
};

// @todo: Add check for billing status once billing setup is moved to step 2.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking billing status cannot be done here, it must instead be done after an Ads account is connected in Step 1. The billing status check will be handled in AdsCampaign after #2535 is completed, so we can ignore this check for now.

@joemcgill
Copy link
Collaborator

@eason9487 I've added a todo concerning the need to check for billing status, which should be handled after #2623 is updated, since the new consolidated form will be responsible for checking the billing status.

js/src/components/paid-ads/continue-button.js Outdated Show resolved Hide resolved
js/src/components/paid-ads/continue-button.js Outdated Show resolved Hide resolved
js/src/components/paid-ads/continue-button.js Outdated Show resolved Hide resolved
@kt-12
Copy link
Collaborator Author

kt-12 commented Oct 10, 2024

@eason9487 I have addressed your review changes. Moved it back to you for CR.

js/src/components/paid-ads/continue-button.js Outdated Show resolved Hide resolved
js/src/pages/create-paid-ads-campaign/index.js Outdated Show resolved Hide resolved
js/src/pages/edit-paid-ads-campaign/index.js Outdated Show resolved Hide resolved
@joemcgill joemcgill merged commit d6ed5cf into feature/2459-campaign-creation-flow Oct 10, 2024
4 of 5 checks passed
@joemcgill joemcgill deleted the feature/2536-remove-billing branch October 10, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: update Big changes to something that wasn't broken.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the billing setup page from the Ads setup flow
5 participants