phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

Long molecule names can cause floating X in 3D view #163

Closed loganbraywork closed 4 years ago

loganbraywork commented 4 years ago

Test device Windows 10 Laptop Operating System Windows 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/479

Long molecule names in 3D view can cause the X in the corner to float off of the black background. Steps to reproduce

  1. Go to the playground screen
  2. Combine carbon - nitrogen - carbon -carbon
  3. Attach bromine to the nitrogen
  4. Attach 8 hydrogen to the carbon
  5. Open the 3D view Visuals 2020-02-26BldmlclXoff 2020-02-26BldmlclXofforder

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Build a Molecule‬ URL: https://phet-dev.colorado.edu/html/build-a-molecule/0.0.0-dev.58/phet/build-a-molecule_all_phet.html Version: 0.0.0-dev.58 2020-02-12 22:53:42 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Language: en-US Window: 1604x792 Pixel Ratio: 1.1979166269302368/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: 32767x32767 OES_texture_float: true Dependencies JSON: {}

ghost commented 4 years ago

Also, it doesn't look like the molecule names are treated as strings:

Screen Shot 2020-02-26 at 3 22 58 PM This is stringTest=double.

Should they be treated as strings?

arouinfar commented 4 years ago

@lmulhall-phet I don't think we will support i18n of molecule names, since the sim pulls from a database of 9000+ molecules from PubChem.

That said, we definitely should have a maxWidth for the molecule name in the dialog.

Denz1994 commented 4 years ago

Max width applied to the common name. Will deploy dev version for verification.

Denz1994 commented 4 years ago

Can you confirm this was fixed in this dev version @loganbraywork?

loganbraywork commented 4 years ago

Appears to be fixed!