-
Notifications
You must be signed in to change notification settings - Fork 286
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
Implement the “Top content” metric handling OAuth flow #8154
Comments
IB ✅ |
…uth-flow Enhancement/#8154 - Implement the “Top content” metric handling OAuth flow
QA Update
|
Hi @kelvinballoo, those are valid UX concerns. However, they are out of the scope of the issue. Can you create a new issue to address them? Thanks! |
QA Update
|
Hi @kelvinballoo, the |
QA Update ✅Thanks for confirming @hussain-t . I can confirm, based on the AC, that the ErrorNotifications banner does not appear if there is an error. The following were verified good and it's good to be moved to Approval. Given that the user does not have the Analytics edit scope:
|
Feature Description
Implement the redirection to OAuth to grant the edit scope for creating the custom dimension from the "Top content" metric section. This includes both the happy and unhappy path.
See audience tiles > "Top content" states and OAuth errors in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
In
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceTilesWidget/AudienceTile/AudienceTilePagesMetric.js
:autoSubmit
value for theAUDIENCE_TILE_CUSTOM_DIMENSION_CREATE
key using thegetValue
selector of theCORE_FORMS
store.getSetupErrorCode
selector of theCORE_SITE
store.hasOAuthError
that checks ifautoSubmit
is true and the setup error code equals'access_denied'
.AudienceErrorModal
component should be rendered.hasOAuthError
variable as part of the condition to render theAudienceErrorModal
component.hasOAuthError
variable to thehasOAuthError
prop of theAudienceErrorModal
component.AudienceSegmentationSetupCTAWidget
:site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Line 160 in 29bb9ea
site-kit-wp/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Lines 296 to 298 in 29bb9ea
Test Coverage
AudienceTile/index.test.js
file and addAudienceErrorModal
error variants tests similar to the ones in AudienceSegmentationSetupCTAWidget.test.js.QA Brief
To simulate the OAuth error:
Prepare the Environment:
wp_googlesitekit_additional_auth_scopes
entry from thewp_usermeta
table if it exists. This entry contains thehttps://www.googleapis.com/auth/analytics.edit
scope.googlesitekit_post_type
custom dimension from the Analytics console if it exists.Trigger the OAuth Error:
Changelog entry
The text was updated successfully, but these errors were encountered: