-
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
Onboarding: Create new ads account. #2651
Merged
joemcgill
merged 54 commits into
feature/2509-consolidate-google-account-cards
from
update/2603-create-ads-account
Nov 13, 2024
Merged
Changes from 51 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
5b64b6b
Create new ads account.
ankitrox fdccdfb
Fix: lint css.
ankitrox ab8984e
Merge branch 'update/2596-connect-ads-account' into update/2603-creat…
ankitrox d4e0142
Add css.
ankitrox 1584e33
Do not show card if account is in unclaimed status.
ankitrox a00d42c
Merge branch 'update/2596-connect-ads-account' into update/2603-creat…
ankitrox 54fdfc8
Add E2E tests.
ankitrox 3b25965
Fix: E2E issues.
ankitrox 86a174e
Resolve conflicts in E2E.
ankitrox e1fca96
Resolve conflicts.
ankitrox 073b04f
CR feedback.
ankitrox 863a71c
Resolve conflicts.
ankitrox e9a071b
Merge branch 'update/2596-connect-ads-account' into update/2603-creat…
ankitrox 3e2dcbe
Show correct text when creating an account.
asvinb db10842
Revert change.
asvinb 3e4249c
Prevent complete re rendering of the card.
asvinb 0c3f1c7
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb f31dcc4
Fix error.
asvinb 46aef1c
Fetch existing accounts again.
asvinb b93f3aa
Display updating text only when clicking the claim button.
asvinb d3dae92
Save WIP.
asvinb 9f335dd
Merge branch 'feature/2509-consolidate-google-account-cards' into upd…
asvinb 3c19aa9
Save WIP.
asvinb 90db787
UX improvements.
asvinb 797ea87
Review comments.
asvinb 74ff220
Use single quotes.
asvinb e6222de
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 2d9c2cf
Use correct class name.
asvinb 5638687
Improve 'Connect Google account' E2E tests
joemcgill 6bb4318
Update title and indicator label.
asvinb d46d6ca
Merge branch 'update/2603-create-ads-account' of github.com:woocommer…
asvinb 50e36fd
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 75c7827
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb fea64c6
Address CR feedback.
asvinb 92fb813
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 01f1097
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
joemcgill 5e81fba
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb fc6214d
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb b89142d
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 4fd8997
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 24a9c4f
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb bccac35
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 35580cb
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb 3044904
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
asvinb d82c8d8
Address CR feedback.
asvinb 4be14db
Fix ConnectAds props
joemcgill ab319c7
Fix E2E tests
joemcgill a05eb38
Merge branch 'update/2582-claim-ads-account' into update/2603-create-…
joemcgill d074504
Limit Ads claim updates to 3 retries
joemcgill 51718c2
Inline docs updates
joemcgill 3492fa5
Docblock fix
joemcgill 54448e3
Update JSDoc.
asvinb 55cbeb9
Merge branch 'feature/2509-consolidate-google-account-cards' into upd…
joemcgill f2aa1c9
E2E: Remove flaky mocks from auto account creation test
joemcgill 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
69 changes: 69 additions & 0 deletions
69
js/src/components/google-combo-account-card/connect-ads/confirm-create-modal.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import AppModal from '.~/components/app-modal'; | ||
import AppButton from '.~/components/app-button'; | ||
import WarningIcon from '.~/components/warning-icon'; | ||
import './confirm-create-modal.scss'; | ||
|
||
/** | ||
* Google Ads account creation confirmation modal. | ||
* This modal is shown when the user tries to create a new Google Ads account. | ||
* | ||
* @param {Object} props Component props. | ||
* @param {Function} props.onContinue Callback to continue with account creation. | ||
* @param {Function} props.onRequestClose Callback to close the modal. | ||
* @return {JSX.Element} Confirmation modal. | ||
*/ | ||
const ConfirmCreateModal = ( { onContinue, onRequestClose } ) => { | ||
return ( | ||
<AppModal | ||
className="gla-ads-warning-modal" | ||
title={ __( | ||
'Create Google Ads Account', | ||
'google-listings-and-ads' | ||
) } | ||
buttons={ [ | ||
<AppButton key="confirm" isSecondary onClick={ onContinue }> | ||
{ __( | ||
'Yes, I want a new account', | ||
'google-listings-and-ads' | ||
) } | ||
</AppButton>, | ||
<AppButton key="cancel" isPrimary onClick={ onRequestClose }> | ||
{ __( 'Cancel', 'google-listings-and-ads' ) } | ||
</AppButton>, | ||
] } | ||
onRequestClose={ onRequestClose } | ||
> | ||
<p className="gla-ads-warning-modal__warning-text"> | ||
<WarningIcon /> | ||
<span> | ||
{ __( | ||
'Are you sure you want to create a new Google Ads account?', | ||
'google-listings-and-ads' | ||
) } | ||
</span> | ||
</p> | ||
<p> | ||
{ __( | ||
'You already have another Ads account associated with this Google account.', | ||
'google-listings-and-ads' | ||
) } | ||
</p> | ||
<p> | ||
{ __( | ||
'If you create a new Google Ads account, you will need to accept an invite to the account before it can be used.', | ||
'google-listings-and-ads' | ||
) } | ||
</p> | ||
</AppModal> | ||
); | ||
}; | ||
|
||
export default ConfirmCreateModal; |
8 changes: 8 additions & 0 deletions
8
js/src/components/google-combo-account-card/connect-ads/confirm-create-modal.scss
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.gla-ads-warning-modal { | ||
|
||
.gla-ads-warning-modal__warning-text { | ||
display: flex; | ||
align-items: center; | ||
gap: calc(var(--main-gap) / 3); | ||
} | ||
} |
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
124 changes: 28 additions & 96 deletions
124
js/src/components/google-combo-account-card/connect-ads/connect-ads.js
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.
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.
Could this PR not include code changes that are not attributed to it? The d074504 commit belongs more to #2644 (be3e8ec).
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.
I actually made the commit originally in this PR, since testing all of the claim functionality properly was better when I could create a new account from the same UI, but I agree that functionally it fit more in the PR for the Claim functionality, so I cherry-picked this commit there. Given that the other will be merged first, it should be fine to leave this as is and resolve any merge conflicts after #2644 is merged.