Skip to content

Consolidate "Permissions Error" during Site Kit Setup #10118

@wpdarren

Description

@wpdarren

Bug Description

I noticed the error banner notification changed when permissions are not given during setting up of Site Kit. Previously the banner had different title, description and included a learn more link which was useful for users.

Conversation on Slack from @zutigrm

This is basically between completely removing the usage of SetupErrorMessageNotification which is shown only on splash screen, we can use SetupErrorNotification here instead, since that notification is used everywhere else and includes learn more link.

Conversation on Slack from @jimmymadon

If possible, we should be using the notification with the Learn more / get help link where it already was appearing before.

Steps to reproduce

  1. Create a new test site and Google account (or remove SK in the security area of the Google account you plan to use.)
  2. Set up Site Kit and when you are asked to give permissions, do not check any of the checkboxes and click continue.
  3. You will be redirected back to the Site Kit dashboard.
  4. Observe that there is no learn more link on the banner notification.

Screenshots

How the banner looked previously
image.png

How the banner looks now
image.png


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • When setting up Site Kit, if all permissions are not granted on the Google oAuth screen, then the "Permissions error" Banner Notification should be shown as before.
    • The Get help link should be included in the URL which should point to this section in the documentation.
    • The Redo the plugin setup button should be displayed that redirects the user back to the oAuth screen to select their google account / accept permissions.

Implementation Brief

  • Remove the assets/js/components/notifications/SetupErrorNotification.js component and all its associated stories.
  • In assets/js/googlesitekit/notifications/register-defaults.js:
    • Remove the registration of the SetupErrorNotification component.
    • Within the registration of setup_plugin_error notification, add the VIEW_CONTEXT_SPLASH to the list of viewContexts.

Test Coverage

  • Migrate the tests from assets/js/components/notifications/SetupErrorNotification.test.js to assets/js/components/notifications/SetupErrorMessageNotification.test.js.

QA Brief

  • Reset Site Kit and set it up again, but this time, do not give permissions on the oAuth screen (i.e. follow the "Steps to reproduce"). Verify that the Permissions error shows correctly as per the AC.
  • NOTE: The Get help link needs to be updated by @jamesozzie so that it points to the new error banner section.
Image

Changelog entry

  • Improve/consolidate permissions errors UI when setting up Site Kit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityTeam SIssues for Squad 1Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions