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

When should increase/decrease buttons be disabled? #40

Closed Nancy-Salpepi closed 2 years ago

Nancy-Salpepi commented 2 years ago

Test device MacBook Air (m1 chip)

Operating System 12.5

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/823, I noticed that sometimes a decrease button is disabled to avoid making a nuclide that doesn't exist, but this doesn't seem to happen for adding a proton, neutron or both.
For example, the screen looks like this for lithium-4:

Screen Shot 2022-08-03 at 12 44 46 PM

Two decrease buttons are disabled to avoid making nonexistent nuclides, but adding a proton would also make a nonexistent nuclide and that button is still enabled. Is this the desired behavior?

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Build a Nucleus‬ URL: https://phet-dev.colorado.edu/html/build-a-nucleus/1.0.0-dev.17/phet/build-a-nucleus_all_phet.html Version: 1.0.0-dev.17 2022-08-02 23:09:01 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Safari/605.1.15 Language: en-US Window: 1322x704 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
Luisav1 commented 2 years ago

Yes this is a desired behavior because when you put a nucleon in and it doesn't form you can see that and it kicks it out but if you take a nucleon out and it doesn't form, it would look weird to send a nucleon back in. We recognize this is slightly asymmetric behavior but it feels like the correct behavior.

Nancy-Salpepi commented 2 years ago

Ok great. Thanks for the clarification Luisa!

Nancy-Salpepi commented 2 years ago

@Luisav1 I know I already closed this issue, but I have another question about it--it was thought that it "would look weird to send a nucleon back in" but if I remove a nucleon directly from the nucleus and let go, that is exactly what happens....so this seems a bit inconsistent to me. I just thought I would mention it.

Luisav1 commented 2 years ago

Thanks for bringing that up @Nancy-Salpepi. @chrisklus To have consistent behavior with the buttons, we don't allow the nucleons to be fully removed if that will create a nuclide that doesn't exist. Removing a nucleon and holding it to us feels a bit better then sending it back to its stack. For example with Hydrogen-6, if a proton is removed, it would be weirder and a bit more complex to allow it to go back to the stack and then send a proton back in because 5 neutrons doesn't exist. There we would also be allowing 5 neutrons to exist for a short timeframe, which we don't want.