{"action":"created","issue":{"url":"https://api.github.com/repos/streetmix/streetmix/issues/660","repository_url":"https://api.github.com/repos/streetmix/streetmix","labels_url":"https://api.github.com/repos/streetmix/streetmix/issues/660/labels{/name}","comments_url":"https://api.github.com/repos/streetmix/streetmix/issues/660/comments","events_url":"https://api.github.com/repos/streetmix/streetmix/issues/660/events","html_url":"https://github.com/streetmix/streetmix/pull/660","id":216992848,"number":660,"title":"Store active menu state in Redux","user":{"login":"louh","id":2553268,"avatar_url":"https://avatars0.githubusercontent.com/u/2553268?v=3","gravatar_id":"","url":"https://api.github.com/users/louh","html_url":"https://github.com/louh","followers_url":"https://api.github.com/users/louh/followers","following_url":"https://api.github.com/users/louh/following{/other_user}","gists_url":"https://api.github.com/users/louh/gists{/gist_id}","starred_url":"https://api.github.com/users/louh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louh/subscriptions","organizations_url":"https://api.github.com/users/louh/orgs","repos_url":"https://api.github.com/users/louh/repos","events_url":"https://api.github.com/users/louh/events{/privacy}","received_events_url":"https://api.github.com/users/louh/received_events","type":"User","site_admin":false},"labels":[{"id":104215180,"url":"https://api.github.com/repos/streetmix/streetmix/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-25T18:13:51Z","updated_at":"2017-04-07T02:34:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/streetmix/streetmix/pulls/660","html_url":"https://github.com/streetmix/streetmix/pull/660","diff_url":"https://github.com/streetmix/streetmix/pull/660.diff","patch_url":"https://github.com/streetmix/streetmix/pull/660.patch"},"body":"This stores active menu id in Redux instead of in the `MenusContainer` component state. This is done to address the behavior of two functions `isAnyMenuVisible()` and `hideAllMenus()`, both exported from `menus_controller.js`.\r\n\r\nSometimes, other parts of Streetmix needs to know if a menu is open, and it does so by querying class names from the DOM. This is not ideal because it tightly couples the styling to logic. Preferably, we query application state to know if a menu is open. As a result, we need to move active menu state from the `MenusContainer` component and in to Redux. `MenusContainer` will receive the active menu from props and render the correct active menu.\r\n\r\nBecause we can hide all menus by clearing the active menu ID from the Redux store, we also no longer need to fire the `stmx:hide_menus` event that `MenusContainer` was listening for. This was also a poor way of communicating state changes across components now that we have Redux. As a result `hideAllMenus()` dispatches a change to the Redux store directly and `MenusContainer` will handle the cleanup as props changes.\r\n"},"comment":{"url":"https://api.github.com/repos/streetmix/streetmix/issues/comments/292406817","html_url":"https://github.com/streetmix/streetmix/pull/660#issuecomment-292406817","issue_url":"https://api.github.com/repos/streetmix/streetmix/issues/660","id":292406817,"user":{"login":"louh","id":2553268,"avatar_url":"https://avatars0.githubusercontent.com/u/2553268?v=3","gravatar_id":"","url":"https://api.github.com/users/louh","html_url":"https://github.com/louh","followers_url":"https://api.github.com/users/louh/followers","following_url":"https://api.github.com/users/louh/following{/other_user}","gists_url":"https://api.github.com/users/louh/gists{/gist_id}","starred_url":"https://api.github.com/users/louh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louh/subscriptions","organizations_url":"https://api.github.com/users/louh/orgs","repos_url":"https://api.github.com/users/louh/repos","events_url":"https://api.github.com/users/louh/events{/privacy}","received_events_url":"https://api.github.com/users/louh/received_events","type":"User","site_admin":false},"created_at":"2017-04-07T02:34:26Z","updated_at":"2017-04-07T02:34:26Z","body":"Merging due to old age 😸 "}}
{"actor":{"display_login":"louh"}}