phetsims / natural-selection

"Natural Selection" is an educational simulation in HTML5, by PhET Interactive Simulations
GNU General Public License v3.0
3 stars 7 forks source link

Mutation Alert misaligned when row added to Mutation Panel #349

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.5

Browser Safari 16.6

Problem description For https://github.com/phetsims/qa/issues/967, on the Intro Screen if 1 row is added to the Mutation Panel, the "Mutation Coming" alert will be lower than the mutation row. This doesn't happen if all 3 rows are visible.

If I remove a row on the Lab Screen, the alert is still aligned with the row.

Steps to reproduce

  1. On the intro screen, make either the ears row or teeth row visible. naturalSelection.introScreen.view.addMutationsPanel.earsRow.visibleProperty naturalSelection.introScreen.view.addMutationsPanel.teethRow.visibleProperty
  2. Press the test button
  3. In the Standard PhEt-iO wrapper, select either dominant or recessive for that trait so the "Mutation Coming" alert appears
  4. Switching steps 2 and 3 also produces the same result

Visuals

Screenshot 2023-08-01 at 8 27 32 AM Screenshot 2023-08-01 at 8 30 59 AM
pixelzoom commented 1 year ago

I reproduced in the standard wrapper. Also noting that in Studio, the alerts are in the correct position.

pixelzoom commented 1 year ago

Addressed in the above commit. I tested with a lot of different scenarios, adding/removing rows, with "Mutations Coming" alerts shown/hidden. And in Studio, Standard wrapper (Studio "Test" button) and State wrapper.

Back to @Nancy-Salpepi for verification, close if OK.

Nancy-Salpepi commented 1 year ago

I also tested several scenarios and all looks good to me. Closing!

pixelzoom commented 1 year ago

🎉 Good find!