{"action":"closed","issue":{"url":"https://api.github.com/repos/devtools-html/debugger.html/issues/1280","repository_url":"https://api.github.com/repos/devtools-html/debugger.html","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/1280/labels{/name}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/1280/comments","events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/1280/events","html_url":"https://github.com/devtools-html/debugger.html/issues/1280","id":190870096,"number":1280,"title":"Open Panes when the debugger pauses","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars.githubusercontent.com/u/254562?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"labels":[{"id":408866147,"url":"https://api.github.com/repos/devtools-html/debugger.html/labels/difficulty:%20medium","name":"difficulty: medium","color":"fbca04","default":false},{"id":346505996,"url":"https://api.github.com/repos/devtools-html/debugger.html/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":445597103,"url":"https://api.github.com/repos/devtools-html/debugger.html/labels/in%20progress","name":"in progress","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-21T23:54:04Z","updated_at":"2016-12-19T21:17:24Z","closed_at":"2016-12-19T21:17:24Z","body":"We would like to make sure the Call Stack and Scope pane are open when the debugger pauses.\r\n\r\nThe logic goes like this:\r\n- if the panes are open keep them open\r\n- if they are closed open them\r\n\r\n#804 started this push by making sure the local scope was open.\r\nThis work is blocked by #1277, which will make it much easier to open the panes.\r\n\r\n#### Patch\r\n\r\n* I started working on this patch, but realized that it's hard to get `shouldOpen` to update the Accordion's `opened` state. \r\n\r\n```diff\r\ndiff --git a/src/components/RightSidebar.js b/src/components/RightSidebar.js\r\nindex 7b07cb6..c4e2010 100644\r\n--- a/src/components/RightSidebar.js\r\n+++ b/src/components/RightSidebar.js\r\n@@ -5,6 +5,8 @@ const { bindActionCreators } = require(\"redux\");\r\n const { isEnabled } = require(\"devtools-config\");\r\n const Svg = require(\"./utils/Svg\");\r\n\r\n+const { getPaused } = require(\"../selectors\");\r\n+\r\n const actions = require(\"../actions\");\r\n const Breakpoints = React.createFactory(require(\"./Breakpoints\"));\r\n const Expressions = React.createFactory(require(\"./Expressions\"));\r\n@@ -61,15 +63,18 @@ const RightSidebar = React.createClass({\r\n\r\n   getItems() {\r\n     const { expressionInputVisibility } = this.state;\r\n+    const { pauseData } = this.props;\r\n\r\n     const items = [\r\n       { header: L10N.getStr(\"breakpoints.header\"),\r\n         component: Breakpoints,\r\n         opened: true },\r\n       { header: L10N.getStr(\"callStack.header\"),\r\n-        component: Frames },\r\n+        component: Frames,\r\n+        shouldOpen: () => !!pauseData },\r\n       { header: L10N.getStr(\"scopes.header\"),\r\n-        component: Scopes }\r\n+        component: Scopes,\r\n+        shouldOpen: () => !!pauseData }\r\n     ];\r\n     if (isEnabled(\"watchExpressions\")) {\r\n       items.unshift({ header: L10N.getStr(\"watchExpressions.header\"),\r\n@@ -97,6 +102,8 @@ const RightSidebar = React.createClass({\r\n });\r\n\r\n module.exports = connect(\r\n-  () => ({}),\r\n+  state => ({\r\n+    pauseData: getPaused(state)\r\n+  }),\r\n   dispatch => bindActionCreators(actions, dispatch)\r\n )(RightSidebar);\r\n```\r\n\r\n\r\nCC @bomsy "}}
{"actor":{"display_login":"jasonLaster"}}