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

stringTest=double makes radio buttons touch edge of toolbox #308

Closed
Tracked by #936
ghost opened this issue Jul 25, 2018 · 15 comments
Closed
Tracked by #936

stringTest=double makes radio buttons touch edge of toolbox #308

ghost opened this issue Jul 25, 2018 · 15 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2018

Here's the issue:

screen shot 2018-07-25 at 3 22 28 pm

Seen on all browsers + macOS.

For phetsims/qa/issues/153.

@ghost ghost added the type:i18n label Jul 25, 2018
@ghost ghost assigned Denz1994 Jul 25, 2018
@arouinfar
Copy link

I think what's happening is that the radio buttons are remaining left-aligned with "Constant Parameter" which collides with the panel border under i18n. Maintaining alignment is desirable, but losing the padding between the strings and panel border isn't.

@Denz1994 I think this panel could be allowed to expand to the left to provide room for long translations, similar to what was done in #293. When the panel expands, the padding between the left side of the strings and panel border should remain the same.

@Denz1994
Copy link
Contributor

Can you review master @arouinfar? The logic for aligning the panel contents has been slightly refactored.

@arouinfar
Copy link

@Denz1994 the strings are no longer colliding with the border, but it looks like panel isn't expanding, as requested.
image
image

@Denz1994
Copy link
Contributor

Denz1994 commented Aug 1, 2018

Can you review master now @arouinfar? I need a second eye for the expansion.

@arouinfar
Copy link

@Denz1994 for i18n the new panel width is looking good. However, the panel should only get wider for i18n, but otherwise it can keep the same width as it had before (match spring constant panel width).

@arouinfar
Copy link

arouinfar commented Aug 1, 2018

Here are some screenshots for comparison.

image
image
image

To summarize

  • Spring Length and Spring Constant panels should normally have the same width
  • Spring Length (and Spring Constant, if that makes things easier) can expand up to 50 px for i18n
  • Constant Parameter title/radio group has too much left padding in master, but rc.2 had the desired layout:
    image

@arouinfar arouinfar removed their assignment Aug 1, 2018
@Denz1994
Copy link
Contributor

Denz1994 commented Aug 3, 2018

After further investigation, there are a few things to consider. The contents of the panel is already being scaled because the panel is too small for the default sizes of the contents (hSlider in particular). If we change the maxWidth of the panel it will change the scale of its contents automatically because the contents will have more space to expand to its default size.

There is a potential workaround that includes making the panel larger to fit its content.

Capacitor Lab: Basics has a similar behavior, but the difference is that the content's panel fits within the panel. In fact the panel is relatively large compared to M&S.

Design question: Do we want to enlarge the panels to allow for the panel to expand more pixels before shrinking its contents. There will be a good amount of changes to alignments that would require another round of testing for i18n issues. Thoughts @arouinfar and @ariel-phet?

Note this suggested change also applies to #293

@Denz1994
Copy link
Contributor

Denz1994 commented Aug 3, 2018

In a discussion with @ariel-phet. Check for input from @jonathanolson. If the panels require that they are enlarged, then create a general issue where appropriate. Otherwise, work towards refactoring a workaround that allows for more pixel space.

@Denz1994
Copy link
Contributor

Denz1994 commented Aug 7, 2018

In a meeting with @ariel-phet and @jonathanolson it was confirmed that the contents of the panel need to fit within the panel, by either making the contents smaller or making the panel a bit larger. @ariel-phet thought it was best to let the panels expand a bit more. @arouinfar can you check if master is good for review?

@arouinfar
Copy link

It's looking pretty good to me! Thanks @Denz1994.

@arouinfar
Copy link

@Denz1994 this is occurring in 1.0. @DianaTavares showed me this:
image

@arouinfar arouinfar reopened this Sep 20, 2018
@arouinfar arouinfar assigned Denz1994 and unassigned arouinfar Sep 20, 2018
Denz1994 added a commit that referenced this issue Nov 6, 2018
… similar to the right sided sim options panels on each screen. #308
@Denz1994
Copy link
Contributor

Denz1994 commented Nov 6, 2018

The spring options panel on the second scene of the intro screen, described above, has been refactored to use alignBox/alignGroup. This change has a similar structure to the general sim option panels found on the right side of each screen. Assigning to @arouinfar to review.

@arouinfar
Copy link

@Denz1994 master is looking good now
image

@Nancy-Salpepi
Copy link

This looks good in 1.1.0-dev.2.
I see a couple of other string test problems that I will make new issues for.

@jbphet
Copy link
Contributor

jbphet commented Jun 2, 2023

Thanks, closing.

@jbphet jbphet closed this as completed Jun 2, 2023
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

5 participants