{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/comments/31745529","id":31745529,"diff_hunk":"@@ -71,116 +69,85 @@\n \n     properties: {\n       /**\n-       * Fired when the selected element changes to user interaction.\n+       * If you want to use the attribute value of an element for `selected` instead of the index,\n+       * set this to the name of the attribute.\n        *\n-       * @event paper-radio-group-changed\n+       * @attribute attrForSelected\n+       * @type {string}\n        */\n-\n-      /**\n-       * Gets or sets the selected element. Use the `name` attribute of the\n-       * <paper-radio-button> that should be selected.\n-       *\n-       * @attribute selected\n-       * @type String\n-       * @default null\n-       */\n-\n-      selected: {\n+      attrForSelected: {\n         type: String,\n-        value: null,\n-        notify: true,\n-        reflectToAttribute: true,\n-        observer: \"_selectedChanged\"\n+        value: \"name\",\n+        readOnly: true\n       }\n     },\n \n     keyBindings: {\n-      'left up': '_selectPrevious',\n-      'right down': '_selectNext',\n+      'left up': 'selectPrevious',\n+      'right down': 'selectNext',\n     },\n \n-    _selectedChanged: function() {\n+    ready: function() {\n       // TODO: This only needs to be async while a domReady event is unavailable.\n-      this.async(function() {\n-        this._selectIndex(this._valueToIndex(this.items, this.selected));\n-        this.fire('paper-radio-group-changed');\n-      });\n+      if (this.selected) {\n+        this.async(function() {\n+          this._valueToItem(this.selected).checked = true;\n+        });\n+      }\n     },\n \n-    _selectNext: function() {\n-      this.selected = this._nextNode();\n-    },\n+    /**\n+     * Selects the given value.\n+     *\n+     * @method select","path":"paper-radio-group.html","position":98,"original_position":98,"commit_id":"0e63398117a57ab1d61e6484c58bf33b96db6be5","original_commit_id":"0e63398117a57ab1d61e6484c58bf33b96db6be5","user":{"login":"cdata","id":240083,"avatar_url":"https://avatars.githubusercontent.com/u/240083?v=3","gravatar_id":"","url":"https://api.github.com/users/cdata","html_url":"https://github.com/cdata","followers_url":"https://api.github.com/users/cdata/followers","following_url":"https://api.github.com/users/cdata/following{/other_user}","gists_url":"https://api.github.com/users/cdata/gists{/gist_id}","starred_url":"https://api.github.com/users/cdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdata/subscriptions","organizations_url":"https://api.github.com/users/cdata/orgs","repos_url":"https://api.github.com/users/cdata/repos","events_url":"https://api.github.com/users/cdata/events{/privacy}","received_events_url":"https://api.github.com/users/cdata/received_events","type":"User","site_admin":false},"body":"Is the `@method` doc actually used by our doc viewer or the compiler?","created_at":"2015-06-04T17:47:27Z","updated_at":"2015-06-04T17:47:27Z","html_url":"https://github.com/PolymerElements/paper-radio-group/pull/9#discussion_r31745529","pull_request_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/comments/31745529"},"html":{"href":"https://github.com/PolymerElements/paper-radio-group/pull/9#discussion_r31745529"},"pull_request":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9","id":36887146,"html_url":"https://github.com/PolymerElements/paper-radio-group/pull/9","diff_url":"https://github.com/PolymerElements/paper-radio-group/pull/9.diff","patch_url":"https://github.com/PolymerElements/paper-radio-group/pull/9.patch","issue_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/9","number":9,"state":"open","locked":false,"title":"clean up and use behaviours","user":{"login":"notwaldorf","id":1369170,"avatar_url":"https://avatars.githubusercontent.com/u/1369170?v=3","gravatar_id":"","url":"https://api.github.com/users/notwaldorf","html_url":"https://github.com/notwaldorf","followers_url":"https://api.github.com/users/notwaldorf/followers","following_url":"https://api.github.com/users/notwaldorf/following{/other_user}","gists_url":"https://api.github.com/users/notwaldorf/gists{/gist_id}","starred_url":"https://api.github.com/users/notwaldorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notwaldorf/subscriptions","organizations_url":"https://api.github.com/users/notwaldorf/orgs","repos_url":"https://api.github.com/users/notwaldorf/repos","events_url":"https://api.github.com/users/notwaldorf/events{/privacy}","received_events_url":"https://api.github.com/users/notwaldorf/received_events","type":"User","site_admin":false},"body":"This element got ported before `iron-selectable` the behaviour came around, so it's been needing some TLC since then.\r\n\r\nI've also:\r\n- fixed https://github.com/PolymerElements/paper-radio-button/issues/28, and prevented deselecting the active, selected item\r\n- removed the initial `paper-radio-group-changed` event that fired when setting the initial `selected` value. I don't think it makes sense, but I am not opposed to adding it back.\r\n- cleaned up the tests to make more sense out of the `async` call in `ready()` (which is needed to check a radio-button after it's been added to the dom)\r\n- cleaned up all the copy pasta that already lives happily in `iron-selectable`\r\n\r\n/cc @cdata @morethanreal ","created_at":"2015-06-03T22:57:36Z","updated_at":"2015-06-04T17:47:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98d530882df8218bb34bf830c08c154ece4d4000","assignee":{"login":"cdata","id":240083,"avatar_url":"https://avatars.githubusercontent.com/u/240083?v=3","gravatar_id":"","url":"https://api.github.com/users/cdata","html_url":"https://github.com/cdata","followers_url":"https://api.github.com/users/cdata/followers","following_url":"https://api.github.com/users/cdata/following{/other_user}","gists_url":"https://api.github.com/users/cdata/gists{/gist_id}","starred_url":"https://api.github.com/users/cdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdata/subscriptions","organizations_url":"https://api.github.com/users/cdata/orgs","repos_url":"https://api.github.com/users/cdata/repos","events_url":"https://api.github.com/users/cdata/events{/privacy}","received_events_url":"https://api.github.com/users/cdata/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9/commits","review_comments_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9/comments","review_comment_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/9/comments","statuses_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/statuses/0e63398117a57ab1d61e6484c58bf33b96db6be5","head":{"label":"PolymerElements:fix-self-selection","ref":"fix-self-selection","sha":"0e63398117a57ab1d61e6484c58bf33b96db6be5","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34275039,"name":"paper-radio-group","full_name":"PolymerElements/paper-radio-group","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-radio-group","description":"A group of Material Design radio buttons","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-radio-group","forks_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/releases{/id}","created_at":"2015-04-20T17:23:05Z","updated_at":"2015-06-01T10:15:06Z","pushed_at":"2015-06-04T01:03:40Z","git_url":"git://github.com/PolymerElements/paper-radio-group.git","ssh_url":"git@github.com:PolymerElements/paper-radio-group.git","clone_url":"https://github.com/PolymerElements/paper-radio-group.git","svn_url":"https://github.com/PolymerElements/paper-radio-group","homepage":null,"size":376,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"PolymerElements:master","ref":"master","sha":"b69ba0adcdc5e43773933e91009298360363b7bb","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34275039,"name":"paper-radio-group","full_name":"PolymerElements/paper-radio-group","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-radio-group","description":"A group of Material Design radio buttons","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-radio-group","forks_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-radio-group/releases{/id}","created_at":"2015-04-20T17:23:05Z","updated_at":"2015-06-01T10:15:06Z","pushed_at":"2015-06-04T01:03:40Z","git_url":"git://github.com/PolymerElements/paper-radio-group.git","ssh_url":"git@github.com:PolymerElements/paper-radio-group.git","clone_url":"https://github.com/PolymerElements/paper-radio-group.git","svn_url":"https://github.com/PolymerElements/paper-radio-group","homepage":null,"size":376,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9"},"html":{"href":"https://github.com/PolymerElements/paper-radio-group/pull/9"},"issue":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/9"},"comments":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerElements/paper-radio-group/statuses/0e63398117a57ab1d61e6484c58bf33b96db6be5"}}}}