-
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
Add minimum budget limit #2583
Add minimum budget limit #2583
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/2459-campaign-creation-flow #2583 +/- ##
=====================================================================
+ Coverage 62.6% 63.1% +0.5%
=====================================================================
Files 329 329
Lines 5166 5183 +17
Branches 1254 1262 +8
=====================================================================
+ Hits 3232 3268 +36
+ Misses 1752 1735 -17
+ Partials 182 180 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@asvinb We need a styling update to the error message shown when a minimum limit is shown to the user. The input box also needs to be updated when in that invalid input state. Can you please take a look? Thanks! |
@joemcgill As part of this work, I extracted the getHighestBudget into a utility.
|
Thanks @dsawardekar. Re:
Let's not update the Paid Ads flow at this time. It should end up getting handled as part of #2535. |
…dd-minimum-budget-limit
@joemcgill This is ready for code review. Note that I needed to create a new mock helper for the budget recommendation, let me know if that needs to be refactored. |
…dd-minimum-budget-limit
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.
@dsawardekar I left some comments on the PR. Can you kindly check please and let me know what you think?
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
@asvinb I've updated the PR per the feedback. Can you take another look? thanks! |
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.
@dsawardekar Thanks for the updates. I think it's very close to approval. Can you check my latest comments please? Thanks!
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.
@asvinb I have one small tweak for this that I'd like to make, but am pre-approving and this can go to QA.
Before starting a new round of code reviews, could you help me clarify the two questions in #2583 (comment)? Using the current 78fc8bb revision and replacing:
with: const minAmount = Math.ceil( dailyBudget * BUDGET_MIN_PERCENT ); Apart from using the greater than wording, It works pretty well and fulfills the rest requirements without the semantic inaccuracies in the error message. Kapture.2024-10-04.at.18.58.34.mp4I have read all the relevant discussions in the PR. However, taking the decimals into account when calculating the minimum budget value still confuses me. |
Hello @eason9487 |
I agree and using "at least" is totally appropriate here and more accurate than the original requirements that I had written for the issue. |
Hi @asvinb
This question should not be related to the word "rounding" and it's not the cause of the confusion. I used
Yes, and the current implementation has already rephrased to |
@eason9487 If we use |
Consider this PR is based on the |
…imum-budget-limit-merged
…date/2459-add-minimum-budget-limit-merged
…imum-budget-limit
…dd-minimum-budget-limit
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 for the work. LGTM.
Changes proposed in this Pull Request:
Closes #2503
This PR updates the campaign flow to include validation of minimum daily limits. An error message is shown if the amount is less than the daily limit.
Screenshots:
With an insufficient amount:
With a sufficient amount:
Detailed test instructions:
Additional details:
Update - Enforce the daily limit of 30% in setup your budget section
Changelog entry