phetsims / faradays-electromagnetic-lab

"Faraday's Electromagnetic Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 0 forks source link

Label on battery goes beyond orange end #202

Closed KatieWoe closed 4 months ago

KatieWoe commented 4 months ago

For https://github.com/phetsims/qa/issues/1116. If the string for the voltage label on the battery gets too long it goes off the orange end. If the voltage is negative it goes off the battery.

toolong2 toolong
pixelzoom commented 4 months ago

The commits above are a little odd, because I accidentally made the change with generator 1.0 checkout out (forgot to checkout main after a patch for a different issue). https://github.com/phetsims/faradays-electromagnetic-lab/commit/20e24976fc9c74d7e160d6c900ae66ec74299244 is the primary commit, accidentally made in the "generator-1.0" branch of faradays-electromagnet-lab. The other commits are patches to main and the other branches. I patched all sims in the suite (including generator and magnet-and-compass) due to the weirdness of the primary commit.

pixelzoom commented 4 months ago

@KatieWoe thanks for finding this. Please review in master. If it looks OK, unassign yourself and change the status label to "status:fixed-awaiting-deploy".

Note that the copper end of the batter is now a little wider, so there's more room for the voltage value, and we can use a slightly larger font to improve readability. (I cleared this change with @arouinfar.)

screenshot_3431 screenshot_3432
KatieWoe commented 4 months ago

Looks good on main

pixelzoom commented 4 months ago

To verify this issue in https://github.com/phetsims/qa/issues/1128 and https://github.com/phetsims/qa/issues/1130...

Run the sim with ?stringTest=dynamic. Verify that the voltage display (e.g. '9 V') on the battery stays within the bounds of the copper section of the battery. Test of the full range of positive and negative voltages.

It is sufficient to test this on 1 platform. Close this issue if everything is OK.

Nancy-Salpepi commented 4 months ago

Looks good in 1.0.0-rc.2 for FEL and for Magnets and Electromagnets. Closing.