You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In projectile-data-lab-main.ts, a blank Node is being created for the left column of the Audio preferences tab, to workaround a joist layout problem -- see relevant code below. Rather than creating an undesirable dependency on bad layout behavior, it would be preferrable to fix the layout problem in joist. Or at least open a GitHub issue for the problem, with a TODO here, so that the problem may eventually get fixed, and someone will know to remove this workaround.
audioOptions: {customPreferences: [{// Due to the layout considerations in the Preferences Dialog, it has 2 columns. Our entry for the left column// is blankcreateContent: ()=>newNode()},{createContent: tandem=>newAudioPreferencesContentNode(tandem.createTandem('audioPreferences'))}]
That code was modeled after an example we saw in Quadrilateral which uses the same workaround:
Thanks for making an issue - we could use better layout support for the PreferencesPanels. Right now, the subclass manages layout for the content of the panel. AudioPreferencesPanel creates two columns for the content and then alternates between then when creating customPreferences.
One better way could be for the superclass to manage layout with an API that lets the client decide where customPreferences are placed. The newer grid-based layout in scenery might be helpful for this, I am not sure.
I am not sure when to work on this, I will add it to a prioritization board to make sure it gets reviewed. However, if you have other thoughts for improving it and would like to work on it as part of projectile-data-lab, please feel free.
As discovered in the code review phetsims/projectile-data-lab#215
@pixelzoom said:
That code was modeled after an example we saw in Quadrilateral which uses the same workaround:
https://github.com/phetsims/quadrilateral/blob/1f95cbe28d44dbbc7579b7cff9afc5f8a9c96375/js/quadrilateral-main.ts#L40-L57
@jessegreenberg can you please advise?
The text was updated successfully, but these errors were encountered: