{"action":"created","issue":{"url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/86","repository_url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web","labels_url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/86/comments","events_url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/86/events","html_url":"https://github.com/TheCacophonyProject/cacophony-web/pull/86","id":337342498,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTU1MDEy","number":86,"title":"Add autocomplete text field for device selection","user":{"login":"arthurmcgregor","id":24260476,"node_id":"MDQ6VXNlcjI0MjYwNDc2","avatar_url":"https://avatars1.githubusercontent.com/u/24260476?v=4","gravatar_id":"","url":"https://api.github.com/users/arthurmcgregor","html_url":"https://github.com/arthurmcgregor","followers_url":"https://api.github.com/users/arthurmcgregor/followers","following_url":"https://api.github.com/users/arthurmcgregor/following{/other_user}","gists_url":"https://api.github.com/users/arthurmcgregor/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurmcgregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurmcgregor/subscriptions","organizations_url":"https://api.github.com/users/arthurmcgregor/orgs","repos_url":"https://api.github.com/users/arthurmcgregor/repos","events_url":"https://api.github.com/users/arthurmcgregor/events{/privacy}","received_events_url":"https://api.github.com/users/arthurmcgregor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-02T01:36:19Z","updated_at":"2018-07-02T02:53:56Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/pulls/86","html_url":"https://github.com/TheCacophonyProject/cacophony-web/pull/86","diff_url":"https://github.com/TheCacophonyProject/cacophony-web/pull/86.diff","patch_url":"https://github.com/TheCacophonyProject/cacophony-web/pull/86.patch"},"body":"For device selection, I've added a new text field which has autocomplete enabled called 'filter'. As you type it will show a list of devices. When you click on the device you want, it will clear the autocomplete box and change the device select to that device.\r\n\r\nI have kept the select dropdown in addition to the new text field because newbies like me won't know device names so won't know what to type. In addition, it was an easy way to store and return the device id which is needed for the query.\r\n\r\nSomething to consider is only displaying the filter field when there is (say) 10 or more devices. This means it will only be shown for users who would actually benefit from it being there.\r\n\r\n![device_autocomplete](https://user-images.githubusercontent.com/24260476/42141369-d65dcdc6-7dfc-11e8-88eb-7dbb1ec3f6ef.png)\r\n\r\nReferences #81 "},"comment":{"url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/comments/401657816","html_url":"https://github.com/TheCacophonyProject/cacophony-web/pull/86#issuecomment-401657816","issue_url":"https://api.github.com/repos/TheCacophonyProject/cacophony-web/issues/86","id":401657816,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTY1NzgxNg==","user":{"login":"arthurmcgregor","id":24260476,"node_id":"MDQ6VXNlcjI0MjYwNDc2","avatar_url":"https://avatars1.githubusercontent.com/u/24260476?v=4","gravatar_id":"","url":"https://api.github.com/users/arthurmcgregor","html_url":"https://github.com/arthurmcgregor","followers_url":"https://api.github.com/users/arthurmcgregor/followers","following_url":"https://api.github.com/users/arthurmcgregor/following{/other_user}","gists_url":"https://api.github.com/users/arthurmcgregor/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurmcgregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurmcgregor/subscriptions","organizations_url":"https://api.github.com/users/arthurmcgregor/orgs","repos_url":"https://api.github.com/users/arthurmcgregor/repos","events_url":"https://api.github.com/users/arthurmcgregor/events{/privacy}","received_events_url":"https://api.github.com/users/arthurmcgregor/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T02:53:55Z","updated_at":"2018-07-02T02:53:55Z","author_association":"COLLABORATOR","body":"How about something like this? (In terms of functionality at least)\r\nhttps://semantic-ui.com/modules/dropdown.html#multiple-search-selection\r\n\r\nWe could include device groups as well (with an icon to distinguish from devices) "}}
{"actor":{"display_login":"arthurmcgregor"}}