{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/3944","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/3944/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/3944/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/3944/events","html_url":"https://github.com/bokeh/bokeh/pull/3944","id":136558277,"number":3944,"title":"Issue 3943: vform should remove children from document root","user":{"login":"clairetang6","id":4241244,"avatar_url":"https://avatars.githubusercontent.com/u/4241244?v=3","gravatar_id":"","url":"https://api.github.com/users/clairetang6","html_url":"https://github.com/clairetang6","followers_url":"https://api.github.com/users/clairetang6/followers","following_url":"https://api.github.com/users/clairetang6/following{/other_user}","gists_url":"https://api.github.com/users/clairetang6/gists{/gist_id}","starred_url":"https://api.github.com/users/clairetang6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clairetang6/subscriptions","organizations_url":"https://api.github.com/users/clairetang6/orgs","repos_url":"https://api.github.com/users/clairetang6/repos","events_url":"https://api.github.com/users/clairetang6/events{/privacy}","received_events_url":"https://api.github.com/users/clairetang6/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/status:%20WIP","name":"status: WIP","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-26T00:38:08Z","updated_at":"2016-03-03T07:33:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/3944","html_url":"https://github.com/bokeh/bokeh/pull/3944","diff_url":"https://github.com/bokeh/bokeh/pull/3944.diff","patch_url":"https://github.com/bokeh/bokeh/pull/3944.patch"},"body":"The layout generation methods in bokeh.io (gridplot, hplot, vplot, vform) allow a user to create a layout by passing in subplots, which can be other layouts. For convenience, these methods add the layout to the document root and \"push or save\" the new state. To allow for nesting of layouts, these methods also remove any of the subplots from the document root. This was done for gridplot, hplot, and vplot, but not for vform which caused bugs when other layouts were passed as children to vform. \r\n\r\nThere's an example of the bug in the [issue (#3943)](https://github.com/bokeh/bokeh/issues/3943) that I posted. \r\n\r\nI just added a call to remove the children passed to vform from the document root. I also added some tests to test_io.py for the layout generation methods. There are two tests for each method, testing that the method produces a layout that is added to the document root and testing that its children are removed from the document root. This second test fails for vform before this fix. "},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/191630897","html_url":"https://github.com/bokeh/bokeh/pull/3944#issuecomment-191630897","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/3944","id":191630897,"user":{"login":"clairetang6","id":4241244,"avatar_url":"https://avatars.githubusercontent.com/u/4241244?v=3","gravatar_id":"","url":"https://api.github.com/users/clairetang6","html_url":"https://github.com/clairetang6","followers_url":"https://api.github.com/users/clairetang6/followers","following_url":"https://api.github.com/users/clairetang6/following{/other_user}","gists_url":"https://api.github.com/users/clairetang6/gists{/gist_id}","starred_url":"https://api.github.com/users/clairetang6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clairetang6/subscriptions","organizations_url":"https://api.github.com/users/clairetang6/orgs","repos_url":"https://api.github.com/users/clairetang6/repos","events_url":"https://api.github.com/users/clairetang6/events{/privacy}","received_events_url":"https://api.github.com/users/clairetang6/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T07:33:29Z","updated_at":"2016-03-03T07:33:29Z","body":"@bryevdv I don't have anything else to add to it, unless you think the other widgets that have children, like the Tabs or Panels should be looked at. I saw the additional [comment](https://github.com/bokeh/bokeh/issues/3943#issuecomment-191460079) on the issue this pull request is supposed to address, but I haven't looked through any of the source code for that. Maybe you know if there would be easy wins there too? Otherwise, my one-line patch is an easy fix for the exact issue I found. \r\n\r\nI'm also looking forward to seeing how the layout work progresses! "}}