phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Decay buttons and particle labels in AvailableDecaysPanel could each be their own class #146

Closed Luisav1 closed 1 year ago

Luisav1 commented 1 year ago

From #112. The decay buttons and their enabled properties can be its own class, as well as the particle labels that go with each decay button. These are already currently created separately (within the same AvailableDecays constructor) and then joined via a VBox.

zepumph commented 1 year ago

While that is true, that is a large portion of that class which is less than 200 lines. First I'd like to play with just moving some stuff to methods from the constructor.

zepumph commented 1 year ago

I basically did a bit of a code review + refactoring on AvailableDecaysPanel and this is what I came up with. I don't recommend factioring out buttons into their own classes. Will you please review and I'm happy to discuss any next steps you'd like to do.

Luisav1 commented 1 year ago

This is looking much cleaner, thanks @zepumph. Closing.