LocalMaterialNotes icon indicating copy to clipboard operation
LocalMaterialNotes copied to clipboard

RTL Layout Support

Open AI-IMED opened this issue 1 year ago • 16 comments

The application needs to support the layout of RTL languages in the interface as well as the orientation and alignment of RTL languages in text input

https://github.com/maelchiotti/LocalMaterialNotes/assets/38974362/13be791c-5bd1-4a3b-8c7b-bb22fce91332

AI-IMED avatar Apr 16 '24 03:04 AI-IMED

Hi @AI-IMED, you are right, I will look into it.

maelchiotti avatar Apr 16 '24 13:04 maelchiotti

@AI-IMED I looked into it, and almost all of the app already supports RTL. I only had to fix paddings in #32.

The text field uses fleather which automatically adapts to the language (this is why it's LTR at the beginning of your screen capture, then it switches to RTL as soon as you input some RTL characters).

If you ever wish to localize the app in your language, please feel free to read this!

maelchiotti avatar Apr 22 '24 13:04 maelchiotti

٢٠٢٤٠٦٠٦-٠٨٠٢٤١

https://developer.android.com/reference/android/text/TextDirectionHeuristics

AI-IMED avatar Jun 06 '24 05:06 AI-IMED

@AI-IMED Hi, I'm sorry but aren't the two things you hilighted already implemented? In the screen capture you itinialy sent, the interface is RTL, and as soon as you input a RTL character into the editor it switches to RTL.

Where exactly do you think I am missing an RTL improvement?

maelchiotti avatar Jun 06 '24 06:06 maelchiotti

I didn't notice any changes

AI-IMED avatar Jun 06 '24 06:06 AI-IMED

But I don't understand what exactly you would want me to change

maelchiotti avatar Jun 06 '24 06:06 maelchiotti

The bugs that I reported to you and that you told me were fixed and implemented, I did not notice at all

AI-IMED avatar Jun 06 '24 06:06 AI-IMED

Ok, I am pretty sure I tried the app with an RTL language and that they were but to be sure I will try it again.

maelchiotti avatar Jun 06 '24 06:06 maelchiotti

https://github.com/maelchiotti/LocalMaterialNotes/assets/38974362/624162f1-7eb0-456e-88e3-ba998ab1f2da

The interface layout and note writing should be just as this app does

AI-IMED avatar Jun 06 '24 07:06 AI-IMED

Ok thanks for the reference

maelchiotti avatar Jun 06 '24 07:06 maelchiotti

I am pretty sure I tried the app with an RTL language and that they were

https://github.com/maelchiotti/LocalMaterialNotes/assets/38974362/9405d0e1-751f-4aa3-baf3-603566bc1a8d

AI-IMED avatar Jun 06 '24 07:06 AI-IMED

Oh well it makes that the interface is in LTR mode. Flutter uses the locale of the app to determine if it should set the interface to LTR or RTL. As no RTL languages are supported yet, even if you phone uses a RTL language, the app defaults to English (which of course is LTR). I don't know if it's possible to force RTL, or even if it would be a desirable option to add into the app.

As for the editor, it should automatically support RTL juste like in the other app you showed, so I will look into it.

maelchiotti avatar Jun 06 '24 07:06 maelchiotti

Hi again @AI-IMED.

  • Regarding the interface: the app was never in RTL mode because it used the locale of the app to determine which mode to use. As no RTL languages are supported (yet), the app falls back to english which is LTR. I modified that in #86 to set the directionality of the app based on the device locale directly, so if your phone does use an RTL language, the app will also be in RTL even if it uses english for the strings.
  • Regarding the editor: The fleather library seems to switch to RTL only if a line begins with an RTL character. To me it looks like a design choice, and a popular one, as I encountered it in Simplenote, Google Keep, Notein... If you believe this should be changed, feel free to create an issue in their repository.

maelchiotti avatar Jun 09 '24 13:06 maelchiotti

RTL support was completely removed starting with version 2.0.0-dev2❗

AI-IMED avatar Nov 05 '25 07:11 AI-IMED

Really? I don't think I made any changes about this. It it removed in the app, in the editor or both?

maelchiotti avatar Nov 05 '25 08:11 maelchiotti

Both

AI-IMED avatar Nov 05 '25 08:11 AI-IMED