{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23344","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23344/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23344/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23344/events","html_url":"https://github.com/Automattic/wp-calypso/pull/23344","id":305686389,"number":23344,"title":"Store: Add stats widget to the store dashboard","user":{"login":"justinshreve","id":689165,"avatar_url":"https://avatars2.githubusercontent.com/u/689165?v=4","gravatar_id":"","url":"https://api.github.com/users/justinshreve","html_url":"https://github.com/justinshreve","followers_url":"https://api.github.com/users/justinshreve/followers","following_url":"https://api.github.com/users/justinshreve/following{/other_user}","gists_url":"https://api.github.com/users/justinshreve/gists{/gist_id}","starred_url":"https://api.github.com/users/justinshreve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinshreve/subscriptions","organizations_url":"https://api.github.com/users/justinshreve/orgs","repos_url":"https://api.github.com/users/justinshreve/repos","events_url":"https://api.github.com/users/justinshreve/events{/privacy}","received_events_url":"https://api.github.com/users/justinshreve/received_events","type":"User","site_admin":false},"labels":[{"id":285009990,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Stats","name":"Stats","color":"006b75","default":false},{"id":545515130,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Store","name":"Store","color":"96588a","default":false},{"id":285010023,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Design%20Review","name":"[Status] Needs Design Review","color":"13CDF7","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":559313069,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Tests]%20Includes%20Tests","name":"[Tests] Includes Tests","color":"5ae8a3","default":false}],"state":"open","locked":false,"assignee":{"login":"justinshreve","id":689165,"avatar_url":"https://avatars2.githubusercontent.com/u/689165?v=4","gravatar_id":"","url":"https://api.github.com/users/justinshreve","html_url":"https://github.com/justinshreve","followers_url":"https://api.github.com/users/justinshreve/followers","following_url":"https://api.github.com/users/justinshreve/following{/other_user}","gists_url":"https://api.github.com/users/justinshreve/gists{/gist_id}","starred_url":"https://api.github.com/users/justinshreve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinshreve/subscriptions","organizations_url":"https://api.github.com/users/justinshreve/orgs","repos_url":"https://api.github.com/users/justinshreve/repos","events_url":"https://api.github.com/users/justinshreve/events{/privacy}","received_events_url":"https://api.github.com/users/justinshreve/received_events","type":"User","site_admin":false},"assignees":[{"login":"justinshreve","id":689165,"avatar_url":"https://avatars2.githubusercontent.com/u/689165?v=4","gravatar_id":"","url":"https://api.github.com/users/justinshreve","html_url":"https://github.com/justinshreve","followers_url":"https://api.github.com/users/justinshreve/followers","following_url":"https://api.github.com/users/justinshreve/following{/other_user}","gists_url":"https://api.github.com/users/justinshreve/gists{/gist_id}","starred_url":"https://api.github.com/users/justinshreve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinshreve/subscriptions","organizations_url":"https://api.github.com/users/justinshreve/orgs","repos_url":"https://api.github.com/users/justinshreve/repos","events_url":"https://api.github.com/users/justinshreve/events{/privacy}","received_events_url":"https://api.github.com/users/justinshreve/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-03-15T19:18:53Z","updated_at":"2018-03-15T19:19:36Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/23344","html_url":"https://github.com/Automattic/wp-calypso/pull/23344","diff_url":"https://github.com/Automattic/wp-calypso/pull/23344.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/23344.patch"},"body":"This PR implements a stats widget on the dashboard. See p90Yrv-mi-p2.\r\n\r\nIt is wrapped behind a new feature flag, enabled in development and wpcalypso. \r\n\r\nTo Test:\r\n* Run `npm run test-client client/extensions/woocommerce` and make sure all tests pass.\r\n* Go to `http://calypso.localhost:3000/store/:site` on a site with some orders. Test switching the unit (day, week, month). Refresh and make sure the selection persists.\r\n* Verify the different stats/lists load and display correctly.\r\n* If you don’t have a test site with a lot of data, you can force the widget to display another site as an A12.\r\n\t* Find a live site by going to Live Tracks view in MC and then search for `calypso_woocommerce_order_received`.  Find an event and expand it. Copy the blogid.\r\n\t* Open `client/extensions/woocommerce/app/dashboard/widgets/stats-widget/index.js`\r\n\t* Replace `const site = getSelectedSiteWithFallback( state );` with something like `const site = { ID: BLOGID, slug: '', name: 'Test Site' };`.\r\n\t* Refresh\r\n\r\n<img width=\"844\" alt=\"screen shot 2018-03-15 at 1 26 56 am\" src=\"https://user-images.githubusercontent.com/689165/37486137-d09c248a-284a-11e8-8aac-29b4b485aa5a.png\">\r\n\r\nApologies for the PR size. About 200 lines are tests, and 130 CSS. I could split out the utils and tests (~300 lines) — but I figured it would be easier to review with context."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/373493060","html_url":"https://github.com/Automattic/wp-calypso/pull/23344#issuecomment-373493060","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23344","id":373493060,"user":{"login":"justinshreve","id":689165,"avatar_url":"https://avatars2.githubusercontent.com/u/689165?v=4","gravatar_id":"","url":"https://api.github.com/users/justinshreve","html_url":"https://github.com/justinshreve","followers_url":"https://api.github.com/users/justinshreve/followers","following_url":"https://api.github.com/users/justinshreve/following{/other_user}","gists_url":"https://api.github.com/users/justinshreve/gists{/gist_id}","starred_url":"https://api.github.com/users/justinshreve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinshreve/subscriptions","organizations_url":"https://api.github.com/users/justinshreve/orgs","repos_url":"https://api.github.com/users/justinshreve/repos","events_url":"https://api.github.com/users/justinshreve/events{/privacy}","received_events_url":"https://api.github.com/users/justinshreve/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T19:19:36Z","updated_at":"2018-03-15T19:19:36Z","author_association":"CONTRIBUTOR","body":"Kelly mentioned on the thread:\r\n\r\n> I thought of something… We’ll need a ‘zero state’ that doesn’t look/feel super sad if you have no orders, etc in the last week.\r\n\r\nThis is not implemented yet. I’m happy to do that in a follow-up PR before launching this. What should it look like? @kellychoffman @jameskoster \r\n\r\nThis is what it currently looks like with no orders:\r\n\r\n<img width=\"841\" alt=\"screen shot 2018-03-15 at 1 03 15 am\" src=\"https://user-images.githubusercontent.com/689165/37486220-17833794-284b-11e8-86b2-e32176d0fa50.png\">\r\n"}}
{"actor":{"display_login":"justinshreve"}}