{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/8256","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/8256/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/8256/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/8256/events","html_url":"https://github.com/bokeh/bokeh/pull/8256","id":361866050,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NzI5Mzg3","number":8256,"title":"add plumbing to make legends update changes","user":{"login":"bryevdv","id":1078448,"node_id":"MDQ6VXNlcjEwNzg0NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1078448?v=4","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"labels":[{"id":88662516,"node_id":"MDU6TGFiZWw4ODY2MjUxNg==","url":"https://api.github.com/repos/bokeh/bokeh/labels/status:%20ready","name":"status: ready","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T18:11:33Z","updated_at":"2018-09-19T18:13:05Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/8256","html_url":"https://github.com/bokeh/bokeh/pull/8256","diff_url":"https://github.com/bokeh/bokeh/pull/8256.diff","patch_url":"https://github.com/bokeh/bokeh/pull/8256.patch"},"body":"- [x] issues: fixes #589\r\n\r\nRe: testing, there is not any good current way. This needs an integration/selenium test since it involves executing an interaction to make an update to legend state. It's not merely enough to inspect the state however, the test needs to confirm the render (that was the actual issue to fix). That will require \"image-diff\" integration tests, which we do not have yet. I will add an issue to add those, and start a list linking back to specific issues like this that need one. \r\n\r\nTest script:\r\n```\r\nfrom bokeh.io import curdoc\r\nfrom bokeh.layouts import column\r\nfrom bokeh.plotting import figure\r\nfrom bokeh.models import Button\r\n\r\nx = [1,2,3,4,5, 10]\r\ny = [5,6,2,3,4,10]\r\n\r\np = figure()\r\nr = p.line(x, y, legend=\"foo\")\r\n\r\ndef cb():\r\n    p.circle(x, y, legend=\"foo\")\r\n    r.glyph.line_dash = \"dotted\"\r\n    r.glyph.line_color = \"black\"\r\n    p.line([1,4,8], [2, 12, 6], line_color=\"red\", legend=\"bar\")\r\n    p.legend.background_fill_color = \"blue\"\r\n    p.legend.background_fill_alpha = 0.2\r\n\r\nbutton = Button()\r\nbutton.on_click(cb)\r\n\r\ncurdoc().add_root(column(p, button))\r\n```\r\n\r\nBefore:\r\n\r\n<img width=\"469\" alt=\"screen shot 2018-09-19 at 11 06 48\" src=\"https://user-images.githubusercontent.com/1078448/45772412-72faec80-bbfc-11e8-9964-94ee2547356c.png\">\r\n\r\nAfter:\r\n\r\n<img width=\"464\" alt=\"screen shot 2018-09-19 at 11 06 56\" src=\"https://user-images.githubusercontent.com/1078448/45772415-77bfa080-bbfc-11e8-86f4-e694d59255a0.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/422904963","html_url":"https://github.com/bokeh/bokeh/pull/8256#issuecomment-422904963","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/8256","id":422904963,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjkwNDk2Mw==","user":{"login":"bryevdv","id":1078448,"node_id":"MDQ6VXNlcjEwNzg0NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1078448?v=4","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T18:13:05Z","updated_at":"2018-09-19T18:13:05Z","author_association":"MEMBER","body":"cc @mattpap in case you have any comments. I don't think this is perfect, but I think it is actually much more simple and robust than trying to connect/disconnect things dynamically. "}}
{"actor":{"display_login":"bryevdv"}}