Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings can become too small when doubled and have room to be larger #313

Closed
KatieWoe opened this issue Aug 9, 2018 · 8 comments
Closed

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Aug 9, 2018

Test device:
Dell Laptop
Operating System:
Windows 10
Browser:
Chrome
Problem description:
For phetsims/qa/issues/165
When stringTest=double a few of the strings in the right panel become almost unreadably small, though they still have room to be longer to their right.
Steps to reproduce:

  1. Set stringTest=double
  2. Go to the Lab screen
  3. Notice how the Mass Equilibrium string in particular is very small, but still has room in which it could expand

Screenshots:
padding

Troubleshooting information (do not edit):

Name: ‪Masses and Springs‬:‪Masses and Springs‬
URL: https://bayes.colorado.edu/dev/html/masses-and-springs/1.0.0-rc.3/phet/masses-and-springs_all_phet.html?stringTest=double
Version: 1.0.0-rc.3 2018-08-08 21:38:04 UTC
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
Language: en-US
Window: 1536x737
Pixel Ratio: 2.5/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: 16384x16384
OES_texture_float: true
Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"37d5839c","branch":"HEAD"},"brand":{"sha":"89d28f63","branch":"HEAD"},"chipper":{"sha":"bc1f66fe","branch":"HEAD"},"dot":{"sha":"bd4d7035","branch":"HEAD"},"griddle":{"sha":"7be25724","branch":"HEAD"},"joist":{"sha":"8da47b06","branch":"HEAD"},"kite":{"sha":"3b76b24a","branch":"HEAD"},"masses-and-springs":{"sha":"b0f63e4a","branch":"HEAD"},"phet-core":{"sha":"e0cec207","branch":"HEAD"},"phet-io":{"sha":"e5c7148f","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"5204ea8e","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"ccaaaa4b","branch":"HEAD"},"phet-io-wrappers":{"sha":"f3701e8d","branch":"HEAD"},"phetcommon":{"sha":"80414edb","branch":"HEAD"},"query-string-machine":{"sha":"1f2322e4","branch":"HEAD"},"scenery":{"sha":"3b05db54","branch":"HEAD"},"scenery-phet":{"sha":"f37bff38","branch":"HEAD"},"sherpa":{"sha":"ded365aa","branch":"HEAD"},"sun":{"sha":"00b9c74c","branch":"HEAD"},"tandem":{"sha":"3e1c8fd3","branch":"HEAD"},"twixt":{"sha":"050e8f19","branch":"HEAD"}}

@arouinfar
Copy link

@Denz1994 it seems like the maxWidths could be a hair bigger. I think we could allow strings to expand until they reach the red line.

image

However, if this change requires significant refactoring or other complications, I don't think it's necessarily worth it, as Mass Equilibrium is more of a borderline case.

@KatieWoe
Copy link
Contributor Author

Similar Issue with max width. The label "Mass" seems to become very small sooner than it needs to as well. This is the mass you see in the box that lets you adjust the mass of one of the weights.
double

@arouinfar
Copy link

@Denz1994 it really looks like the maxWidth of "Mass" ended up smaller than when I reviewed it. Unfortunately, it was just in master, so I can't go back and compare.

@arouinfar
Copy link

@KatieWoe it's possible that we cannot make "Mass" any larger due to the limitations of numberControl. In #296 (comment) @Denz1994 commented that:

The reason the Gravity and Damping look smaller on the lab screen is due to the title of the number control being private in common code. The panel has to fit the title, white space, and readout for a number control and there isn't much room to play with after that. The same is true for the massValueControlPanel.

This is different in Pendulum Lab because it is using a customized NumberControl for that sim. I can't use it in this case because there are different alignments with the sliders being indented and an icon is added for the massValueControlPanel.

I can work towards building a custom NumberControl, but it would be a significant refactor. I don't want to seem like I'm opting out, but I'm leaning against making the refactor this late into development.

@Denz1994 does this also apply to "Mass"?

@Denz1994
Copy link
Contributor

@arouinfar The above #296 (comment) remains true for the massValueControl. This was the original intent behind switching the title to the left and the icon to its right. I didn't make any changes to the string font for "mass".

RC.1 has "mass" at a different position, but the size is slightly larger. Do you want this change @arouinfar? It seems like the size hasn't changed otherwise.

@Denz1994
Copy link
Contributor

I'm going to second @arouinfar comment above. I am running into more refactors than I would like, specifically due to the bracket being in the checkboxGroup.

@arouinfar
Copy link

@Denz1994 I would not like to change the order of "Mass" and the icon. It sounds like the same maxWidth issues are applying here, so I'd rather punt than worry about a custom numberControl. If I understood correctly, please feel free to close @Denz1994.

@arouinfar arouinfar assigned Denz1994 and unassigned arouinfar and Denz1994 Aug 13, 2018
@Denz1994
Copy link
Contributor

Okay makes sense thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants