site-kit-wp: Return full stops back to the insufficient permissions error description
Bug Description
Steps to reproduce
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- 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 everymessage
. - Before returning the complete string from the function, check:
- if
userInfo
is empty and remove the last.
frommessage
.
- if
- Add a full stop,
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
- Update logic to append full stops signs on sentences. Update the logic for `getInsufficientPermissionsErrorDescription` in order to add a more granular control when the full stops are included betwee... — committed to google/site-kit-wp by mitogh 3 years ago
- Add a full stop for the second sentence. Work related with ticket #4160. — committed to google/site-kit-wp by mitogh 3 years ago
- Add a full stop for the second sentence. Work related with ticket #4160. — committed to google/site-kit-wp by mitogh 3 years ago
- Add a full stop for the second sentence. Work related with ticket #4160. — committed to google/site-kit-wp by mitogh 3 years ago
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 👍
A PR has been created with the requested change:
cc @felixarntz @eugene-manuilov @wpdarren
@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.