{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2930","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2930/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2930/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2930/events","html_url":"https://github.com/Automattic/wp-calypso/pull/2930","id":130078888,"number":2930,"title":"Importer: Report progress","user":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Import","name":"Import","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Author%20Reply","name":"[Status] Needs Author Reply","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/49","html_url":"https://github.com/Automattic/wp-calypso/milestones/Import:%20First%20Release","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/49/labels","id":1478150,"number":49,"title":"Import: First Release","description":null,"creator":{"login":"designsimply","id":1119271,"avatar_url":"https://avatars.githubusercontent.com/u/1119271?v=3","gravatar_id":"","url":"https://api.github.com/users/designsimply","html_url":"https://github.com/designsimply","followers_url":"https://api.github.com/users/designsimply/followers","following_url":"https://api.github.com/users/designsimply/following{/other_user}","gists_url":"https://api.github.com/users/designsimply/gists{/gist_id}","starred_url":"https://api.github.com/users/designsimply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/designsimply/subscriptions","organizations_url":"https://api.github.com/users/designsimply/orgs","repos_url":"https://api.github.com/users/designsimply/repos","events_url":"https://api.github.com/users/designsimply/events{/privacy}","received_events_url":"https://api.github.com/users/designsimply/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":9,"state":"open","created_at":"2015-12-30T14:15:59Z","updated_at":"2016-02-01T22:00:06Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-01-31T04:41:36Z","updated_at":"2016-02-02T00:27:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2930","html_url":"https://github.com/Automattic/wp-calypso/pull/2930","diff_url":"https://github.com/Automattic/wp-calypso/pull/2930.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/2930.patch"},"body":"This takes possible progress values from the server and renders them in\r\nthe progress bar. It additionally writes a message below the progress\r\nbar to indicate how many resources are still importing to give a better\r\nindication to the user that things are still moving.\r\n\r\nCurrently this depends on the server reporting that progress. You can **test** by applying D971 to your sandbox, sandboxing `public-api.wordpress.com`, and then conducting an import.\r\n\r\nWithout the patch the imports should only show a spinner in Calypso. With both patches applied, you should see a progress bar and get updates. A message should appear below the progress bar to indicate how many resources still need to be imported.\r\n\r\nBecause attachments take significantly longer to import than posts, pages, and comments, I have chosen to weight them differently in the progress percentage, with all the attachments weighing 80% of the percentage and the others combined making up the last 20%. If there are no attachments to import, then the progress is the total number of objects imported compared to the total number of objects to import.\r\n\r\n**Just a spinner**\r\nThis occurs either without this PR or when the API isn't sandboxed.\r\n<img width=\"733\" alt=\"screen shot 2016-02-01 at 3 37 28 pm\" src=\"https://cloud.githubusercontent.com/assets/5431237/12733835/450274b2-c8fa-11e5-83cf-41ba0c0fb1dc.png\">\r\n\r\n**Progress being reported with this PR and sandboxed**\r\n<img width=\"740\" alt=\"screen shot 2016-02-01 at 3 39 18 pm\" src=\"https://cloud.githubusercontent.com/assets/5431237/12733849/5a29fd38-c8fa-11e5-86ad-73597540a0c6.png\">\r\n<img width=\"737\" alt=\"screen shot 2016-02-01 at 3 39 29 pm\" src=\"https://cloud.githubusercontent.com/assets/5431237/12733850/5a47aec8-c8fa-11e5-9d79-24a14427731c.png\">\r\n\r\n**Import is finishing up**\r\n<img width=\"736\" alt=\"screen shot 2016-02-01 at 3 38 51 pm\" src=\"https://cloud.githubusercontent.com/assets/5431237/12733856/67d1a666-c8fa-11e5-8ed4-444c90c805d7.png\">\r\n\r\n\r\n\r\ncc: @apeatling @omarjackman @rodrigoi @designsimply "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/178271870","html_url":"https://github.com/Automattic/wp-calypso/pull/2930#issuecomment-178271870","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2930","id":178271870,"user":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T00:27:26Z","updated_at":"2016-02-02T00:27:26Z","body":"@rralian re: _I always seem to have stale data in my test sites_\r\n\r\nthis is something I am already aware of and it's just another item on the todo list. sorry."}}