phetsims / number-suite-common

"Number Suite Common" contains code for use by sims that are part of the Number Suite
GNU General Public License v3.0
0 stars 0 forks source link

Preferences view needs cleanup #36

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

Noted while working on https://github.com/phetsims/number-suite-common/issues/35...

NumberSuiteCommonPreferencesNode, NumberPlayPreferencesNode, and NumberComparePreferencesNode all need major cleanup. There are multiple controls being created in the constructor, and they are not properly encapsulated. This will be trouble for future maintenances and PhET-iO instrumentation.

Self assigning.

pixelzoom commented 1 year ago

The above commits will look like major changes. But what I did (in a nutshell) was to factor out a class for each control that appears in the Preferences dialog. So we now have these classes, whose names match their labels:

@chrisklus please review. Close if OK.

chrisklus commented 1 year ago

Thanks @pixelzoom, I really like these changes. I tested all the enabled-ness combinations and control functions. Closing.