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

Add a link for contacting support in error messages #6364

Closed
wants to merge 2 commits into from

Conversation

yurynix
Copy link
Contributor

@yurynix yurynix commented Jun 28, 2016

That PR adds links to error messages and fixes #465

Test live: https://calypso.live/?branch=fix/link-contact-support

  • Code
  • Product

@yurynix yurynix added [Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 28, 2016
@drewblaisdell
Copy link
Contributor

The code looks good. Have you been able to test these messages? I triggered an endpoint in the /me/purchases endpoint but just got a persistent loading state on /purchases instead of seeing the error. We might need to ensure that these are still displayed properly (or I'm missing something).

@drewblaisdell drewblaisdell added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 28, 2016
@drewblaisdell
Copy link
Contributor

It looks like we aren't displaying errors on PurchasesList or RemovePurchase properly. Fixing this will require updating the reducer, which is currently being moved to client/state/. I think we should postpone this fix until we're using the reducer with Redux.

@yurynix
Copy link
Contributor Author

yurynix commented Jun 29, 2016

I've tested the cancel private registration error message on the ui, since it's the only one currently used as far as I can tell, the others aren't displayed anywhere afaik.

@yurynix
Copy link
Contributor Author

yurynix commented Jun 29, 2016

I think we can merge this and add the error displaying to the components later, I'm not sure what you mean by the change in the reducer, why a change is needed? the message already there as far as I can see, it just no accessed from anywhere.

@yurynix yurynix added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Jun 29, 2016
components: { a: <a href="https://wordpress.com/help/contact"/> }
} ),
PURCHASE_REMOVE_ERROR_MESSAGE = i18n.translate( 'There was an error removing the purchase. Please try again later or {{a}}contact support{{/a}}.', {
components: { a: <a href="https://wordpress.com/help/contact"/> }
Copy link
Contributor

@stephanethomas stephanethomas Jun 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use this constant for all those support links.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stephanethomas, fixed that.

@stephanethomas stephanethomas added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 29, 2016
@yurynix yurynix added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Jun 29, 2016
@@ -53,7 +59,9 @@ function cancelPrivateRegistration( purchaseId, onComplete ) {
Dispatcher.handleServerAction( {
type: ActionTypes.PRIVACY_PROTECTION_CANCEL_FAILED,
purchaseId,
error: error.message || i18n.translate( 'There was a problem canceling this private registration. Please try again later or contact support.' )
error: i18n.translate( 'There was a problem canceling this private registration. Please try again later or {{a}}contact support{{/a}}.', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale behind ignoring error.message?

Copy link
Contributor Author

@yurynix yurynix Jun 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drewblaisdell It's broken - contains <a /> without a href...
and also I believe it's a bit confusing, I don't really sure it's good to tell the user what actually the problem is, I feel that a more general error is more appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the error message? If it's broken we should probably fix it.

I don't necessarily agree, unless the error message is about a technical error that users won't be able to understand. Otherwise I think we should display the message returned by the API, or update it if it doesn't do the job. Note a custom message is also useful for support when they are contacted by users and need to investigate a problem.

@drewblaisdell
Copy link
Contributor

I've tested the cancel private registration error message on the ui, since it's the only one currently used as far as I can tell, the others aren't displayed anywhere afaik

In that case, I had one question, but otherwise this LGTM. 👍 Do we not need a product review now?

I'm not sure what you mean by the change in the reducer, why a change is needed?

At least when fetching purchases fails, we don't update the fetching flag when there is an error, resulting in a perpetual loading state.

@stephanethomas stephanethomas added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 30, 2016
@yurynix yurynix closed this Jun 30, 2016
@yurynix
Copy link
Contributor Author

yurynix commented Jun 30, 2016

In light fo your comments, I think it's best to take another approach here, I'll PR it soon.

@scruffian scruffian deleted the fix/link-contact-support branch June 30, 2016 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Purchase Management Related to managing purchases such as subscriptions, plans, history, auto-renew, cancellation, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Purchases: Add support link to error messages
4 participants