-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should RadioButtonGroup support grid layout? #513
Comments
The kludge approach (2nd one) does not work since RadioButtonGroup requires that one of the property value is present in the content array, such that at least one of the button is selected |
Would it be better to create a more general layout suite that applies to any set of Node (instead of just hardcoded to work in RadioButtonGroup or isolated modules?) |
Discussed in the 6/6/2019 dev meeting, and @jonathanolson is going to work with @veillette and et al and will work to improve it. @pixelzoom will add some other thoughts to this issue which will potentially be folded in to this effort. |
My 2 cents...
(EDIT: "should" in the above is a recommendation, not an order) |
@jessegreenberg will work on this issue after ESP is published. It may makes sense to bring back to developer meeting before doing the work. |
Unassigning. |
I'm unclear why RadioButtonGroup would handle grid layout? I just refactored AquaRadioButtonGroup, and it definitely uses FlowBox. We could rip out some parts of it so that it could just provide a list of Nodes, and the user could do their own layout. Then we could have a convenient way of including them in any layout, OR just using the the default FlowBox. |
In vector-addition, the design document specifies a 2x2 grid of radio buttons (see phetsims/vector-addition#6). Currently the layout of the RadioGroupButton supports only two orientations, namely vertical and horizontal.
Is it worth generalizing the layout of RadioButtonGroup?
In a Slack discussion, CM suggested:
You could also rework/rewrite RadioButtonGroup to have options:
A second approach would be to go around the problem by creating two vertical RadioButtonGroups that are arranged in HBox. However, this might be a source of problems for PhET-iO and a11y.
A third approach would be to implement a custom layout by leveraging RadioGroupButtonMember and RectangularButtonView. There is no other precedent of a grid like layout for radio buttons but there is some precedent for a grid like layout of a combox box. Although it is no supported by SUN (see #363), there exists a custom grid like layout of the combo box in Area-Model ( GenericLayoutSelectionNode)
FYI, I counted 33 instances of 'new RadioButtonGroup' in the code base.
The text was updated successfully, but these errors were encountered: