phetsims / collision-lab

"Collision Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 4 forks source link

Blue reset button slightly incorrect location when long strings used #197

Closed loganbraywork closed 3 years ago

loganbraywork commented 3 years ago

Test device

Windows 10 Laptop

Operating System

Windows 10 1909

Browser

Chrome 87.0.4280.141

Problem description

For https://github.com/phetsims/QA/issues/599

Long strings seem to offset the position of the blue reset button, moving it slightly higher on the screen than its normal position.

Steps to reproduce

  1. Add query parameter ?stringTest=long
  2. Observe difference in position of blue reset button from original

Visuals

Normal Reset button location 2021-01-21FirefoxResetButtonLocation

Altered Reset button location 2021-01-21ChromeResetButtonLocation

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Collision Lab‬ URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-rc.1/phet/xhtml/collision-lab_all.xhtml Version: 1.1.0-rc.1 2021-01-20 01:05:28 UTC Features missing: applicationcache, applicationcache, touch User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36 Language: en-US Window: 1920x969 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: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}

brooklynlash commented 3 years ago

I also was able to replicate this with the double query parameter.

jonathanolson commented 3 years ago

Its vertical center WAS being set to the center of the time readout (to the far left of it). This seemed inappropriate given the layout visually, so I've adjusted it to be positioned with the same top as said readout (so that they will have a consistent spacing from the play area).

@arouinfar does this seem acceptable, and look good?

arouinfar commented 3 years ago

@arouinfar does this seem acceptable, and look good?

That sounds like a great solution and it looks good in master.

DevonQui commented 3 years ago

Tested this and the issue no longer exists with any of the string query parameters on any of the screens. Closing