{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/96504700","pull_request_review_id":17088077,"id":96504700,"diff_hunk":"@@ -0,0 +1,87 @@\n+/**\n+ * External dependencies\n+ **/\n+import React from 'react';\n+import { connect } from 'react-redux';\n+import { flowRight, find, get } from 'lodash';\n+import { localize, moment } from 'i18n-calypso';\n+\n+/**\n+ * Internal dependencies\n+ */\n+import SectionNav from 'components/section-nav';\n+import NavTabs from 'components/section-nav/tabs';\n+import NavItem from 'components/section-nav/item';\n+import DatePicker from '../stats-date-picker';\n+import { recordGoogleEvent } from 'state/analytics/actions';\n+import { getSelectedSiteId } from 'state/ui/selectors';\n+import { getSiteSlug } from 'state/sites/selectors';\n+\n+export const StatsModuleSummaryLinks = props => {\n+\tconst { translate, path, siteSlug, query, period, children } = props;\n+\n+\tconst now = moment();\n+\tconst quarter = moment().startOf( 'quarter' );\n+\tconst daysSinceQuarterStart = now.diff( quarter, 'd' );\n+\n+\tconst getSummaryPeriodLabel = () => {\n+\t\tswitch ( period.period ) {\n+\t\t\tcase 'day':\n+\t\t\t\treturn translate( 'Day Summary' );\n+\t\t\tcase 'week':\n+\t\t\t\treturn translate( 'Week Summary' );\n+\t\t\tcase 'month':\n+\t\t\t\treturn translate( 'Month Summary' );","path":"client/my-sites/stats/stats-module/all-time-nav.jsx","position":34,"original_position":34,"commit_id":"6f61e818fa10d520ec9a1c0f5caf335bfc37c17c","original_commit_id":"6f61e818fa10d520ec9a1c0f5caf335bfc37c17c","user":{"login":"a8ci18n","id":25137612,"avatar_url":"https://avatars.githubusercontent.com/u/25137612?v=3","gravatar_id":"","url":"https://api.github.com/users/a8ci18n","html_url":"https://github.com/a8ci18n","followers_url":"https://api.github.com/users/a8ci18n/followers","following_url":"https://api.github.com/users/a8ci18n/following{/other_user}","gists_url":"https://api.github.com/users/a8ci18n/gists{/gist_id}","starred_url":"https://api.github.com/users/a8ci18n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a8ci18n/subscriptions","organizations_url":"https://api.github.com/users/a8ci18n/orgs","repos_url":"https://api.github.com/users/a8ci18n/repos","events_url":"https://api.github.com/users/a8ci18n/events{/privacy}","received_events_url":"https://api.github.com/users/a8ci18n/received_events","type":"User","site_admin":false},"body":"Alternate string suggestion: \n* `translate( 'Summary' )`&mdash; translations: **91**. \n\n[PR translation status page](https://translate.wordpress.com/localci/status/automattic/wp-calypso/add/stats/all-time-summary)","created_at":"2017-01-17T20:36:32Z","updated_at":"2017-01-17T20:36:32Z","html_url":"https://github.com/Automattic/wp-calypso/pull/10636#discussion_r96504700","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/96504700"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10636#discussion_r96504700"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636","id":101538634,"html_url":"https://github.com/Automattic/wp-calypso/pull/10636","diff_url":"https://github.com/Automattic/wp-calypso/pull/10636.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/10636.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/10636","number":10636,"state":"open","locked":false,"title":"Stats: Add all-time summaries for Countries.","user":{"login":"timmyc","id":22080,"avatar_url":"https://avatars.githubusercontent.com/u/22080?v=3","gravatar_id":"","url":"https://api.github.com/users/timmyc","html_url":"https://github.com/timmyc","followers_url":"https://api.github.com/users/timmyc/followers","following_url":"https://api.github.com/users/timmyc/following{/other_user}","gists_url":"https://api.github.com/users/timmyc/gists{/gist_id}","starred_url":"https://api.github.com/users/timmyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmyc/subscriptions","organizations_url":"https://api.github.com/users/timmyc/orgs","repos_url":"https://api.github.com/users/timmyc/repos","events_url":"https://api.github.com/users/timmyc/events{/privacy}","received_events_url":"https://api.github.com/users/timmyc/received_events","type":"User","site_admin":false},"body":"This branch seeks to add in \"Summarized\" views of Country Stats.  This was one of the gaps between Atlas Stats and Calypso stats as it provides users a way to view \"All Time\" and \"Last x Days\" of key stats.\r\n\r\n![wordpress_com](https://cloud.githubusercontent.com/assets/22080/21949768/bd691e0e-d9a9-11e6-95ad-f529b96dffc1.png)\r\n\r\nI am marking this PR as 'Design Review' since I'm not really certain if the choice of a `<SelectDropdown/>` for this navigation bit is the best option, and I'm hoping to get further direction on where to put the displaced download button.  The wording shown ( i.e. \"Stats for last X days ending\" ) on these summary views was borrowed from what was used in Atlas stats on these pages.  \r\n\r\n__To Test__\r\n- Navigate to a Site Stats page, and click the 'View All' link under Countries\r\n- Next use the Summary links in the right corner.  Verify stats are updated for each time period as expected.  Bonus points for verifying if these numbers jive with Atlas stats\r\n\r\n__TODO__\r\n- [ ] Determine where to display the download csv button\r\n- [ ] Add analytics events","created_at":"2017-01-14T00:05:59Z","updated_at":"2017-01-17T20:36:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7940ffcee8e38c679a69f74e1c9a893359978940","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/10636/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/6f61e818fa10d520ec9a1c0f5caf335bfc37c17c","head":{"label":"Automattic:add/stats/all-time-summary","ref":"add/stats/all-time-summary","sha":"6f61e818fa10d520ec9a1c0f5caf335bfc37c17c","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-01-17T20:29:01Z","pushed_at":"2017-01-17T20:32:37Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":41689,"stargazers_count":8340,"watchers_count":8340,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1065,"mirror_url":null,"open_issues_count":1620,"forks":1065,"open_issues":1620,"watchers":8340,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"3b18360b78d17de2d88a91922ad19da3b11b5487","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-01-17T20:29:01Z","pushed_at":"2017-01-17T20:32:37Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":41689,"stargazers_count":8340,"watchers_count":8340,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1065,"mirror_url":null,"open_issues_count":1620,"forks":1065,"open_issues":1620,"watchers":8340,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10636"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10636"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10636/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10636/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/6f61e818fa10d520ec9a1c0f5caf335bfc37c17c"}}}}
{"actor":{"display_login":"a8ci18n"}}