{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/comments/78977915","id":78977915,"diff_hunk":"@@ -25,15 +53,308 @@ export default Component.extend({\n \t\treturn i18n.t(this.get('model.placeholder-inactive.key'), {ns: 'design-system'});\n \t}),\n \n+\tdidInsertElement() {\n+\t\tEmber.$(document).bind('click.global-navigation-search-suggestions', {\n+\t\t\tcomponent: this\n+\t\t}, this.onClickOutsideSuggestions);\n+\t},\n+\n+\twillDestroyElement() {\n+\t\tEmber.$(document).unbind('click.global-navigation-search-suggestions', this.onClickOutsideSuggestions);\n+\t},\n+\n \tactions: {\n \t\tfocusSearch() {\n \t\t\tthis.set('searchIsActive', true);\n \t\t\tthis.sendAction('activateSearch');\n \t\t},\n \n \t\tcloseSearch() {\n-\t\t\tthis.set('searchIsActive', false);\n+\t\t\tthis.setProperties({\n+\t\t\t\tquery: '',\n+\t\t\t\tsearchIsActive: false\n+\t\t\t});\n+\t\t\tthis.setSearchSuggestionItems();\n \t\t\tthis.sendAction('deactivateSearch');\n+\t\t},\n+\n+\t\tqueryChanged(query) {\n+\t\t\tthis.set('query', query);\n+\t\t\tthis.updateSuggestions(query);\n+\t\t},\n+\n+\t\tkeyPress(event) {\n+\t\t\tconst numSuggestions = this.get('suggestions.length'),\n+\t\t\t\tcurrentSelection = this.get('selectedSuggestion');\n+\n+\t\t\tif (!numSuggestions) {\n+\t\t\t\treturn;\n+\t\t\t}\n+\n+\t\t\tif (event.keyCode === 40 && currentSelection < numSuggestions - 1) {\n+\t\t\t\tthis.set('selectedSuggestion', currentSelection + 1);","path":"front/main/app/components/design-system/global-navigation-search.js","position":91,"original_position":91,"commit_id":"f56d9a9447f009ee07037d2f834637943d5beeeb","original_commit_id":"f56d9a9447f009ee07037d2f834637943d5beeeb","user":{"login":"rogatty","id":7030884,"avatar_url":"https://avatars.githubusercontent.com/u/7030884?v=3","gravatar_id":"","url":"https://api.github.com/users/rogatty","html_url":"https://github.com/rogatty","followers_url":"https://api.github.com/users/rogatty/followers","following_url":"https://api.github.com/users/rogatty/following{/other_user}","gists_url":"https://api.github.com/users/rogatty/gists{/gist_id}","starred_url":"https://api.github.com/users/rogatty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogatty/subscriptions","organizations_url":"https://api.github.com/users/rogatty/orgs","repos_url":"https://api.github.com/users/rogatty/repos","events_url":"https://api.github.com/users/rogatty/events{/privacy}","received_events_url":"https://api.github.com/users/rogatty/received_events","type":"User","site_admin":false},"body":"We can use `this.incrementProperty('selectedSuggestion')`","created_at":"2016-09-15T14:33:02Z","updated_at":"2016-09-15T14:33:02Z","html_url":"https://github.com/Wikia/mercury/pull/2789#discussion_r78977915","pull_request_url":"https://api.github.com/repos/Wikia/mercury/pulls/2789","_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments/78977915"},"html":{"href":"https://github.com/Wikia/mercury/pull/2789#discussion_r78977915"},"pull_request":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2789"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/2789","id":85382008,"html_url":"https://github.com/Wikia/mercury/pull/2789","diff_url":"https://github.com/Wikia/mercury/pull/2789.diff","patch_url":"https://github.com/Wikia/mercury/pull/2789.patch","issue_url":"https://api.github.com/repos/Wikia/mercury/issues/2789","number":2789,"state":"open","locked":false,"title":"XW-1910 | Add Search Suggestions to Global Navigation","user":{"login":"rogatty","id":7030884,"avatar_url":"https://avatars.githubusercontent.com/u/7030884?v=3","gravatar_id":"","url":"https://api.github.com/users/rogatty","html_url":"https://github.com/rogatty","followers_url":"https://api.github.com/users/rogatty/followers","following_url":"https://api.github.com/users/rogatty/following{/other_user}","gists_url":"https://api.github.com/users/rogatty/gists{/gist_id}","starred_url":"https://api.github.com/users/rogatty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogatty/subscriptions","organizations_url":"https://api.github.com/users/rogatty/orgs","repos_url":"https://api.github.com/users/rogatty/repos","events_url":"https://api.github.com/users/rogatty/events{/privacy}","received_events_url":"https://api.github.com/users/rogatty/received_events","type":"User","site_admin":false},"body":"## Links\r\n\r\n* https://wikia-inc.atlassian.net/browse/XW-1910\r\n\r\n## Description\r\n\r\nReuse logic from `wikia-search` component. We should remove the old component when working on the mobile version of new Global Navigation.\r\n\r\n## Reviewers\r\n\r\n@Wikia/x-wing ","created_at":"2016-09-15T10:48:22Z","updated_at":"2016-09-15T14:33:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d32b38b270aa70fad0b5502ea6d04b295184df10","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/mercury/pulls/2789/commits","review_comments_url":"https://api.github.com/repos/Wikia/mercury/pulls/2789/comments","review_comment_url":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/mercury/issues/2789/comments","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/f56d9a9447f009ee07037d2f834637943d5beeeb","head":{"label":"Wikia:XW-1910","ref":"XW-1910","sha":"f56d9a9447f009ee07037d2f834637943d5beeeb","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-07-15T09:13:39Z","pushed_at":"2016-09-15T14:30:24Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":95263,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":22,"forks":8,"open_issues":22,"watchers":12,"default_branch":"dev"}},"base":{"label":"Wikia:ds-global-navigation","ref":"ds-global-navigation","sha":"c7ec776c05fefbb10c6a83140987b4d3248e3f00","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-07-15T09:13:39Z","pushed_at":"2016-09-15T14:30:24Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":95263,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":22,"forks":8,"open_issues":22,"watchers":12,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2789"},"html":{"href":"https://github.com/Wikia/mercury/pull/2789"},"issue":{"href":"https://api.github.com/repos/Wikia/mercury/issues/2789"},"comments":{"href":"https://api.github.com/repos/Wikia/mercury/issues/2789/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2789/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2789/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/mercury/statuses/f56d9a9447f009ee07037d2f834637943d5beeeb"}}}}
{"actor":{"display_login":"rogatty"}}