{"action":"opened","issue":{"url":"https://api.github.com/repos/mozilla/addons-frontend/issues/5879","repository_url":"https://api.github.com/repos/mozilla/addons-frontend","labels_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/5879/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/5879/comments","events_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/5879/events","html_url":"https://github.com/mozilla/addons-frontend/issues/5879","id":348703302,"node_id":"MDU6SXNzdWUzNDg3MDMzMDI=","number":5879,"title":"react-onclickoutside breaks shallowUntilTarget","user":{"login":"willdurand","id":217628,"node_id":"MDQ6VXNlcjIxNzYyOA==","avatar_url":"https://avatars0.githubusercontent.com/u/217628?v=4","gravatar_id":"","url":"https://api.github.com/users/willdurand","html_url":"https://github.com/willdurand","followers_url":"https://api.github.com/users/willdurand/followers","following_url":"https://api.github.com/users/willdurand/following{/other_user}","gists_url":"https://api.github.com/users/willdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/willdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willdurand/subscriptions","organizations_url":"https://api.github.com/users/willdurand/orgs","repos_url":"https://api.github.com/users/willdurand/repos","events_url":"https://api.github.com/users/willdurand/events{/privacy}","received_events_url":"https://api.github.com/users/willdurand/received_events","type":"User","site_admin":false},"labels":[{"id":357492876,"node_id":"MDU6TGFiZWwzNTc0OTI4NzY=","url":"https://api.github.com/repos/mozilla/addons-frontend/labels/component:%20code%20quality","name":"component: code quality","color":"107c05","default":false},{"id":820355113,"node_id":"MDU6TGFiZWw4MjAzNTUxMTM=","url":"https://api.github.com/repos/mozilla/addons-frontend/labels/priority:%20p4","name":"priority: p4","color":"5a0002","default":false},{"id":430754745,"node_id":"MDU6TGFiZWw0MzA3NTQ3NDU=","url":"https://api.github.com/repos/mozilla/addons-frontend/labels/qa:%20not%20needed","name":"qa: not needed","color":"fef1af","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-08T12:25:51Z","updated_at":"2018-08-08T12:25:51Z","closed_at":null,"author_association":"MEMBER","body":"For some reasons, the `react-onclickoutside` HOC does not work with `shallowUntilTarget()` unless we disable the lifecycle methods:\r\n\r\n```js\r\n  const renderComponent = (componentInstance, target) => {\r\n    return shallowUntilTarget(componentInstance, target, {\r\n      // TODO: ideally, we would like to enable the lifecycle methods, but it\r\n      // produces unexpected errors, related to Enzyme 3.\r\n      // See: http://airbnb.io/enzyme/docs/guides/migration-from-2-to-3.html#lifecycle-methods.\r\n      shallowOptions: { disableLifecycleMethods: true },\r\n    });\r\n  };\r\n```\r\n\r\nWe have this code in the `DropdownMenu` component and I have added it to the `InfoDialog` component too. We should investigate to see what the root cause is and potentially fix the issue to avoid disabling the lifecycle methods.\r\n\r\nIf that does not work at all, well... let's use this issue as documentation."}}
{"actor":{"display_login":"willdurand"}}