{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/346","repository_url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript","labels_url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/346/comments","events_url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/346/events","html_url":"https://github.com/Microsoft/PowerBI-JavaScript/pull/346","id":369391261,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMzQzNDM2","number":346,"title":"Fix bug when multiple embeds have no or duplicated element id","user":{"login":"oceantume","id":1060971,"node_id":"MDQ6VXNlcjEwNjA5NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1060971?v=4","gravatar_id":"","url":"https://api.github.com/users/oceantume","html_url":"https://github.com/oceantume","followers_url":"https://api.github.com/users/oceantume/followers","following_url":"https://api.github.com/users/oceantume/following{/other_user}","gists_url":"https://api.github.com/users/oceantume/gists{/gist_id}","starred_url":"https://api.github.com/users/oceantume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oceantume/subscriptions","organizations_url":"https://api.github.com/users/oceantume/orgs","repos_url":"https://api.github.com/users/oceantume/repos","events_url":"https://api.github.com/users/oceantume/events{/privacy}","received_events_url":"https://api.github.com/users/oceantume/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-12T04:04:33Z","updated_at":"2018-10-15T12:45:35Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/pulls/346","html_url":"https://github.com/Microsoft/PowerBI-JavaScript/pull/346","diff_url":"https://github.com/Microsoft/PowerBI-JavaScript/pull/346.diff","patch_url":"https://github.com/Microsoft/PowerBI-JavaScript/pull/346.patch"},"body":"This bug caused multiple embeds to break when the elements had no id or\r\nduplicated ids. This broke event handling and some interaction features.\r\n\r\nChange Service.addOrOverwriteEmbed algorithm that compared elements by\r\ntheir id so that it now directly compares elements by reference equality.\r\n\r\nExpand the service init test to include three different tests covering\r\ninitialization of multiple embeds with different element id\r\nconfigurations (with id, without id*, with duplicated id*)\r\n\r\n** These two tests will fail without the fix applied to service.ts"},"comment":{"url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/comments/429839114","html_url":"https://github.com/Microsoft/PowerBI-JavaScript/pull/346#issuecomment-429839114","issue_url":"https://api.github.com/repos/Microsoft/PowerBI-JavaScript/issues/346","id":429839114,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTgzOTExNA==","user":{"login":"oceantume","id":1060971,"node_id":"MDQ6VXNlcjEwNjA5NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1060971?v=4","gravatar_id":"","url":"https://api.github.com/users/oceantume","html_url":"https://github.com/oceantume","followers_url":"https://api.github.com/users/oceantume/followers","following_url":"https://api.github.com/users/oceantume/following{/other_user}","gists_url":"https://api.github.com/users/oceantume/gists{/gist_id}","starred_url":"https://api.github.com/users/oceantume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oceantume/subscriptions","organizations_url":"https://api.github.com/users/oceantume/orgs","repos_url":"https://api.github.com/users/oceantume/repos","events_url":"https://api.github.com/users/oceantume/events{/privacy}","received_events_url":"https://api.github.com/users/oceantume/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T12:45:35Z","updated_at":"2018-10-15T12:45:35Z","author_association":"NONE","body":"While it is not recommended, re-using ID's is possible and that use-case was also broken by this bug. The reason why I added the three tests is to ensure that it now works properly regardless of the IDs of the elements. This test also verifies the number of \"components\" (elements) that are controlled by the API, something that wasn't really tested elsewhere because the Service instance is re-used and keeps references to elements that don't exist anymore."}}
{"actor":{"display_login":"oceantume"}}