{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6765","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6765/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6765/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6765/events","html_url":"https://github.com/Automattic/wp-calypso/pull/6765","id":165448735,"number":6765,"title":"Framework: use Redux for layoutFocus","user":{"login":"sirbrillig","id":2036909,"avatar_url":"https://avatars.githubusercontent.com/u/2036909?v=3","gravatar_id":"","url":"https://api.github.com/users/sirbrillig","html_url":"https://github.com/sirbrillig","followers_url":"https://api.github.com/users/sirbrillig/followers","following_url":"https://api.github.com/users/sirbrillig/following{/other_user}","gists_url":"https://api.github.com/users/sirbrillig/gists{/gist_id}","starred_url":"https://api.github.com/users/sirbrillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirbrillig/subscriptions","organizations_url":"https://api.github.com/users/sirbrillig/orgs","repos_url":"https://api.github.com/users/sirbrillig/repos","events_url":"https://api.github.com/users/sirbrillig/events{/privacy}","received_events_url":"https://api.github.com/users/sirbrillig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Framework","name":"Framework","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"sirbrillig","id":2036909,"avatar_url":"https://avatars.githubusercontent.com/u/2036909?v=3","gravatar_id":"","url":"https://api.github.com/users/sirbrillig","html_url":"https://github.com/sirbrillig","followers_url":"https://api.github.com/users/sirbrillig/followers","following_url":"https://api.github.com/users/sirbrillig/following{/other_user}","gists_url":"https://api.github.com/users/sirbrillig/gists{/gist_id}","starred_url":"https://api.github.com/users/sirbrillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirbrillig/subscriptions","organizations_url":"https://api.github.com/users/sirbrillig/orgs","repos_url":"https://api.github.com/users/sirbrillig/repos","events_url":"https://api.github.com/users/sirbrillig/events{/privacy}","received_events_url":"https://api.github.com/users/sirbrillig/received_events","type":"User","site_admin":false},"assignees":[{"login":"sirbrillig","id":2036909,"avatar_url":"https://avatars.githubusercontent.com/u/2036909?v=3","gravatar_id":"","url":"https://api.github.com/users/sirbrillig","html_url":"https://github.com/sirbrillig","followers_url":"https://api.github.com/users/sirbrillig/followers","following_url":"https://api.github.com/users/sirbrillig/following{/other_user}","gists_url":"https://api.github.com/users/sirbrillig/gists{/gist_id}","starred_url":"https://api.github.com/users/sirbrillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirbrillig/subscriptions","organizations_url":"https://api.github.com/users/sirbrillig/orgs","repos_url":"https://api.github.com/users/sirbrillig/repos","events_url":"https://api.github.com/users/sirbrillig/events{/privacy}","received_events_url":"https://api.github.com/users/sirbrillig/received_events","type":"User","site_admin":false}],"milestone":null,"comments":26,"created_at":"2016-07-14T00:04:10Z","updated_at":"2016-08-03T19:03:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/6765","html_url":"https://github.com/Automattic/wp-calypso/pull/6765","diff_url":"https://github.com/Automattic/wp-calypso/pull/6765.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/6765.patch"},"body":"This PR aims to replace the `layoutFocus` module (a Flux store) with `state.ui.layoutFocus` in the Redux state tree, along with the appropriate actions and selectors.\r\n\r\nThe old Flux store module will now call the new Redux actions and selectors for its methods. There is only one place in the code (that I could find) where a component observes the Flux store for changes (`Layout`), and that has been updated to use a selector instead.\r\n\r\nThe old methods, with their replacements (note that the actions will require a dispatcher):\r\n\r\n- `layoutFocus.set( area )` -> `setLayoutFocus( area )` (action)\r\n- `layoutFocus.setNext( area )` -> `setNextLayoutFocus( area )` (action)\r\n- `layoutFocus.next()` -> `activateNextLayoutFocus()` (action)\r\n- `layoutFocus.getCurrent()` -> `getCurrentLayoutFocus( state )`\r\n- `layoutFocus.getPrevious()` -> `getPreviousLayoutFocus( state )`\r\n- `layoutFocus._next` -> `getNextLayoutFocus( state )`\r\n\r\n### Testing\r\n\r\nFirst, make sure that when visiting a my-sites page, clicking on the site selector (\"switch site\") still works as expected (switches the focus to `sites` and then back to `content` when done).\r\n\r\nSecond, when visiting a my-sites page, adding `?sp` in the querystring should focus the sites list.\r\n\r\nThe code is calling the `setLayoutFocus()` method, which, if you see the sites list active, means that it updated the Flux store. Then check the Redux store (eg: using Redux Devtools) and be sure that `state.ui.layoutFocus.current` has been changed to 'sites'.\r\n\r\nTest live: https://calypso.live/?branch=update/use-redux-for-layout-focus"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/237338288","html_url":"https://github.com/Automattic/wp-calypso/pull/6765#issuecomment-237338288","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6765","id":237338288,"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},"created_at":"2016-08-03T19:03:33Z","updated_at":"2016-08-03T19:03:33Z","body":"> previewPost in PostActionsEllipsisMenuView in PostTypeList: clicking the PopoverMenuItem for \"Preview\" should show the post preview. (?? not sure how to find that button)\r\n\r\nCan't test because of the `<Sidebar>` error, but \"View\" or \"Preview\" should in the ellipsis menu should trigger an in-page preview on this screen:\r\n\r\nhttp://calypso.localhost:3000/types/post"}}
{"actor":{"display_login":"aduth"}}