phetsims / hookes-law

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

Layout changes on Energy screen #95

Closed pixelzoom closed 2 months ago

pixelzoom commented 2 months ago

For https://github.com/phetsims/qa/issues/1102 ... From https://github.com/phetsims/hookes-law/issues/81#issuecomment-2197533334 by @Nancy-Salpepi:

A couple of differences I see when comparing to the published version:

Dev Version vs. Published:

Screenshot 2024-06-28 at 8 30 10 AM Screenshot 2024-06-28 at 8 29 58 AM

Also with ?stringTest=dynamic, the text background of the Applied Force Value can overlap the panel slightly when Displacement =1.

Screenshot 2024-06-28 at 12 06 40 PM
pixelzoom commented 2 months ago

@Nancy-Salpepi please review, close if OK. Note the decision NOT to right-align icons in https://github.com/phetsims/hookes-law/issues/100.

Nancy-Salpepi commented 2 months ago

These issues look fixed on main:

On the Systems Screen, I noticed that with longer strings the text background for the Applied Force can overlap the purple Spring Force arrow. I also see this in published with ?stringTest=double.....so feel free to ignore and close.

Screenshot 2024-07-02 at 3 09 25 PM
pixelzoom commented 2 months ago

The problem in https://github.com/phetsims/hookes-law/issues/95#issuecomment-2204130191 is that there's a translucent background behind each vector value. The margins of that value were a function of the dimensions of the value, so as the value got longer, the margins got bigger, and hence the overlap. Constant margins make more sense, implemented in https://github.com/phetsims/hookes-law/commit/3918aa935d6f28e5f321201624299e1e198dc8ee.

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

Nancy-Salpepi commented 2 months ago

Looks nice. Closing.