phetsims / molecule-shapes

"Molecule Shapes" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molecule-shapes
GNU General Public License v3.0
5 stars 6 forks source link

Odd interaction between `showOuterLonePairsProperty` and `showLonePairsProperty` #228

Closed arouinfar closed 1 year ago

arouinfar commented 1 year ago

Related to #223, and relevant history of showOuterLonePairsProperty can be found in #194 and #201.

Steps to reproduce:

  1. Open Molecule Shapes in Studio.
  2. Go to Real Molecules screen and select BrF5, since it has lone pairs on the central and outer atoms.
  3. Set showOuterLonePairsProperty to true. Outer lone pairs appear as expected.
  4. Set showOuterLonePairsProperty to false. All lone pairs disappear, including the one on the central atom. (The central lone pair should be independent of the outer lone pairs.)
  5. Uncheck the Show Lone Pairs checkbox, then turn it back on. The lone pair reappears on the central atom, but a few outer lone pairs also show up. image

@jonathanolson unfortunately this isn't consistent. I have two different tabs open in Chrome -- in one tab, I cannot reproduce this at all. In the other tab, I can consistently encounter the described buggy behavior.

Here's the troubleshooting info for the phet-brand version on master:

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Molecule Shapes‬ URL: https://bayes.colorado.edu/dev/phettest/molecule-shapes/molecule-shapes_en.html?ea&brand=phet Version: 1.5.0-dev.3 (unbuilt) Features missing: applicationcache, applicationcache, touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Language: en-US Window: 1793x1329 Pixel Ratio: 1/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
arouinfar commented 1 year ago

Tagging for https://github.com/phetsims/qa/issues/844 and https://github.com/phetsims/qa/issues/845.

Nancy-Salpepi commented 1 year ago

For https://github.com/phetsims/qa/issues/844 this also happens in the PhET brand sim.

https://user-images.githubusercontent.com/87318828/197197025-fcffbbf2-31d1-4279-bb53-6cae069e1d12.mp4

Screen Shot 2022-10-21 at 8 22 59 AM
KatieWoe commented 1 year ago

Adding on to what Nancy saw, just turning the "Show Lone Pairs" off and on again does this, you don't need to turn outer pairs on or off from what I saw.

Nancy-Salpepi commented 1 year ago

I saw the same as @KatieWoe-- no need to do steps 3 and 4 to see the outer lone pairs appear when they shouldn't.

The other part of the bug that was reported by @arouinfar also happens in the PhET brand sim: Checking and unchecking the Show Outer Lone Pairs Checkbox also hides the lone pairs for the central atom when it shouldn't.

KatieWoe commented 1 year ago

Also the bugged pairs seem different when you are in projector mode. Non projector mode: dark Projector mode: projector

jonathanolson commented 1 year ago

Fix applied in common code above. Closing.