{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/scenery-phet/issues/217","repository_url":"https://api.github.com/repos/phetsims/scenery-phet","labels_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/217/comments","events_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/217/events","html_url":"https://github.com/phetsims/scenery-phet/issues/217","id":133128208,"number":217,"title":"layout options for NumberControl","user":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phetsims/scenery-phet/labels/dev:enhancement","name":"dev:enhancement","color":"0276FD"},{"url":"https://api.github.com/repos/phetsims/scenery-phet/labels/priority:2-high","name":"priority:2-high","color":"e11d21"},{"url":"https://api.github.com/repos/phetsims/scenery-phet/labels/priority:4-low","name":"priority:4-low","color":"c7def8"}],"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":17,"created_at":"2016-02-12T00:41:14Z","updated_at":"2016-08-22T17:36:29Z","closed_at":null,"body":"NumberControl currently has a fixed layout, which looks like this:\r\n\r\n![screenshot_06](https://cloud.githubusercontent.com/assets/3046552/12995494/1138d548-d0e5-11e5-936c-73bbc0814c15.png)\r\n\r\nOther desired layouts:\r\n\r\n(1) Similar to above, but with arrow buttons on either side of value. Eg in Bending Light:\r\n\r\n![screenshot_09](https://cloud.githubusercontent.com/assets/3046552/12995554/7f78bc62-d0e5-11e5-80a3-a29d2f111132.png)\r\n\r\n(2) \"Three lines\" option. Label at the top. Independent alignment options ('left', 'center', 'right' ) for label and value+buttons.  Eg in Rutherford Scattering mockups:\r\n\r\n![screenshot_05](https://cloud.githubusercontent.com/assets/3046552/12995504/1edb39de-d0e5-11e5-8a74-f9fd88378ff1.png)\r\n\r\nNot sure what the best way of specifying these layouts is.  The easiest is certainly to give each layout a `{string} layoutName` and write different layout code specifically each.  The most general (and more complicated) would be to pass in an optional function that handles layout. "},"comment":{"url":"https://api.github.com/repos/phetsims/scenery-phet/issues/comments/241489434","html_url":"https://github.com/phetsims/scenery-phet/issues/217#issuecomment-241489434","issue_url":"https://api.github.com/repos/phetsims/scenery-phet/issues/217","id":241489434,"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-08-22T17:36:29Z","updated_at":"2016-08-22T17:36:29Z","body":"I've finished reviewing the changes to NumberControl and its example usage in SlidersView.  Generally, things look great.  Here are some more details:\r\n\r\nSlidersView.js line 91 is written like so:\r\n```js\r\nresize: false, // workaround for slider\r\n```\r\nCan you elaborate on why a workaround is needed for the slider, and what the workaround does?\r\n\r\nThis code comment looks like it is referring to the old name for the functions, it should be updated:\r\n```js\r\n// (see CREATE_LAYOUT_FUNCTION_*) or create your own function.\r\n```\r\n\r\nIt is generally an antipattern to define a Node subclass that has exactly one child.  For instance, let's say I have a node subclass called \"MyTriangle\" which extends Node and adds children = [Path].  In this case, MyTriangle should be rewritten to extend Path.  It appears NumberControl also follows the pattern of \"extends Node but has exactly one child\" but I cannot find any way around it, aside from using static functions like NumberControl.create(..) that would create the NumberControl (which I advise against because `new NumberControl` is more idiomatic).  So this may be left as it is, but I thought I'd bring it up in case you have any ideas or comments."}}
{"actor":{"display_login":"samreid"}}