{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9706","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9706/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9706/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9706/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9706","id":192408802,"number":9706,"title":"Media: Add state behaviors for series upload","user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.githubusercontent.com/u/1779930?v=3","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"labels":[{"id":285010038,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Media","name":"Media","color":"006b75","default":false},{"id":360006704,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/State","name":"State","color":"006b75","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}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/119","html_url":"https://github.com/Automattic/wp-calypso/milestones/Site%20Icon","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/119/labels","id":1930197,"number":119,"title":"Site Icon","description":"Enabling site icon (Blavatar) management within Calypso.\r\n\r\nhttps://en.support.wordpress.com/blavatars/","creator":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.githubusercontent.com/u/1779930?v=3","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":8,"state":"open","created_at":"2016-08-08T17:58:48Z","updated_at":"2016-11-29T21:38:42Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-11-29T21:38:42Z","updated_at":"2016-12-01T20:09:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9706","html_url":"https://github.com/Automattic/wp-calypso/pull/9706","diff_url":"https://github.com/Automattic/wp-calypso/pull/9706.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9706.patch"},"body":"Blocks #9675\r\nRelated: #5046\r\n\r\nThis pull request seeks to start implementation of media Redux state handlers. The included behaviors are quite basic, including only uploads of one or many files, without validation or compatibility with prior media Flux state.\r\n\r\n__Implementation Notes:__\r\n\r\nRecognizing a common pattern of keying reducer state objects by site ID, included in the changes is a proposed `createSiteReducer`, an enhanced variant of `createReducer` which automatically keys the state returned from the reducer by an assumed `siteId` property on the action.\r\n\r\n__Testing Instructions:__\r\n\r\nEnsure that Mocha tests pass:\r\n\r\n```\r\nnpm run test-client\r\n```\r\n\r\nThe commit 6922b25 is a temporary and unfinished demonstration of expected behaviors. It replaces existing Flux dispatching with the new Redux action creators usage. Verify that after uploading one or many files to the editor media library that the uploads occur in series order (i.e. uploads one at a time). This is easiest to verify using the [Redux DevTools extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en), but you can also use the newly introduced [action logging feature](https://github.com/Automattic/wp-calypso/tree/master/client/state/console-dispatch).\r\n\r\n![upload](https://cloud.githubusercontent.com/assets/1779930/20729793/96250e14-b651-11e6-85bc-060c28dbc572.gif)\r\n\r\n1. Navigate to the [post editor](http://calypso.localhost:3000/post)\r\n2. Select a site, if prompted\r\n3. Click Add Media in the editor toolbar\r\n4. Upload one or more media items\r\n5. Observe that Redux actions are logged in expected sequence\r\n6. Refresh the page (items will **not** show in library in same session yet)\r\n7. Click Add Media in the editor toolbar\r\n8. Note that items were uploaded successfully\r\n\r\ncc @tyxla @gwwar "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/264280431","html_url":"https://github.com/Automattic/wp-calypso/pull/9706#issuecomment-264280431","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9706","id":264280431,"user":{"login":"gwwar","id":1270189,"avatar_url":"https://avatars.githubusercontent.com/u/1270189?v=3","gravatar_id":"","url":"https://api.github.com/users/gwwar","html_url":"https://github.com/gwwar","followers_url":"https://api.github.com/users/gwwar/followers","following_url":"https://api.github.com/users/gwwar/following{/other_user}","gists_url":"https://api.github.com/users/gwwar/gists{/gist_id}","starred_url":"https://api.github.com/users/gwwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwwar/subscriptions","organizations_url":"https://api.github.com/users/gwwar/orgs","repos_url":"https://api.github.com/users/gwwar/repos","events_url":"https://api.github.com/users/gwwar/events{/privacy}","received_events_url":"https://api.github.com/users/gwwar/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T20:09:18Z","updated_at":"2016-12-01T20:09:18Z","body":"Feel free to 🚢  when 6922b25 has been dropped. I can help test again for regressions if you'd like more 👀 "}}
{"actor":{"display_login":"gwwar"}}