{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/iris/issues/378","repository_url":"https://api.github.com/repos/mozilla/iris","labels_url":"https://api.github.com/repos/mozilla/iris/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/iris/issues/378/comments","events_url":"https://api.github.com/repos/mozilla/iris/issues/378/events","html_url":"https://github.com/mozilla/iris/issues/378","id":321359974,"node_id":"MDU6SXNzdWUzMjEzNTk5NzQ=","number":378,"title":"Fix helper functions for hamburger menu","user":{"login":"mwobensmith","id":3019057,"node_id":"MDQ6VXNlcjMwMTkwNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3019057?v=4","gravatar_id":"","url":"https://api.github.com/users/mwobensmith","html_url":"https://github.com/mwobensmith","followers_url":"https://api.github.com/users/mwobensmith/followers","following_url":"https://api.github.com/users/mwobensmith/following{/other_user}","gists_url":"https://api.github.com/users/mwobensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/mwobensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwobensmith/subscriptions","organizations_url":"https://api.github.com/users/mwobensmith/orgs","repos_url":"https://api.github.com/users/mwobensmith/repos","events_url":"https://api.github.com/users/mwobensmith/events{/privacy}","received_events_url":"https://api.github.com/users/mwobensmith/received_events","type":"User","site_admin":false},"labels":[{"id":944942583,"node_id":"MDU6TGFiZWw5NDQ5NDI1ODM=","url":"https://api.github.com/repos/mozilla/iris/labels/core","name":"core","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"IonutBudeanu","id":29912164,"node_id":"MDQ6VXNlcjI5OTEyMTY0","avatar_url":"https://avatars3.githubusercontent.com/u/29912164?v=4","gravatar_id":"","url":"https://api.github.com/users/IonutBudeanu","html_url":"https://github.com/IonutBudeanu","followers_url":"https://api.github.com/users/IonutBudeanu/followers","following_url":"https://api.github.com/users/IonutBudeanu/following{/other_user}","gists_url":"https://api.github.com/users/IonutBudeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/IonutBudeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IonutBudeanu/subscriptions","organizations_url":"https://api.github.com/users/IonutBudeanu/orgs","repos_url":"https://api.github.com/users/IonutBudeanu/repos","events_url":"https://api.github.com/users/IonutBudeanu/events{/privacy}","received_events_url":"https://api.github.com/users/IonutBudeanu/received_events","type":"User","site_admin":false},"assignees":[{"login":"IonutBudeanu","id":29912164,"node_id":"MDQ6VXNlcjI5OTEyMTY0","avatar_url":"https://avatars3.githubusercontent.com/u/29912164?v=4","gravatar_id":"","url":"https://api.github.com/users/IonutBudeanu","html_url":"https://github.com/IonutBudeanu","followers_url":"https://api.github.com/users/IonutBudeanu/followers","following_url":"https://api.github.com/users/IonutBudeanu/following{/other_user}","gists_url":"https://api.github.com/users/IonutBudeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/IonutBudeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IonutBudeanu/subscriptions","organizations_url":"https://api.github.com/users/IonutBudeanu/orgs","repos_url":"https://api.github.com/users/IonutBudeanu/repos","events_url":"https://api.github.com/users/IonutBudeanu/events{/privacy}","received_events_url":"https://api.github.com/users/IonutBudeanu/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mozilla/iris/milestones/1","html_url":"https://github.com/mozilla/iris/milestone/1","labels_url":"https://api.github.com/repos/mozilla/iris/milestones/1/labels","id":3400025,"node_id":"MDk6TWlsZXN0b25lMzQwMDAyNQ==","number":1,"title":"1.0","description":"Everything targeted for completion prior to Iris 1.0 release.","creator":{"login":"mwobensmith","id":3019057,"node_id":"MDQ6VXNlcjMwMTkwNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3019057?v=4","gravatar_id":"","url":"https://api.github.com/users/mwobensmith","html_url":"https://github.com/mwobensmith","followers_url":"https://api.github.com/users/mwobensmith/followers","following_url":"https://api.github.com/users/mwobensmith/following{/other_user}","gists_url":"https://api.github.com/users/mwobensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/mwobensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwobensmith/subscriptions","organizations_url":"https://api.github.com/users/mwobensmith/orgs","repos_url":"https://api.github.com/users/mwobensmith/repos","events_url":"https://api.github.com/users/mwobensmith/events{/privacy}","received_events_url":"https://api.github.com/users/mwobensmith/received_events","type":"User","site_admin":false},"open_issues":57,"closed_issues":18,"state":"open","created_at":"2018-06-04T19:28:50Z","updated_at":"2018-07-03T18:18:09Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-05-08T21:52:53Z","updated_at":"2018-07-04T14:41:20Z","closed_at":null,"author_association":"COLLABORATOR","body":"We currently have two helper functions in `general.py` that deal with the hamburger menu - `click_hamburger_menu_option` on line 188 and `create_region_from_image` on line 265.\r\n\r\nThe problem is that the latter is generically named to imply that it can create a region from *any* image, but in fact, is hard-coded only to create a region for the hamburger menu. Also, the logic inside it is simple enough that it could be moved back into `click_hamburger_menu_option` instead of its own function.\r\n\r\nFor now, I would recommend replacing line 192 with this:\r\n\r\n`region = Region(hamburger_menu.getX() - 285, hamburger_menu.getY(),  285, 655)`\r\n\r\nAnd eliminating the `create_region_from_image` function completely.\r\n\r\nI will file a separate issue for creating a `create_region_from_image` function that might work better, and when that gets implemented, we can perhaps put it back where it was before.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mozilla/iris/issues/comments/402498502","html_url":"https://github.com/mozilla/iris/issues/378#issuecomment-402498502","issue_url":"https://api.github.com/repos/mozilla/iris/issues/378","id":402498502,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjQ5ODUwMg==","user":{"login":"silviuFlorin","id":28757652,"node_id":"MDQ6VXNlcjI4NzU3NjUy","avatar_url":"https://avatars0.githubusercontent.com/u/28757652?v=4","gravatar_id":"","url":"https://api.github.com/users/silviuFlorin","html_url":"https://github.com/silviuFlorin","followers_url":"https://api.github.com/users/silviuFlorin/followers","following_url":"https://api.github.com/users/silviuFlorin/following{/other_user}","gists_url":"https://api.github.com/users/silviuFlorin/gists{/gist_id}","starred_url":"https://api.github.com/users/silviuFlorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silviuFlorin/subscriptions","organizations_url":"https://api.github.com/users/silviuFlorin/orgs","repos_url":"https://api.github.com/users/silviuFlorin/repos","events_url":"https://api.github.com/users/silviuFlorin/events{/privacy}","received_events_url":"https://api.github.com/users/silviuFlorin/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T14:41:20Z","updated_at":"2018-07-04T14:41:20Z","author_association":"COLLABORATOR","body":"@IonutBudeanu: \r\n\r\n1. In click_hamburger_menu_option() use create_region_for_hamburger_menu() instead of create_region_from_image()\r\n2. Remove create_region_from_image() function\r\n3. Update click_hamburger_menu_option() and create_region_for_hamburger_menu() to raise APIHelperError in case an exception is thrown. \r\n"}}
{"actor":{"display_login":"silviuFlorin"}}