mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.48k stars 1.27k forks source link

Closes #7861: position text based on layout direction, not text directionality #28740

Closed mavduevskiy closed 1 year ago

mavduevskiy commented 1 year ago

Getting back to the RTL PR that caused regression and was reverted.

We use android:textAlignment="viewStart" already in many text views in the app, but not in every textView, which makes the UI inconsistent for RTL locales. Setting supporting RTL text alignment in styles does look like the right way of doing it.

The problem that the first PR caused: android:textAlignment overrides horizontal gravity. Views that had manually set gravity (center, center_horizontal) got broken because of that.

I tried to change the layouts as little as possible, adding the cener textAlignment for the textViews that want the text to be in the middle while having 0width.

As a follow up, I will remove manually set android:textAlignment="viewStart" in textViews, since the code is duplicated.

Pull Request checklist

QA

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #7861

gabrielluong commented 1 year ago

Hey @mavduevskiy, we have migrated the original issue over to Bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1815637. When this is ready to land, could we please update your commit message and PR title to reference the new Bugzilla issue using the following format: "Bug xxxxxx - \<short description>". Thanks!

mavduevskiy commented 1 year ago

will be done in monorepo