Conversation
With min-width, the scroll view will scroll when the hide keyboard icon appears.
| const apiFetch = require( '@wordpress/api-fetch' ).default; | ||
| const wpData = require( '@wordpress/data' ); | ||
|
|
||
| I18nManager.forceRTL( false ); // Change to `true` to debug RTL layout easily. |
There was a problem hiding this comment.
Not sure if we should leave this here. But for the moment it could be useful for fast checking RTL layout in both iOS and Android, without the need of AndroidStudio or Xcode or changing settings on device.
There was a problem hiding this comment.
I guess we can leave it here. It doesn't hurt, no?
|
Hey @daniloercoli - Can I bug you with a review? |
It seems that |
|
Tested this PR on both iOS and Android, and it seems to work fine. LGTM once gb conflicts are resolved. Note related to this PR, but i've noticed that the Image Settings BottomSheet is not dismissed when I tap back button on Android. I need to tap outside the sheet to dismiss it. (Tested on Android 6 - Nexus 5). |
|
Thank you @daniloercoli for the review!
Good catch! If I recall correctly, @marecar3 also noticed it and was working on a fix. I'm not really sure if that's the case. If it's not, I can check that out. 👍 |
|
Thank you! |
Fixes #380
This PR fixes two issues related to RTL layout.
1. The block Toolbar on Android:
The content of the scroll view on Android was aligned left, while on iOS it was correctly aligned right. Probably the issue has little to do with alignment itself but on how each platform rotate scroll view for RTL support.
This was fix by forcing the content to grow as big as the scroll view itself (allowing it to grow bigger if necessary).
2. BottomSheet text input:
Fixed in the
gutenbergrelated PR (WordPress/gutenberg#13815)This was an issue since we are inverting the natural alignment for text inputs, so we had to express this intention on RTL layout too. Sadly
text-align: enddidn't work (it's not allowed).I added a helper to test RTL layout, but I'm unsure if we should keep for continue testing RTL in the future. Ideally we would have a switch in the UI or use the RN Dev Menu, but this last option requires native development.
To test:
src/index.jsand switchI18nManager.forceRTL(false);totrue.