Skip to content
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

Return full stops back to the insufficient permissions error description #4160

Closed
eugene-manuilov opened this issue Sep 29, 2021 · 16 comments
Closed
Labels
Good First Issue Good first issue for new engineers P2 Low priority Rollover Issues which role over to the next sprint Type: Bug Something isn't working

Comments

@eugene-manuilov
Copy link
Collaborator

eugene-manuilov commented Sep 29, 2021

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.
@eugene-manuilov eugene-manuilov added Type: Bug Something isn't working P2 Low priority labels Sep 29, 2021
@aaemnnosttv
Copy link
Collaborator

@eugene-manuilov did we remove these recently?

@eugene-manuilov
Copy link
Collaborator Author

@felixarntz felixarntz assigned felixarntz and unassigned felixarntz Oct 27, 2021
@felixarntz felixarntz added the Good First Issue Good first issue for new engineers label Oct 27, 2021
@asvinb asvinb assigned asvinb and unassigned asvinb Nov 4, 2021
@eugene-manuilov eugene-manuilov self-assigned this Nov 8, 2021
@eugene-manuilov
Copy link
Collaborator Author

@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.

@eugene-manuilov
Copy link
Collaborator Author

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Nov 17, 2021
@mitogh mitogh self-assigned this Nov 29, 2021
mitogh added a commit that referenced this issue Nov 30, 2021
Update the logic for `getInsufficientPermissionsErrorDescription` in order to
add a more granular control when the full stops are included between sentences.

Tests were added for `getInsufficientPermissionsErrorDescription` in order to
prevent regressions in the future.

Ticket #4160.
@mitogh mitogh removed their assignment Nov 30, 2021
@mitogh mitogh linked a pull request Nov 30, 2021 that will close this issue
7 tasks
@eugene-manuilov eugene-manuilov self-assigned this Dec 1, 2021
@FlicHollis FlicHollis added the Rollover Issues which role over to the next sprint label Dec 6, 2021
@mitogh mitogh removed their assignment Dec 8, 2021
@eugene-manuilov
Copy link
Collaborator Author

@mitogh could you please add QAB?

@mitogh
Copy link
Contributor

mitogh commented Dec 10, 2021

Thanks, @eugene-manuilov however while I was trying to find a scenario to replicate this issue I found 2 existing bugs in production that prevent us from actually testing this behavior as it should be.

Let me know what the best next steps should be here instead.

cc @wpdarren

@wpdarren
Copy link
Collaborator

@eugene-manuilov any thoughts on how we can test this based on @mitogh comment above?

@eugene-manuilov
Copy link
Collaborator Author

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

@wpdarren wpdarren assigned wpdarren and unassigned eugene-manuilov and mitogh Dec 14, 2021
@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • The error message has individual sentences separated from each other with a full stop.
  • The last sentence does not end in a full stop.

image

Thanks @eugene-manuilov I got confused if this could be tested or not.

@wpdarren wpdarren removed their assignment Dec 14, 2021
@felixarntz
Copy link
Member

@eugene-manuilov @wpdarren The ACs here were defined a while ago and are actually not entirely correct. I don't remember exactly in which issue we had that conversation a few weeks back, but I remember for sure that we clarified that actually only single sentences should ever not end in a full stop.

This is not a big deal, but it should also be really quick to fix - can we add the full stop also to the second sentence above?

mitogh added a commit that referenced this issue Dec 16, 2021
mitogh added a commit that referenced this issue Dec 16, 2021
@mitogh
Copy link
Contributor

mitogh commented Dec 16, 2021

A PR has been created with the requested change:

cc @felixarntz @eugene-manuilov @wpdarren

@felixarntz felixarntz assigned mitogh and unassigned eugene-manuilov Dec 16, 2021
@felixarntz
Copy link
Member

@mitogh The changes in the PR looks good, but it needs to be based on and target main - I left a PR comment with that as well. Can you please update it?

mitogh added a commit that referenced this issue Dec 16, 2021
@mitogh
Copy link
Contributor

mitogh commented Dec 16, 2021

Thanks, @felixarntz as discussed in previous PR #4572 was closed due it was based on develop instead I've cherry-pick the commit into a new PR #4574 and opened it against main.

@felixarntz
Copy link
Member

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 👍

@felixarntz felixarntz assigned felixarntz and unassigned mitogh and felixarntz Dec 16, 2021
@felixarntz
Copy link
Member

Approval (based on #4160 (comment)) ✅

@mitogh
Copy link
Contributor

mitogh commented Dec 16, 2021

Thanks for the flag 💯 @felixarntz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers P2 Low priority Rollover Issues which role over to the next sprint Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants