phetsims / number-line-integers

"Number Line: Integers" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 4 forks source link

Locale/layout change for some elements is delayed #113

Closed Nancy-Salpepi closed 9 months ago

Nancy-Salpepi commented 10 months ago

Test device MacBook Air M1 chip

Operating System 14.0

Browser Safari 17

Problem description For https://github.com/phetsims/qa/issues/1002, in the Temperature Scene on the Explore Scene, the temperature values will not update to a new locale until a thermometer is moved. This happens with the Absolute Value Statements and less noticeably for the layout of the values on the temperature scale (noticeable when switching between English and Amharic for example).

Steps to reproduce

  1. Go to the Temperature Scene on the Explore Screen
  2. Check Absolute Value
  3. Place the 3 thermometers at different temperatures
  4. Change the locale--ex. to Italian--not that the Absolute Value statements are still in English
  5. Move the thermometers--the Absolute Value statements will switch to Italian

Visuals

https://github.com/phetsims/number-line-integers/assets/87318828/04809360-2b53-4851-aeee-dda08f1b374d

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Number Line: Integers‬ URL: https://phet-dev.colorado.edu/html/number-line-integers/1.2.0-dev.5/phet/number-line-integers_all_phet.html Version: 1.2.0-dev.5 2023-11-13 16:44:44 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15 Language: en-US Window: 1316x662 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
Nancy-Salpepi commented 10 months ago

The layout of the Absolute Value is initially off-center in the Bank scene when changing locales. Once the bank is moved, the text becomes centered again. Here is what it looked like when I switched from English to Polish:

Screenshot 2023-11-14 at 7 55 52 AM

Once I moved the bank:

Screenshot 2023-11-14 at 7 58 56 AM
marlitas commented 10 months ago

I believe this is now fixed with the above commits. @Nancy-Salpepi can you double check that it looks correct on main? Close if all looks well. Thanks!

Nancy-Salpepi commented 10 months ago

I'm still seeing an issue with the bank scene similar to https://github.com/phetsims/number-line-integers/issues/113#issuecomment-1810160257.

Here is what it looks like when switching to Greek from English:

Screenshot 2023-11-15 at 8 40 36 AM

Then if I move the bank, the text becomes centered. Switching back to English, makes the text off-center again:

Screenshot 2023-11-15 at 9 01 14 AM
marlitas commented 10 months ago

I think this is fixed now, but it was a bit nuanced for me to see. @Nancy-Salpepi can you check if that's looking good on your end?

Nancy-Salpepi commented 10 months ago

Yes! All looks good! Closing!

Nancy-Salpepi commented 9 months ago

Sorry @marlitas for https://github.com/phetsims/qa/issues/1010 I am still seeing this issue in the temperature scene. When I change to some locales (for example, from English to Arabic, Persian, Gujarati, Magyar or Taiwanese mandarin) the labels on the number line will shift location after moving the thermometer. Sorry I didn't catch this before.

https://github.com/phetsims/number-line-integers/assets/87318828/cac8dc4b-9640-4c57-acda-d5bc8caf04ee

marlitas commented 9 months ago

Fix above. Over to @Nancy-Salpepi!

Nancy-Salpepi commented 9 months ago

This looks good now! Closing.