site-kit-wp: Return full stops back to the insufficient permissions error description

Bug Description

2021-09-29_16-49

Steps to reproduce

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots

Additional Context

  • PHP Version:
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Plugin Version [e.g. 22]
  • Device: [e.g. iPhone6]

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

Acceptance criteria

  • The error message from the getInsufficientPermissionsErrorDescription function should always have individual sentences separated from each other with a full stop.
  • At the same time, it should still ensure that the last sentence does not end in a full stop, per our UX guidelines (text with 1 or 2 sentences should not end in a full stop).

Implementation Brief

  • Using assets/js/util/insufficient-permissions-error-description.js,
    • Add a full stop, . at the end of every message.
    • Before returning the complete string from the function, check:
      • if userInfo is empty and remove the last . from message.

Test Coverage

  • Add tests for getInsufficientPermissionsErrorDescription.

QA Brief

Changelog entry

  • Add full stops to the insufficient permissions error description.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks @mitogh, merged!

Note for the future: Please keep in mind to also move and assign the issue accordingly in the project board, e.g. move from Execution to Code Review and unassign yourself if you’re no longer working on it / waiting for someone else to review 👍

@wpdarren try to edit the Analytics settings using a secondary user that doesn’t have access to the selected Analytics account.

@asvinb full stops should be added back to each version of the message copy and then trimmed from the end of the combined string. This is important to add full stops to all messages because it needs to be properly localized.