Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
193 stars 18 forks source link

Can't access the application menu when using an RTL language on Windows #541

Closed fluiddot closed 1 month ago

fluiddot commented 2 months ago

Quick summary

The button that opens the application menu on Windows is not visible when using an RTL language.

Steps to reproduce

  1. Open the app with a non-RTL language.
  2. Observe that in the top-left corner, there's a burger menu that opens the application menu.
  3. Open the settings window.
  4. Change the language to an RTL language (e.g. Hebrew).
  5. Observe that the button is no longer visible.

What you expected to happen

The application menu should be accessible when using any language.

What actually happened

The application menu is not accessible when using an RTL language.

Impact

Some (< 50%)

Available workarounds?

No but the app is still usable

Platform

Windows

Logs or notes

367849609-713448b2-df41-4c13-a678-2aae1bbab083
Robertght commented 1 month ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO

📌 ACTIONS

p-jackson commented 1 month ago

Setting the app language to Arabic flips the order of the topbar controls. However it doesn't move the location of the standard Windows controls. To do that the language needs to be changed on an operating system level.

If I hardcode the window frame to show in Arabic (as well as our internal app setting) then things look more correct. There's still some padding that needs to be adjusted, but it's a lot closer.

Image

Ideally we'd be able to detect and handle both cases:

The reason I think both are important is because it's so easy to click through the languages without resting your system, and you wouldn't expect it to look borked.

It looks like it's possible to distinguish in the UI when the browser frame itself is set to a RTL language using: new Intl.Locale(navigator.language).textInfo.direction. So I think we can make it.

Maybe as a follow up task, we could have Studio offer to restart itself whenever the user switches languages, so that the studio setting and browser frame setting are always aligned.

p-jackson commented 1 month ago

Fixed by #596