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

Population graph should not display "Zoom out..." message when all checkboxes are unchecked #213

Closed pixelzoom closed 4 years ago

pixelzoom commented 4 years ago

Noticed with working on #209. If none of the Population checkboxes are checked, then the graph is displaying nothing. In this case, it's not appropriate to display "Zoom out to show data", but we are.

This will not be addressed in the prototype RC.

pixelzoom commented 4 years ago

I addressed this in the above commit, which can be test-driven in 1.2.0-dev.1. To test:

  1. Run the sim
  2. Go to ether screen
  3. Zoom the Population graph in fully, so the y-axis range is [0,5]
  4. Press the "Add a Mate" button.
  5. Wait for bunnies to take over the world, close the dialog
  6. Verify that "Zoom in to see data" appears in the graph
  7. Toggle "Total" checkbox (and other checkboxes) off and on. Verify that "Zoom..." only appears in the graph when there is no data visible and at least 1 checkbox is checked.
pixelzoom commented 4 years ago

Assuming this tests OK, this will be picked up by the 1.1 prototype. #209 blocks the prototype, and this fix also fixes that issue.

amanda-phet commented 4 years ago

It seems to be working correctly!

One thing I want documented:

First, I have total and white fur checked (can just be one checkbox though). It looks like this:

image

Then when I click brown fur, the "zoom out" text goes away, but it's hard to tell that there is visible data for brown fur.

image

Just wanted this documented. Nothing is wrong, the code is correct, but it took me a few clicks to realize that there was data because it is subtle.

pixelzoom commented 4 years ago

Yes indeed, a horizontal line at y=0 is easy to miss. The only way around this would be to make the line thicker for all plotted data, which I think would compromise the overall look of the graph.

pixelzoom commented 4 years ago

4affe22cb834760c3fff7d421bfca0e706c5cba3 has been cherry-picked into the 1.1 branch.

ariel-phet commented 4 years ago

Fix verified 1.2.0-dev.1.

pixelzoom commented 4 years ago

Ready for RC testing in https://github.com/phetsims/QA/issues/542. See https://github.com/phetsims/natural-selection/issues/213#issuecomment-683537251 for steps to verify.

ariel-phet commented 4 years ago

Fix verified in 1.1.0-rc2