phetsims / masses-and-springs

"Masses and Springs" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 5 forks source link

Allow panel/toolbox on right side to expand 50px before scaling down strings #293

Closed arouinfar closed 6 years ago

arouinfar commented 6 years ago

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

There are a lot of long strings in this sim, which may get even longer when translated. When reviewing ?stringTest=double I noticed that the panel remains the same width, so the strings don't really have any room to grow.

@Denz1994 can you allow this panel to expand by 50px before scaling down the strings? Keep in mind that the toolbox width should also increase so it matches the panel width.

This has been a strategy that has been used in other sims, such as Capacitor Lab: Basics.

image image

arouinfar commented 6 years ago

It also looks like all three reference line checkboxes seem to have the same font size. However, I think "Movable Line" has room to be a bit larger, so I'm not sure why it's so small.

In the above CLB example, "Current Direction" is a tad bit smaller because it is a long string, while "Bar Graph" was short enough to keep its original size.

Edit: Decided to open a separate issue for this - #296.

Denz1994 commented 6 years ago

Can you check master @arouinfar? I expect that the panel widths are still too small, but should the Movable Line string be given more room to expand?

arouinfar commented 6 years ago

@Denz1994 the panel width is looking pretty good, actually. I think the checkbox strings will all have adequate room to maintain a reasonable font size for most (if not all) locales. However, I'm noticing two undesirable side effects.

First, the Gravity and Damping sliders looks pretty horizontally cramped. Additionally, the Vector checkboxes are no longer left-aligned with the first group of checkboxes. Compare rc.1 (top) to master (bottom).

image image

Denz1994 commented 6 years ago

Nice thanks for the feedback.

Denz1994 commented 6 years ago

Can you check master now @arouinfar? There was also a bug fix. Should the gravity section be expanded more?

Note to self: The disparity in the two versions above is due to the optionsPanel getting wider, not the content getting smaller.

arouinfar commented 6 years ago

@Denz1994 master is still looking about the same as https://github.com/phetsims/masses-and-springs/issues/293#issuecomment-405682414, even after pulling all repos. The Vector checkboxes have moved over a bit, but are still not left-aligned with the other checkboxes. Gravity and Damping still looking equally squished to me.

image

Denz1994 commented 6 years ago

I tracked down the misalignments in a previous set of commits. Can you try master @arouinfar? Thanks for the feedback.

arouinfar commented 6 years ago

@Denz1994 relative alignment and the sliders are looking much better. However, there's quite a bit of wasted space on the left and right sides of the panel. image

The extra space is not specific to increased panel width, as it appears without ?stringTest (top). The left/right padding in rc.1 is preferred (bottom). image image

Denz1994 commented 6 years ago

What do you think about master now @arouinfar?

arouinfar commented 6 years ago

Looks great! Thanks @Denz1994.

arouinfar commented 6 years ago

@Denz1994 in reviewing #305 , I noticed that the panel doesn't appear to be expanding more than a few px (if at all) for long strings. image image

arouinfar commented 6 years ago

By the way, it appears that this was unfixed in rc.2 image image

Denz1994 commented 6 years ago

The panels no longer have maxWidths and instead the contents have adjusted maxWidths. The toolboxes on each screen have widths that match the optionsPanels respectively. Could you review master @arouinfar to make sure that there is adequate spacing for i18n?

arouinfar commented 6 years ago

Looks good to me, thanks @Denz1994!