{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/joist/issues/183","repository_url":"https://api.github.com/repos/phetsims/joist","labels_url":"https://api.github.com/repos/phetsims/joist/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/joist/issues/183/comments","events_url":"https://api.github.com/repos/phetsims/joist/issues/183/events","html_url":"https://github.com/phetsims/joist/issues/183","id":48692530,"number":183,"title":"factor out HomeScreenButton","user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"labels":[{"id":36918532,"url":"https://api.github.com/repos/phetsims/joist/labels/dev:enhancement","name":"dev:enhancement","color":"0276FD","default":false},{"id":244259774,"url":"https://api.github.com/repos/phetsims/joist/labels/dev:phet-io","name":"dev:phet-io","color":"1FFFFF","default":false}],"state":"open","locked":false,"assignee":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"assignees":[{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2014-11-13T21:12:42Z","updated_at":"2016-12-08T01:34:22Z","closed_at":null,"body":"The screen buttons should be revisited.  We should decide if we are going to use a starting point of (a) JoistButton as defined in https://github.com/phetsims/joist/issues/182 or (b) the new radio buttons as discussed here: https://github.com/phetsims/sun/issues/127\n"},"comment":{"url":"https://api.github.com/repos/phetsims/joist/issues/comments/265627786","html_url":"https://github.com/phetsims/joist/issues/183#issuecomment-265627786","issue_url":"https://api.github.com/repos/phetsims/joist/issues/183","id":265627786,"user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T01:34:22Z","updated_at":"2016-12-08T01:34:22Z","body":"> Has this PhET-iO instrumentation has been done in a way that will allow us to factor out HomeScreenButton without changing the PhET-iO API?\r\n\r\nThe same tandem names can be used, and I don't think any 3rd party is yet leveraging the home screen icon APIs, so it would be OK to change.  I'm interested in changing this button implementation because right now the button is a VBox.\r\n\r\n```js\r\n      var largeScreenButton = new VBox( {\r\n\r\n        //Don't 40 the VBox or it will shift down when the border becomes thicker\r\n        resize: false,\r\n\r\n        cursor: 'pointer',\r\n\r\n        children: [\r\n          largeIconWithFrame,\r\n          largeText\r\n        ],\r\n        textDescription: screen.name + ' Screen: Button',\r\n        accessibleContent: {\r\n          createPeer: function( accessibleInstance ) {\r\n\r\n            // We want DOM elements to look like this:\r\n            // <input type=\"button\" tabIndex=\"0\" value=\"screenName\" id=\"largeButton-index\">\r\n            var domElement = document.createElement( 'input' );\r\n            domElement.setAttribute( 'type', 'button' );\r\n            domElement.setAttribute( 'value', screen.name );\r\n            domElement.id = 'largeButton-' + index;\r\n            domElement.tabIndex = '0';\r\n\r\n            // enter the selected screen on 'click'\r\n            domElement.addEventListener( 'click', function() {\r\n              largeButtonDown();\r\n            } );\r\n\r\n            return new AccessiblePeer( accessibleInstance, domElement );\r\n\r\n          }\r\n        }\r\n      } );\r\n```\r\n\r\nIf we coalesce the buttons, a different tandem can be assigned--it wouldn't disrupt PhET-iO clients at this point."}}
{"actor":{"display_login":"samreid"}}