{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipywidgets/issues/131","labels_url":"https://api.github.com/repos/ipython/ipywidgets/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipywidgets/issues/131/comments","events_url":"https://api.github.com/repos/ipython/ipywidgets/issues/131/events","html_url":"https://github.com/ipython/ipywidgets/pull/131","id":98859571,"number":131,"title":"Fixes to Accordion widget","user":{"login":"mwcraig","id":1147167,"avatar_url":"https://avatars.githubusercontent.com/u/1147167?v=3","gravatar_id":"","url":"https://api.github.com/users/mwcraig","html_url":"https://github.com/mwcraig","followers_url":"https://api.github.com/users/mwcraig/followers","following_url":"https://api.github.com/users/mwcraig/following{/other_user}","gists_url":"https://api.github.com/users/mwcraig/gists{/gist_id}","starred_url":"https://api.github.com/users/mwcraig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwcraig/subscriptions","organizations_url":"https://api.github.com/users/mwcraig/orgs","repos_url":"https://api.github.com/users/mwcraig/repos","events_url":"https://api.github.com/users/mwcraig/events{/privacy}","received_events_url":"https://api.github.com/users/mwcraig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ipython/ipywidgets/labels/bug%20fix","name":"bug fix","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ipython/ipywidgets/milestones/3","html_url":"https://github.com/ipython/ipywidgets/milestones/4.0","labels_url":"https://api.github.com/repos/ipython/ipywidgets/milestones/3/labels","id":1097580,"number":3,"title":"4.0","description":null,"creator":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":85,"state":"open","created_at":"2015-05-05T20:17:39Z","updated_at":"2015-08-04T16:41:02Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-08-03T23:49:30Z","updated_at":"2015-08-04T16:41:46Z","closed_at":"2015-08-04T16:40:57Z","pull_request":{"url":"https://api.github.com/repos/ipython/ipywidgets/pulls/131","html_url":"https://github.com/ipython/ipywidgets/pull/131","diff_url":"https://github.com/ipython/ipywidgets/pull/131.diff","patch_url":"https://github.com/ipython/ipywidgets/pull/131.patch"},"body":"There are a couple of issues that come up if you try nesting accordion widgets:\r\n\r\n+ The title of an accordion widget panel containing an accordion widget gets applied to all panels of that sub-accordion widget.\r\n+ When an accordion widget panel containing an accordion widget gets opened, all panels of the sub-accordion widget also get opened.\r\n\r\nThis PR fixes those issues and checks with an index is in range before trying to close it when the `selected_index` is updated. That silences a couple of javascript errors that otherwise occur if you set `selected_index=-1` when you create the widget start the widget with all panels closed.\r\n\r\nI wasn't sure how to test this sort of thing so no tests are included....happy to add them if you want.\r\n\r\nI'll add a couple screenshots in a moment and a link to a sample notebook that demonstrates the problem.\r\n "},"comment":{"url":"https://api.github.com/repos/ipython/ipywidgets/issues/comments/127669158","html_url":"https://github.com/ipython/ipywidgets/pull/131#issuecomment-127669158","issue_url":"https://api.github.com/repos/ipython/ipywidgets/issues/131","id":127669158,"user":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T16:41:46Z","updated_at":"2015-08-04T16:41:46Z","body":"Yes, +1"}}