[Android] Improve consistency for overflowed TextInput#45
Merged
johnmlee101 merged 1 commit intoExpensify:Expensify-0.70.4-alpha.2from Mar 31, 2023
redstar504:Brayden-TextInputRenderPosition-Exfy
Merged
[Android] Improve consistency for overflowed TextInput#45johnmlee101 merged 1 commit intoExpensify:Expensify-0.70.4-alpha.2from redstar504:Brayden-TextInputRenderPosition-Exfy
johnmlee101 merged 1 commit intoExpensify:Expensify-0.70.4-alpha.2from
redstar504:Brayden-TextInputRenderPosition-Exfy
Conversation
1 task
Member
|
@johnmlee101 Should we wait for RN review on this one? |
|
I think it's been long enough, we should probably be fine updating this here for now and still continue to push in upstream |
Member
|
@johnmlee101 Would there be a diff if this get merged today or later on? We are currently updating our RN version on E/App. If this get merged sooner can we include the fix in the current in-process RN upgrade? |
|
Maybe! Who is currently leading that RN upgrade? |
Member
johnmlee101
approved these changes
Mar 31, 2023
Member
|
@johnmlee101 Looks like you merged the commit to the wrong branch. Can you arrange a new RN upgrade |
57 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream PR Link
facebook#36428
Summary
Coming from this issue: Expensify/App#15310
In the linked issue we have identified a difference in how TextInput components behave when the text is longer than the width of the field on Android compared to other platforms. On other platforms, the beginning of the line of text is shown and the end is clipped. However, on Android, the end of the line of text is displayed during render and auto-fill events.
To make the behavior consistent across all platforms, this pull request updates the Android implementation of TextInput to show the beginning of the line and clip the end, like on other platforms. This is done by adding a scroll function to the afterChangedText event in the existing TextWatcher used for detecting changes in text for the Android widget. This function is triggered when the field is unfocused, and therefore only applies to initial rendering and auto-filling events.
cc @s77rt @johnmlee101
Changelog
[ANDROID] [Fixed] - TextInput not displaying start of text on render like other platforms
Test Plan
Before Change
ex-platform-test-before.mp4
After Change
ex-platform-test-after.mp4