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

2504: Add skip paid ads confirmation modal. #2563

Merged

Conversation

asvinb
Copy link
Collaborator

@asvinb asvinb commented Aug 23, 2024

Changes proposed in this Pull Request:

Closes #2504

Replace this with a good description of your changes & reasoning.

Screenshots:

image

Detailed test instructions:

  1. Go through the onboarding flow.
  2. On the fourth step, click on the "Skip this step for now" button.
  3. There should be a modal asking the user to confirm if they want to skip.
  4. If the user clicks "Yes", the onboarding flow continues and the user is redirected to the dashboard.
  5. If the user clicks "No", the modal is no longer displayed and the user stays on the page.

Additional details:

Changelog entry

Add - Confirmation modal when user skips without creating a campaign during onboarding.

@asvinb asvinb requested a review from joemcgill August 23, 2024 13:34
@github-actions github-actions bot added type: enhancement The issue is a request for an enhancement. changelog: add A new feature, function, or functionality was added. labels Aug 23, 2024
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.8%. Comparing base (315fce2) to head (5ec87d6).
Report is 11 commits behind head on feature/2459-campaign-creation-flow.

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                            @@
##             feature/2459-campaign-creation-flow   #2563      +/-   ##
========================================================================
- Coverage                                   65.0%   63.8%    -1.2%     
========================================================================
  Files                                        475     326     -149     
  Lines                                      17900    5089   -12811     
  Branches                                       0    1232    +1232     
========================================================================
- Hits                                       11640    3247    -8393     
+ Misses                                      6260    1674    -4586     
- Partials                                       0     168     +168     
Flag Coverage Δ
js-unit-tests 63.8% <ø> (?)
php-unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 801 files with indirect coverage changes

? finishOnboardingSetup
: handleShowSkipPaidAdsConfirmationModal
}
// TODO: might want to review eventName and eventProps
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@joemcgill Shall we keep those props as is?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good question. I think we'll want to move that eventName to the new "Complete setup" button in the AYS modal, but the event name for this will likely need an update. Leave the TODO: comment for now and we can address that before the feature is merged.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

* Triggered when the skip button is clicked
* // TODO: to review
*
* @event gla_skip_paid_ads_modal_confirm_button_click
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@joemcgill The event name TBC.

<AppButton
key="yes"
// TODO: confirm the eventName
eventName="gla_skip_paid_ads_modal_confirm_button_click"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@joemcgill If you can confirm please :)

Link: (
<AppDocumentationLink
href="https://support.google.com/google-ads/answer/10724817"
// TODO: review context and linkId values
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@joemcgill Same here.

@joemcgill joemcgill linked an issue Aug 26, 2024 that may be closed by this pull request
12 tasks
Copy link
Collaborator

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

The functionality is working correctly when the "Skip..." button you've targeted is clicked, but this needs to be updated so this applies to all "Skip" buttons. Left feedback inline.

Comment on lines 166 to 168
showPaidAdsSetup
? finishOnboardingSetup
: handleShowSkipPaidAdsConfirmationModal
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, it looks like there was confusion here. We're removing the initial "Skip this step for now" button from the PaidAdsFeaturesSection in #2500. This AYS modal should apply to any skip button (although there will only be the "Skip paid ads creation" button once that PR is merged).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 I've added TODOs to review the code once #2500 has been merged.

? finishOnboardingSetup
: handleShowSkipPaidAdsConfirmationModal
}
// TODO: might want to review eventName and eventProps
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good question. I think we'll want to move that eventName to the new "Complete setup" button in the AYS modal, but the event name for this will likely need an update. Leave the TODO: comment for now and we can address that before the feature is merged.

title={ __( 'Skip setting up ads?', 'google-listings-and-ads' ) }
buttons={ [
<AppButton key="no" isSecondary onClick={ onRequestClose }>
{ __( 'No', 'google-listings-and-ads' ) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reference the Modal Content in the issue description, these buttons should "Cancel" and "Complete setup". I've updated the A/C to make that more clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

@joemcgill joemcgill removed a link to an issue Aug 27, 2024
12 tasks
Copy link
Collaborator

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

This looks like it's working well. I'm not 100% confident in the way events need to be recorded, so we can confirm with @eason9487 and either update this PR after his review or spin up a follow-up issue to update all event tracking code for #2459.

@ankitguptaindia
Copy link
Member

Suggested some QA feedback on the connected issue here: #2504 (comment)

Next Step:
Moving PR to in-progress for feedback.

@joemcgill
Copy link
Collaborator

Thanks @ankitguptaindia I've left a response to your feedback in #2504 (comment). @asvinb Can you make the suggested text change to the modal button?

@asvinb
Copy link
Collaborator Author

asvinb commented Sep 2, 2024

Sure thing @joemcgill . Label updated @ankitguptaindia . Can you kindly check?

@ankitguptaindia
Copy link
Member

QA/Test Report-

Testing Environment -

  • WordPress: 6.6.1
  • Theme active on store: Twenty Twenty-Four Version: 1.2
  • WooCommerce - Version 9.2.3
  • PHP: 8.3
  • Web Server: Nginx
  • Browser: Chrome - Version 127
  • OS: macOS Sonoma 14.6.1

Test Results - The changes have been implemented as described. A confirmation modal will appear when the user clicks on ski ads. If the user clicks 'Cancel,' they remain on the same page. If the user clicks 'Complete setup without setting up ads,' the onboarding flow continues.

Functional Demo / Screencast -

Recording.811.mp4

Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the work.

Left some suggestions about reducing the complexity. Besides, the e2e testing couldn't pass - https://github.com/woocommerce/google-listings-and-ads/actions/runs/10697346716/job/29654336938

@asvinb
Copy link
Collaborator Author

asvinb commented Sep 4, 2024

Thanks for the review @eason9487 . I fixed the failing E2E test which was after we changed the button label in the modal. Should be ok now:
https://github.com/woocommerce/google-listings-and-ads/actions/runs/10704832892

Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for reducing the complexity. LGTM.

Left a few minor things to be tweaked and I believe it should not need another round of code reviews after adjusting them.

@macka61 macka61 assigned asvinb and unassigned asvinb Sep 5, 2024
@asvinb
Copy link
Collaborator Author

asvinb commented Sep 5, 2024

@eason9487 PR has been updated and ready for your final 👍

Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

LGTM

@joemcgill joemcgill merged commit 057ff88 into feature/2459-campaign-creation-flow Sep 9, 2024
8 checks passed
@joemcgill joemcgill deleted the add/2504-skip-confirmation-modal branch September 9, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Campaign Creation: Add confirmation modal when user skips without creating a campaign
4 participants