phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

Screen titles in nav bar can be cut off with some locales #952

Open Nancy-Salpepi opened 4 months ago

Nancy-Salpepi commented 4 months ago

Test device MacBook Air M1 chip

Operating System 14.3.1

Browser Safari 17.3.1 and Chrome

Problem description Seen while testing https://github.com/phetsims/qa/issues/1039, the title of the screen name may be cut off slightly. So far I have seen this with locale=kn (Kannada) but will update as I continue testing.

This issue is seen with both safari and Chrome and thus not related to changes made for this MR.

Visuals

Screenshot 2024-02-14 at 9 43 13 AM

It appears in published for Center and Variability but not for Acid Base Solutions with mac + Chrome.

Nancy-Salpepi commented 4 months ago

Also seen with: (this comment will be continually updated)

KatieWoe commented 4 months ago

I noticed that some Thai characters could get cut off on the home screen, such as in Waves Intro. However, this seems to happen on Chrome on the published sim so I don't think it is related to this change.

Screenshot 2024-02-14 at 11 33 53 AM
jonathanolson commented 4 months ago

Just to verify, this is more "text goes off the screen, or is blocked by other components", and is more of a layout issue, right?

This looks more like we'll need to make some fine adjustments to how text is handled in both cases. Previous work in https://github.com/phetsims/joist/issues/143.

It's a bit complicated, I'll need to get the "accurate" bounds of the text, and only adjust things if they would go off the screen (or overlap).

kathy-phet commented 4 months ago

This is too much of a corner case / hard to fix, we will defer for now. Perhaps if Alpenglow has better textbounds some day.

jonathanolson commented 4 months ago

If relevant, Scenery can now get the improved text bounds (Text.boundsMethod='accurate'), but fine with the defer.

kathy-phet commented 4 months ago

Let's defer. Maybe this would be a nice issue for SceneryStack contributor in the future - perhaps.