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 site names on sites-list error notices #483

Merged

Conversation

johnHackworth
Copy link
Contributor

Until now, each time you got an error message related with your site list that affected more than one site, you only could see that the error were affecting N sites, but not which sites those were.

image

This PR adds the name of the sites to the error message:

image

How to test

  1. If you have any jetpack site, force an error message (for example, stopping the server)
  2. Go to http://calypso.localhost:3000/plugins
  3. You should get a error notice, which should contain a list of the sites currently down

@johnHackworth johnHackworth added Sites [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR Jetpack Plugins labels Nov 23, 2015
@johnHackworth johnHackworth self-assigned this Nov 23, 2015
@johnHackworth johnHackworth force-pushed the update/sites-list-add-site-names-on-error-notices branch 3 times, most recently from 4185e66 to de1c371 Compare November 23, 2015 12:06
numberOfSites: logs.length
}
};
var sampleLog = logs[ 0 ],
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be a const

@johnHackworth johnHackworth force-pushed the update/sites-list-add-site-names-on-error-notices branch from de1c371 to 9de2f95 Compare November 24, 2015 14:28
@enejb
Copy link
Member

enejb commented Nov 24, 2015

I think this is a good start. Especially when we move to the pill notifications we need to consider to revisit this. I think this is a good stop gap solution.

args: {
siteName: sampleLog.site.title,
siteNames: sites.join( ', ' ),
numberOfSites: logs.length
Copy link
Member

Choose a reason for hiding this comment

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

I think this might need to get changed to sites.length. Since the number of sites might be different from the log. ( I am not 100% sure about )

@enejb
Copy link
Member

enejb commented Nov 24, 2015

One minor change but otherwise this looks good to go 👍

@mtias
Copy link
Member

mtias commented Nov 24, 2015

This is definitely an improvement. Can we have a period at the end of the sentence?

@enejb
Copy link
Member

enejb commented Nov 24, 2015

Just updated the code to include periods at the end of sentences and the suggestion I made.
If you agree feel free to merge this code after a rebase and squash of the last commit.
👍

@enejb enejb added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 24, 2015
@johnHackworth johnHackworth force-pushed the update/sites-list-add-site-names-on-error-notices branch from cf896e6 to a1801bc Compare November 25, 2015 09:28
johnHackworth added a commit that referenced this pull request Nov 25, 2015
…mes-on-error-notices

Add site names on sites-list error notices
@johnHackworth johnHackworth merged commit 26dfa5e into master Nov 25, 2015
@johnHackworth johnHackworth deleted the update/sites-list-add-site-names-on-error-notices branch November 25, 2015 09:37
@lancewillett lancewillett removed the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants