phetsims / blackbody-spectrum

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

Sim fails ?stringTest=double in multiple ways #46

Closed phet-steele closed 5 years ago

phet-steele commented 5 years ago

Can't think of a better title, sorry. This sim needs i18n attention. This is how it looks on startup with ?stringTest=double:

image

I don't think it is worth my time to enumerate all the things that need to be fixed until the sim has been given a good i18n pass, but the obvious places to start are the graph position, graph axes, and options panel.

Seen on Win 10 Chrome. For phetsims/QA/issues/215.

Troubleshooting Information URL: https://phet-dev.colorado.edu/html/blackbody-spectrum/1.0.0-dev.12/phet/blackbody-spectrum_en_phet.html?stringTest=double Version: 1.0.0-dev.12 2018-11-02 23:46:56 UTC Features missing: touch User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36 Language: en-US Window: 1920x938 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: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"cca8e36e","branch":"master"},"blackbody-spectrum":{"sha":"3db65ad6","branch":"master"},"brand":{"sha":"1fd6682e","branch":"master"},"chipper":{"sha":"fa2fbadf","branch":"master"},"dot":{"sha":"bbbd8526","branch":"master"},"joist":{"sha":"82521d0c","branch":"master"},"kite":{"sha":"380cef53","branch":"master"},"phet-core":{"sha":"1b90ac2f","branch":"master"},"phet-io":{"sha":"e230c094","branch":"master"},"phet-io-wrapper-classroom-activity":{"sha":"246085c1","branch":"master"},"phet-io-wrapper-hookes-law-energy":{"sha":"7479b0ec","branch":"master"},"phet-io-wrapper-lab-book":{"sha":"c46f7839","branch":"master"},"phet-io-wrappers":{"sha":"ded21e3f","branch":"master"},"phetcommon":{"sha":"cd63d89a","branch":"master"},"query-string-machine":{"sha":"06ed6276","branch":"master"},"scenery":{"sha":"5013941c","branch":"master"},"scenery-phet":{"sha":"2286294f","branch":"master"},"sherpa":{"sha":"97e70540","branch":"master"},"sun":{"sha":"a423abfb","branch":"master"},"tambo":{"sha":"296cf3ba","branch":"master"},"tandem":{"sha":"1b93c58b","branch":"master"}}
DianaTavares commented 5 years ago

For the graph axes, probably write the Y-axe label in this way:

screen shot 2019-02-09 at 2 29 13 pm

KatieWoe commented 5 years ago

A few things noticed so far.

  1. https://github.com/phetsims/blackbody-spectrum/issues/46#issuecomment-462081084 has not been changed. Should it? implament
  2. When the sim is started (x=3, y=140) without string tests, clicking the Labels box will show Ultraviolet, Visible, and Infrared. When stringTest=double in the same conditions, on Infrared shows up. nolabels @DianaTavares for priority of these.
DianaTavares commented 5 years ago

I think that both behaviors are ok. The y-axes label fit in the space with the double string length. And for the "visible" label, well not all the spectrum has it name in the graph because the space is small. I think that is ok if in some languages, if the string is very long, it is better to hide it, because with a smaller font size can be hard to read. When is zoom in the labels are visible again.

What do you think @ariel-phet

ariel-phet commented 5 years ago

@arnabp I am OK with the the y-axis behavior, but for the spectrum labels, but "Visible" and "Ultraviolet" should scale down in size as needed to make them fit. Having the labels completely disappear does not seem like good behavior. I know these may become quite small in some locales, but we just need to accept that possibility.

arnabp commented 5 years ago

How does this look as a compromise between disappearing text and tiny text?

Screen Shot 2019-05-23 at 12 19 50 PM Screen Shot 2019-05-23 at 12 20 05 PM Screen Shot 2019-05-23 at 12 20 15 PM

The text will reduce in size to fit between the tick marks to a certain extent. But if the text has to fit to a space that's absurdly small (in this case, 20 pixels as the cutoff), only then will it disappear.

Screen Shot 2019-05-23 at 12 22 36 PM
ariel-phet commented 5 years ago

@arnabp looks good, I think that is a good compromise

arnabp commented 5 years ago

I think we've reached a state that makes sense for everyone, closing.