-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update Budget Setup Card. #2552
base: update/2535-consolidate-ad-creation-ccf-merged
Are you sure you want to change the base?
Update Budget Setup Card. #2552
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## update/2535-consolidate-ad-creation-ccf-merged #2552 +/- ##
================================================================================
- Coverage 61.0% 60.7% -0.3%
================================================================================
Files 330 331 +1
Lines 5183 5211 +28
Branches 1254 1264 +10
================================================================================
+ Hits 3162 3165 +3
- Misses 1832 1852 +20
- Partials 189 194 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good, but issues I've noted a few issues where this could be improved.
@@ -266,16 +284,11 @@ test.describe( 'Complete your campaign', () => { | |||
textContent | |||
); | |||
|
|||
const responsePromise = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we no longer need to wait for this response after the country setting is changed? It looks like when the country values change, the text that reads "Tip: Most merchants targeting similar countries set a daily budget of %d USD" does change, so we should probably ensure that is still being tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joemcgill This is no longer require because we are fulfilling the budget recommendation here, so we no longer have to wait to capture the budget recommendation response.
Those assertions will still be tested with the new fulfilment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox I'm still unsure why we need to remove this. Could you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joemcgill Sorry for missing this one.
Initially when we were removing country from (or updating anything in Select country/s
textbox), a request to budget recommendation endpoint was triggered which we were awaiting to get fulfilled in setupBudgetPage.registerBudgetRecommendationResponse()
Now, as per our new implementation, that request will no longer trigger because we are using the countries that have been selected in step 2 which acts as a superset for step 4 data.
Please let me know if this helps or in case of any other query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox Can you check @joemcgill 's comment please? Not sure about this one.
js/src/components/paid-ads/budget-section/budget-recommendation/index.js
Outdated
Show resolved
Hide resolved
Thank you @joemcgill for your feedback. I've addressed your comments and responded to one of your comments related to removing the response promise here. Please let me know if there's anything else you want me to look into. Over to you for another round of review. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox I'm still seeing some unexpected behavior with these changes. If you go back to a previous step after after the budget recommendations have been displayed and then return to the last step, the budget recommendations are no longer showing. I've added a video to show what I'm seeing. Can you give this another look?
budget-card.mov
Could you also provide more context for this question about the e2e test changes?
@joemcgill The issue was happening because There was also an issue of amount getting changed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ankitrox. This looks like it's working better now. I still have a question about one of the E2E changes that you made, which would be good to clarify, but I'm going to approve and send to @ankitguptaindia for QA.
@@ -266,16 +284,11 @@ test.describe( 'Complete your campaign', () => { | |||
textContent | |||
); | |||
|
|||
const responsePromise = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox I'm still unsure why we need to remove this. Could you clarify?
Hi @joemcgill Apologies for missing the comment previously. I have responded to the query here |
QA/Test Report- ✅Testing Environment -
Test Results - Changes are working as expected. tested all related test scenarios and all are working well. Functional Demo / Screencast - Recording.812.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions, questions, and issues that need to be resolved.
In addition, if I understand correctly, post-onboarding can still select audience countries when creating a campaign via the /wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard&subpath=%2Fcampaigns%2Fcreate
path.
However, there are now two issues with this page:
- The recommended budget block is not shown
- There is no API triggered to get the recommended budget after changing the audience countries.
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
js/src/components/paid-ads/budget-section/budget-recommendation/index.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox I left some more comments. Can you kindly let me know about the suggested approach about setting the default value for amount via the initialValues
prop of CampaignAssetsForm
.
Also you need to check when there's no recommended budget to not display the recommendation. This is what I can see on my side while testing:
js/src/components/paid-ads/budget-section/budget-recommendation/index.js
Outdated
Show resolved
Hide resolved
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
@asvinb I've created the new hook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitrox I left some more comments. Can you check them out please?
Most importantly I think we can reduce a lot of the complexity around countryCodes
. Right now, we need to fetch the budget recommendation data once the country code changes and the country codes are tied to the form. In #2535 we are planning to remove countryCodes
altogether, instead relying on the country codes from useTargetAudienceFinalCountryCodes
. Here is what I suggest:
- Remove the Audience field everywhere in the current PR (as opposed to removing them in Consolidate the ad creation step in the Ads Setup flow with the one used in Onboarding #2535)
- Have the
initialValues
forCampaignAssetsForm
components set with the recommended budget or data from local storage.
The useBudgetRecommendationData
won't need to accept any parameters since it can get the list of targeted countries via the useTargetAudienceFinalCountryCodes
What do you think @joemcgill ?
js/src/setup-mc/setup-stepper/setup-paid-ads/paid-ads-setup-sections.js
Outdated
Show resolved
Hide resolved
…date/2502-budget-setup-card
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change, but otherwise it looks good. I see some additional feedback from @asvin's CR which look like they haven't been resolved. Can we close the loop on those?
…rd-updates Budget setup card updates after merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asvinb and @ankitrox I've tested these changes after reviewing and merging in the updates resolving the conflicts after #2535 was integrated into this branch. This is looking pretty good to me, but wanted you both to have a chance to have another look and resolve any remaining conversations before sending back for another QA pass.
Thanks @joemcgill . @ankitguptaindia Can you please QA? thanks! |
QA Status: Need feedback/remidiation
|
@ankitguptaindia Nice catch for #1. I just pushed an updated. Can you kindly check? |
Staus of issues reported here in #2552 (comment)
When creating a campaign from the dashboard, if the user inputs a value higher than the required amount (e.g., if the required value is 17 and the user enters 200) and navigates back to the first screen, the budget is automatically reduced to 17. However, when creating a campaign from the onboarding flow and following the same steps, the budget is not reduced to 17, meaning the system doesn’t enforce the minimum value. Can we apply the same logic to both places?
Campaign Creation from Dashboard screen: Recording.898.mp4Campaign Creation from the Onboarding screen: Recording.899.mp4 |
Changes proposed in this Pull Request:
Closes #2502 .
Replace this with a good description of your changes & reasoning.
Screenshots:
Detailed test instructions:
Daily average cost
input will have the pre-populated value with highest budget in the recommended budgets. For example:Additional details:
Changelog entry