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

Support dynamic layout for changing locales #499

Closed
zepumph opened this issue Aug 23, 2022 · 22 comments
Closed

Support dynamic layout for changing locales #499

zepumph opened this issue Aug 23, 2022 · 22 comments

Comments

@zepumph
Copy link
Member

zepumph commented Aug 23, 2022

No description provided.

@zepumph
Copy link
Member Author

zepumph commented Aug 23, 2022

From a first pass, here is what it seems like we still will need to do:

  • Support accessibleName, innerContent, and labelContent
  • Support Voicing responses
  • Support Keyboard help dialog common code
  • Support AccordionBox title with dynamic layout

@zepumph
Copy link
Member Author

zepumph commented Aug 26, 2022

Another pass after phetsims/scenery#1442, in general it isn't going to be easy to convert describers, it is just a lot of content that is depending on strings. I don't think I'm going down that path.

zepumph added a commit to phetsims/sun that referenced this issue Aug 26, 2022
zepumph added a commit that referenced this issue Aug 26, 2022
zepumph added a commit to phetsims/scenery that referenced this issue Aug 26, 2022
samreid added a commit that referenced this issue Aug 27, 2022
@samreid
Copy link
Member

samreid commented Aug 27, 2022

I pushed a workaround for a type error:

tsc: ../../../ratio-and-proportion/js/create/CreateScreen.ts(31,9): error TS2322: Type 'TReadOnlyProperty<string>' is not assignable to type 'string'.

@zepumph
Copy link
Member Author

zepumph commented Sep 9, 2022

I just realized that this effects the PhET brand too, because the all HTML will have a localization tab, so I think I need to support this generally.

@zepumph
Copy link
Member Author

zepumph commented Oct 13, 2022

@zepumph
Copy link
Member Author

zepumph commented Oct 19, 2022

From a conversation with @jonathanolson:

  • When scaling: look at localBounds because those don't account for scale.
  • Use Aliginbox/VBox or maybe a Manual constraint to make sure the layout scaling nodes are good.

@zepumph
Copy link
Member Author

zepumph commented Oct 19, 2022

Noting we should work on phetsims/scenery-phet#769 to get this done too.

@zepumph
Copy link
Member Author

zepumph commented Oct 19, 2022

I punted quite a few times, please search for StringProperty.value to complete this work for description/voicing.

zepumph added a commit that referenced this issue Oct 19, 2022
@zepumph
Copy link
Member Author

zepumph commented Oct 19, 2022

Good progress today.

zepumph added a commit that referenced this issue Oct 31, 2022
zepumph added a commit to phetsims/chipper that referenced this issue Oct 31, 2022
@zepumph
Copy link
Member Author

zepumph commented Oct 31, 2022

Alright. I believe that we are unblocked here. The above two checkboxes in #499 (comment) have TODOs pointing here, and could be worked on in the future if desired, but I sorta feel like it isn't every going to be worth the effort, and we should apply the new patterns in the new description sims we implement.

@zepumph
Copy link
Member Author

zepumph commented Oct 31, 2022

QA (@KatieWoe), can you please review the work done in this issue:

I was using https://phet-dev.colorado.edu/html/ratio-and-proportion/1.2.0-dev.32/phet/ratio-and-proportion_all_phet.html?keyboardLocaleSwitcher&dev&locales=* and ctrl + U/I helped test this a lot. Please ensure the below issues are resolved in this sim.

@KatieWoe
Copy link
Contributor

KatieWoe commented Oct 31, 2022

keyboard help dialog supports dynamic locale switching.

For this section I found several potential issues. There were many more than pictured here.
First, some buttons were blank.
blankbuttons
Second, some text in buttons go beyond their edges.
buttonover
tabover

@KatieWoe
Copy link
Contributor

#515 also still has a problem. Sending this back to you @zepumph. Testing was done on the provided dev version.

@KatieWoe KatieWoe assigned zepumph and unassigned KatieWoe Oct 31, 2022
zepumph added a commit to phetsims/scenery-phet that referenced this issue Nov 3, 2022
zepumph added a commit to phetsims/scenery-phet that referenced this issue Nov 3, 2022
@zepumph
Copy link
Member Author

zepumph commented Nov 3, 2022

I think I fixed keyNode here,
image

Can you give it another shot? I'm not sure why hebrew had blank keys.

@KatieWoe
Copy link
Contributor

KatieWoe commented Nov 3, 2022

The overlapping looks much better. There are one or two other languages that also have blank keys btw.

@zepumph
Copy link
Member Author

zepumph commented Nov 3, 2022

I created phetsims/scenery-phet#786 for the blank keys. Closing. Please reopen if you feel differently.

@zepumph zepumph closed this as completed Nov 3, 2022
@phet-dev phet-dev reopened this May 4, 2023
@phet-dev
Copy link
Contributor

phet-dev commented May 4, 2023

Reopening because there is a TODO marked for this issue.

@zepumph
Copy link
Member Author

zepumph commented May 19, 2023

Moved todos to #552. Closing

@zepumph zepumph closed this as completed May 19, 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

4 participants