-
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
Open
dsawardekar
wants to merge
55
commits into
update/2535-consolidate-ad-creation-ccf-merged
Choose a base branch
from
update/2459-add-minimum-budget-limit
base: update/2535-consolidate-ad-creation-ccf-merged
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add minimum budget limit #2583
Changes from 29 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
f6c9f55
Updates validateCampaign with daily limit check
dsawardekar dbfb972
Adds validateCampaign tests
dsawardekar fb36ca6
Adds getHighestBudget utility
dsawardekar 41956ca
Adds daily limit data lookup to paid ads setup sections
dsawardekar 9ef16c2
Fixes linter warnings
dsawardekar 5741e6b
Style error message accordingly.
asvinb ac7753c
Merge branch 'feature/2459-campaign-creation-flow' into update/2459-a…
dsawardekar beb3700
Adds e2e tests
dsawardekar c7f5a36
Merge branch 'feature/2459-campaign-creation-flow' into update/2459-a…
dsawardekar 1d41c1b
Uses form opts instead of values
dsawardekar 585bbbd
Update countryCodes and validation callback
dsawardekar f35ac9d
Updates unit tests
dsawardekar 6804415
Fixes linter warnings
dsawardekar d62bc02
Do not pass uneeded props.
asvinb 603d9c4
Format currency for recommended budget.
asvinb f73150b
Update E2E test.
asvinb f1fd765
Fix E2E test.
asvinb 7adc092
Fix e2e test.
asvinb 90e8d95
Add useValidateCampaignWithCountryCodes hook.
asvinb 811461f
Fix unit test.
asvinb eb70d33
Do not trigger fetch if there are no countryCodes.
asvinb a502b7a
Add loading property to know when the hook is ready.
asvinb 34c58a9
Remove condition to display PaidAdsSetupSections.
asvinb 5d794ed
Merge branch 'feature/2459-campaign-creation-flow' into update/2459-a…
asvinb 4d80b45
Add getAdsBudgetRecommendations selector.
asvinb 44d9eed
Update hooks.
asvinb 29b6920
Add JSDocs.
asvinb a1a5cf4
More descriptive JSDocs.
asvinb a7a2eba
Fix linting errors.
asvinb 684fd02
Apply change.
asvinb 447bff0
Add JSdocs for returned value.
asvinb c85bdf1
Fix JS errors.
asvinb 74e0dd8
Fix e2e test.
asvinb 6fc4a6b
Address CR feedback.
asvinb 716581b
Add JSDocs.
asvinb 2c4f863
Simplify hooks.
asvinb 2d51b4a
Fix JS tests.
asvinb ab6a397
Rename function.
asvinb edccd57
Delete unused file.
asvinb 7f7261a
Review comments.
asvinb 330697c
Update minimum amount displayed to the user.
asvinb 0d8c6bd
Make sure country codes are loaded.
asvinb 5f2f291
Fix e2e test.
asvinb 03b1167
Take precision settings into consideration.
asvinb 7432760
Fix e2e tests.
asvinb f23a52c
Convert to float.
asvinb df07674
Merge branch 'feature/2459-campaign-creation-flow' into update/2459-a…
asvinb d1ed9cf
Merge branch 'update/2535-consolidate-ad-creation-ccf-merged' into up…
asvinb dfb1bc9
Fix bad merge.
asvinb c89ac46
Simplify code where countryCodes is needed.
asvinb 6d7a287
Remove unused props.
asvinb 3ff8276
Fix loaded value
asvinb 78fc8bb
Fix e2e test
asvinb 3fb0832
Use Math.ceil.
asvinb ce9ad99
Fix failing test.
asvinb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
...nents/paid-ads/budget-section/budget-recommendation/useFetchBudgetRecommendationEffect.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
CampaignAssetsForm
already has form data initialized byinitialCampaign.countryCodes
holding thecountryCodes
value. Adding anothercountryCodes
state to the form and listening to the form's updates to set its new state makes the overall state management more complex and confusing.In addition, the current implementation doesn't work correctly. For example, two problems can be seen in the following video:
Kapture.2024-09-24.at.13.54.39.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.
@eason9487 The main reason why I had a state variable for
countryCodes
is because we need to know when the selected countries are updated so that we can fetch the latest recommendations. I've changed the approach a bit by having the state variable within theuseValidateCampaignWithCountryCodes
where you can pass updated country codes via therefreshCountryCodes
function from the hook.