You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While connecting accounts to the store, a merchant may need to edit one or more of the connected accounts being shown in the GoogleComboAccountsCard.
To achieve this, it is important to understand the three main visual states that the GoogleComboAccountCard supports:
Compact – In this state, all three accounts are represented in the top card body section. This state is used when automatically creating new accounts and after all accounts have been successfully connected.
Semi-expanded – In this state, the top card body section represents multiple connected accounts (e.g., Google and Google Ads) but one account is represented in it's own section to allow for more complex interactions, like selecting from an existing account to connect.
Fully-expanded – This state is used when both the Ads and MC account need to be shown in their own sections, or when the user needs to edit any accounts that were already connected
In either of the first two scenarios, the top section of the combo card should include an "Edit" link, which will switch the GoogleComboAccountsCard to the third, Fully-expanded state.
In this state, the top section only represents the Google Account, and includes a link to connect a different Google Account. Below, the Ads and MC accounts will be shown in their own panels where accounts can be disconnected, connected, created, etc.
Acceptance Criteria
When multiple accounts are represented in the top section of the card, an "edit" button is shown
Clicking the "edit" button causes the card to be shown in the fully-expanded state
From the edited state the connected Google account can be changed
From the edited state, Ads and MC account can be connected, disconnected, or created (if already implemented)
Implementation Brief
Using the GoogleComboAccountsCard component,
Add a state variable to indicate whether the user clicked on the "Edit" button.
If this is the case,
Do not render the "Connected" icon for the Google account and the "Merchant Center ID" and "Google Ads ID" (within GoogleComboCard)
Replace the "Edit" button by the "Connect to a different Google account" text as per the designs.
Consider having a component within js/src/components/google-combo-account-card/connect-google-account/ to handle all the logic instead of having the code in GoogleComboAccountsCard.
Edit the existing code to ensure the "Edit" mode has higher priority when showing the above components.
Additional state variables might be needed, to know when/if the ConnectAds and ConnectMC are automatically rendered (if there are accounts and the user is prompted to connect accounts).
Create the ConnectWarningModal component within js/src/components/google-combo-account-card/connect-google-account/connect-warning-modal.js.
The modal should follow the same implementation as other modals in the codebase. For e.g js/src/components/google-mc-account-card/warning-modal/index.js
Part of #2509
Caution
Blocked by #2596 and #2597.
While connecting accounts to the store, a merchant may need to edit one or more of the connected accounts being shown in the
GoogleComboAccountsCard
.To achieve this, it is important to understand the three main visual states that the
GoogleComboAccountCard
supports:In either of the first two scenarios, the top section of the combo card should include an "Edit" link, which will switch the
GoogleComboAccountsCard
to the third, Fully-expanded state.In this state, the top section only represents the Google Account, and includes a link to connect a different Google Account. Below, the Ads and MC accounts will be shown in their own panels where accounts can be disconnected, connected, created, etc.
Acceptance Criteria
Implementation Brief
GoogleComboAccountsCard
component,GoogleComboCard
)js/src/components/google-combo-account-card/connect-google-account/
to handle all the logic instead of having the code inGoogleComboAccountsCard
.ConnectAds
(created in Onboarding: Connect to existing Ads account in Google Accounts Card #2596) andConnectMC
(created in Onboarding: Connect to existing MC account in Google Accounts Card #2597) should be rendered (irrespective the accounts are connected or not).ConnectAds
andConnectMC
are automatically rendered (if there are accounts and the user is prompted to connect accounts).ConnectWarningModal
component withinjs/src/components/google-combo-account-card/connect-google-account/connect-warning-modal.js
.js/src/components/google-mc-account-card/warning-modal/index.js
disconnectAllAccounts
action should be dispatched and the modal closed.js/src/settings/disconnect-modal/confirm-modal.js
ConnectWarningModal
.Test Coverage
Definition Questions
The text was updated successfully, but these errors were encountered: