{"action":"created","comment":{"url":"https://api.github.com/repos/coduno/app/pulls/comments/38921907","id":38921907,"diff_hunk":"@@ -54,28 +45,44 @@\n \t\t\t\tchallenges: {\n \t\t\t\t\ttype: Array\n \t\t\t\t},\n-\t\t\t\tchallenge: {\n-\t\t\t\t\ttype: Object\n-\t\t\t\t},\n \t\t\t\tcandidate: {\n \t\t\t\t\ttype: Object,\n \t\t\t\t\treflectToAttribute: true,\n \t\t\t\t\tnotify: true\n-\t\t\t\t},\n-\t\t\t\tsingleChallenge: {\n-\t\t\t\t\ttype: Boolean,\n-\t\t\t\t\tcomputed: 'isSingleChallenge(challenge)'\n \t\t\t\t}\n \t\t\t},\n-\t\t\tisSingleChallenge: function(challenge){\n-\t\t\t\treturn challenge !== undefined;\n-\t\t\t},\n-\t\t\t_setChallenge: function(){\n+\t\t\tobservers: [\n+\t\t\t\t'_afterProperties(challenges, candidate)'\n+\t\t\t],\n+\t\t\t_setChallenge: function () {\n \t\t\t\tthis.candidate.Challenge = this.$.challenges.options[this.$.challenges.selectedIndex].value;\n \t\t\t},\n-\t\t\t_removeItem: function(){\n+\t\t\t_removeItem: function () {\n \t\t\t\tthis.candidate.Removed = true;\n \t\t\t\tthis.remove();\n+\t\t\t},\n+\t\t\t_afterProperties: function () {\n+\t\t\t\tvar option = document.createElement('option');\n+\t\t\t\tif (this.challenges.length === 1) {\n+\t\t\t\t\toption.value = this.challenges[0].Key;\n+\t\t\t\t\toption.innerHTML = this.challenges[0].Name;","path":"app/elements/candidates/invite-candidate-input.html","position":72,"original_position":72,"commit_id":"e8c79da9b59dc98a55d33c6c7687aed5256ff790","original_commit_id":"e8c79da9b59dc98a55d33c6c7687aed5256ff790","user":{"login":"victorbalan","id":9076766,"avatar_url":"https://avatars.githubusercontent.com/u/9076766?v=3","gravatar_id":"","url":"https://api.github.com/users/victorbalan","html_url":"https://github.com/victorbalan","followers_url":"https://api.github.com/users/victorbalan/followers","following_url":"https://api.github.com/users/victorbalan/following{/other_user}","gists_url":"https://api.github.com/users/victorbalan/gists{/gist_id}","starred_url":"https://api.github.com/users/victorbalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorbalan/subscriptions","organizations_url":"https://api.github.com/users/victorbalan/orgs","repos_url":"https://api.github.com/users/victorbalan/repos","events_url":"https://api.github.com/users/victorbalan/events{/privacy}","received_events_url":"https://api.github.com/users/victorbalan/received_events","type":"User","site_admin":false},"body":"instead of doing this you can have a \r\n\r\n```html\r\n<template is=\"dom-if\" if=\"{{isSingleChallenge}}\">\r\n     <p>{{challenges[0].Name}}</p>\r\n</template>\r\n<template is=\"dom-if\" if=\"{{!isSingleChallenge}}\">\r\n    <select items=\"{{challenges}}\" on-change=\"_setChallenge\">\r\n        <option value=\"{{item.Key}}\">{{item.Name}}</option>\r\n    </select>\r\n</template>\r\n\r\n```","created_at":"2015-09-08T13:01:32Z","updated_at":"2015-09-08T13:01:32Z","html_url":"https://github.com/coduno/app/pull/72#discussion_r38921907","pull_request_url":"https://api.github.com/repos/coduno/app/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/coduno/app/pulls/comments/38921907"},"html":{"href":"https://github.com/coduno/app/pull/72#discussion_r38921907"},"pull_request":{"href":"https://api.github.com/repos/coduno/app/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/coduno/app/pulls/72","id":44426168,"html_url":"https://github.com/coduno/app/pull/72","diff_url":"https://github.com/coduno/app/pull/72.diff","patch_url":"https://github.com/coduno/app/pull/72.patch","issue_url":"https://api.github.com/repos/coduno/app/issues/72","number":72,"state":"open","locked":false,"title":"Hotfixes","user":{"login":"pbochis","id":9076897,"avatar_url":"https://avatars.githubusercontent.com/u/9076897?v=3","gravatar_id":"","url":"https://api.github.com/users/pbochis","html_url":"https://github.com/pbochis","followers_url":"https://api.github.com/users/pbochis/followers","following_url":"https://api.github.com/users/pbochis/following{/other_user}","gists_url":"https://api.github.com/users/pbochis/gists{/gist_id}","starred_url":"https://api.github.com/users/pbochis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbochis/subscriptions","organizations_url":"https://api.github.com/users/pbochis/orgs","repos_url":"https://api.github.com/users/pbochis/repos","events_url":"https://api.github.com/users/pbochis/events{/privacy}","received_events_url":"https://api.github.com/users/pbochis/received_events","type":"User","site_admin":false},"body":" * fix logic in invite candidate-card\r\n * make challenge card look nicer\r\n * correctly dispaly the challenge modal","created_at":"2015-09-08T12:31:43Z","updated_at":"2015-09-08T13:01:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"721a45f9aae06cf0213a64b1a0e56dc828b81eb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coduno/app/pulls/72/commits","review_comments_url":"https://api.github.com/repos/coduno/app/pulls/72/comments","review_comment_url":"https://api.github.com/repos/coduno/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coduno/app/issues/72/comments","statuses_url":"https://api.github.com/repos/coduno/app/statuses/e8c79da9b59dc98a55d33c6c7687aed5256ff790","head":{"label":"pbochis:fix-app","ref":"fix-app","sha":"e8c79da9b59dc98a55d33c6c7687aed5256ff790","user":{"login":"pbochis","id":9076897,"avatar_url":"https://avatars.githubusercontent.com/u/9076897?v=3","gravatar_id":"","url":"https://api.github.com/users/pbochis","html_url":"https://github.com/pbochis","followers_url":"https://api.github.com/users/pbochis/followers","following_url":"https://api.github.com/users/pbochis/following{/other_user}","gists_url":"https://api.github.com/users/pbochis/gists{/gist_id}","starred_url":"https://api.github.com/users/pbochis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbochis/subscriptions","organizations_url":"https://api.github.com/users/pbochis/orgs","repos_url":"https://api.github.com/users/pbochis/repos","events_url":"https://api.github.com/users/pbochis/events{/privacy}","received_events_url":"https://api.github.com/users/pbochis/received_events","type":"User","site_admin":false},"repo":{"id":38741409,"name":"app","full_name":"pbochis/app","owner":{"login":"pbochis","id":9076897,"avatar_url":"https://avatars.githubusercontent.com/u/9076897?v=3","gravatar_id":"","url":"https://api.github.com/users/pbochis","html_url":"https://github.com/pbochis","followers_url":"https://api.github.com/users/pbochis/followers","following_url":"https://api.github.com/users/pbochis/following{/other_user}","gists_url":"https://api.github.com/users/pbochis/gists{/gist_id}","starred_url":"https://api.github.com/users/pbochis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbochis/subscriptions","organizations_url":"https://api.github.com/users/pbochis/orgs","repos_url":"https://api.github.com/users/pbochis/repos","events_url":"https://api.github.com/users/pbochis/events{/privacy}","received_events_url":"https://api.github.com/users/pbochis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbochis/app","description":"","fork":true,"url":"https://api.github.com/repos/pbochis/app","forks_url":"https://api.github.com/repos/pbochis/app/forks","keys_url":"https://api.github.com/repos/pbochis/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbochis/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbochis/app/teams","hooks_url":"https://api.github.com/repos/pbochis/app/hooks","issue_events_url":"https://api.github.com/repos/pbochis/app/issues/events{/number}","events_url":"https://api.github.com/repos/pbochis/app/events","assignees_url":"https://api.github.com/repos/pbochis/app/assignees{/user}","branches_url":"https://api.github.com/repos/pbochis/app/branches{/branch}","tags_url":"https://api.github.com/repos/pbochis/app/tags","blobs_url":"https://api.github.com/repos/pbochis/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbochis/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbochis/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbochis/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbochis/app/statuses/{sha}","languages_url":"https://api.github.com/repos/pbochis/app/languages","stargazers_url":"https://api.github.com/repos/pbochis/app/stargazers","contributors_url":"https://api.github.com/repos/pbochis/app/contributors","subscribers_url":"https://api.github.com/repos/pbochis/app/subscribers","subscription_url":"https://api.github.com/repos/pbochis/app/subscription","commits_url":"https://api.github.com/repos/pbochis/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbochis/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbochis/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbochis/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/pbochis/app/contents/{+path}","compare_url":"https://api.github.com/repos/pbochis/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbochis/app/merges","archive_url":"https://api.github.com/repos/pbochis/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbochis/app/downloads","issues_url":"https://api.github.com/repos/pbochis/app/issues{/number}","pulls_url":"https://api.github.com/repos/pbochis/app/pulls{/number}","milestones_url":"https://api.github.com/repos/pbochis/app/milestones{/number}","notifications_url":"https://api.github.com/repos/pbochis/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbochis/app/labels{/name}","releases_url":"https://api.github.com/repos/pbochis/app/releases{/id}","created_at":"2015-07-08T08:21:20Z","updated_at":"2015-08-03T08:17:23Z","pushed_at":"2015-09-08T12:53:30Z","git_url":"git://github.com/pbochis/app.git","ssh_url":"git@github.com:pbochis/app.git","clone_url":"https://github.com/pbochis/app.git","svn_url":"https://github.com/pbochis/app","homepage":null,"size":482,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coduno:master","ref":"master","sha":"13ec7ae89d4b78184ea2c9a2205770983b24335e","user":{"login":"coduno","id":7807200,"avatar_url":"https://avatars.githubusercontent.com/u/7807200?v=3","gravatar_id":"","url":"https://api.github.com/users/coduno","html_url":"https://github.com/coduno","followers_url":"https://api.github.com/users/coduno/followers","following_url":"https://api.github.com/users/coduno/following{/other_user}","gists_url":"https://api.github.com/users/coduno/gists{/gist_id}","starred_url":"https://api.github.com/users/coduno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coduno/subscriptions","organizations_url":"https://api.github.com/users/coduno/orgs","repos_url":"https://api.github.com/users/coduno/repos","events_url":"https://api.github.com/users/coduno/events{/privacy}","received_events_url":"https://api.github.com/users/coduno/received_events","type":"Organization","site_admin":false},"repo":{"id":38739913,"name":"app","full_name":"coduno/app","owner":{"login":"coduno","id":7807200,"avatar_url":"https://avatars.githubusercontent.com/u/7807200?v=3","gravatar_id":"","url":"https://api.github.com/users/coduno","html_url":"https://github.com/coduno","followers_url":"https://api.github.com/users/coduno/followers","following_url":"https://api.github.com/users/coduno/following{/other_user}","gists_url":"https://api.github.com/users/coduno/gists{/gist_id}","starred_url":"https://api.github.com/users/coduno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coduno/subscriptions","organizations_url":"https://api.github.com/users/coduno/orgs","repos_url":"https://api.github.com/users/coduno/repos","events_url":"https://api.github.com/users/coduno/events{/privacy}","received_events_url":"https://api.github.com/users/coduno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coduno/app","description":"Single page app and main interface for Coduno","fork":false,"url":"https://api.github.com/repos/coduno/app","forks_url":"https://api.github.com/repos/coduno/app/forks","keys_url":"https://api.github.com/repos/coduno/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coduno/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coduno/app/teams","hooks_url":"https://api.github.com/repos/coduno/app/hooks","issue_events_url":"https://api.github.com/repos/coduno/app/issues/events{/number}","events_url":"https://api.github.com/repos/coduno/app/events","assignees_url":"https://api.github.com/repos/coduno/app/assignees{/user}","branches_url":"https://api.github.com/repos/coduno/app/branches{/branch}","tags_url":"https://api.github.com/repos/coduno/app/tags","blobs_url":"https://api.github.com/repos/coduno/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coduno/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coduno/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/coduno/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coduno/app/statuses/{sha}","languages_url":"https://api.github.com/repos/coduno/app/languages","stargazers_url":"https://api.github.com/repos/coduno/app/stargazers","contributors_url":"https://api.github.com/repos/coduno/app/contributors","subscribers_url":"https://api.github.com/repos/coduno/app/subscribers","subscription_url":"https://api.github.com/repos/coduno/app/subscription","commits_url":"https://api.github.com/repos/coduno/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/coduno/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/coduno/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/coduno/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/coduno/app/contents/{+path}","compare_url":"https://api.github.com/repos/coduno/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coduno/app/merges","archive_url":"https://api.github.com/repos/coduno/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coduno/app/downloads","issues_url":"https://api.github.com/repos/coduno/app/issues{/number}","pulls_url":"https://api.github.com/repos/coduno/app/pulls{/number}","milestones_url":"https://api.github.com/repos/coduno/app/milestones{/number}","notifications_url":"https://api.github.com/repos/coduno/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coduno/app/labels{/name}","releases_url":"https://api.github.com/repos/coduno/app/releases{/id}","created_at":"2015-07-08T07:51:31Z","updated_at":"2015-08-04T14:22:56Z","pushed_at":"2015-09-08T12:53:30Z","git_url":"git://github.com/coduno/app.git","ssh_url":"git@github.com:coduno/app.git","clone_url":"https://github.com/coduno/app.git","svn_url":"https://github.com/coduno/app","homepage":"https://app.cod.uno/","size":960,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":11,"forks":3,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coduno/app/pulls/72"},"html":{"href":"https://github.com/coduno/app/pull/72"},"issue":{"href":"https://api.github.com/repos/coduno/app/issues/72"},"comments":{"href":"https://api.github.com/repos/coduno/app/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/coduno/app/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/coduno/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coduno/app/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/coduno/app/statuses/e8c79da9b59dc98a55d33c6c7687aed5256ff790"}}}}