fix: autogrow heigh for TextInput#60842
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@parasharrajat Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
|
670f5db to
66a84ca
Compare
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-05-06.at.05.59.40.android.movAndroid: mWeb ChromeScreen.Recording.2025-05-06.at.05.56.47.android.chrome.moviOS: NativeScreen.Recording.2025-05-06.at.06.05.42.moviOS: mWeb SafariScreen.Recording.2025-05-06.at.06.03.09.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2025-05-06.at.05.52.21.web.movMacOS: DesktopScreen.Recording.2025-05-06.at.05.54.28.desktop.mov |
|
@Nodonisko, which changes in the PR we almost reverted to what we did in the previous PR. I'm curious about how we will migrate both Android/IOS to native auto grow later, when upstream issues are fixed in Android?
|
|
@hoangzinh Yes, fix input in RN and then migrate to native auto grow. It will be basically just about returning that |
|
@Nodonisko, do you mean the fix of auto grow is also not merged/fixed in IOS atm? I tried returning |
|
I meant that right now both iOS and Android use the same ("old way") method to handle auto-grow, where we measure the layout using TextInputMeasurement. The new way is to just use the native auto-grow feature. On iOS, both old and new ways basically feel the same for the user. If you tried replacing The old way is more complicated and less efficient internally, but users won't really notice any lag or difference on iOS. The problem is, using the new way only for iOS and keeping the old way for Android would add quite a few extra ifs in Later, once we fix the actual issue inside RN's TextInput, we can simply remove that TextInputMeasurement component and those few styles, and it will work the new way. Is it clear now? Feel free to ask additional questions. |
It's clearer now. Thanks @Nodonisko. Do you mind sharing what |
|
@hoangzinh here |
|
@Nodonisko I tried to apply the above suggestion, but it doesn't work. Did I miss any steps? Screen.Recording.2025-04-29.at.21.03.26.mov |
|
@Nodonisko @hoangzinh what are the next steps for this one? |
|
@hoangzinh Sorry my bad. I was testing only width grow and it won't be that easy for height and it will need more style adjustments. I can prepare them for you but it will take a while. I suggest to merge this now to resolve original issue and then I can prepare some draft PR that can be merged once it's TextInput fixed in RN. |
|
Sound good to me. I will complete review checklist today |
|
@Nodonisko can you please add Screenshots/Videthe os for remaining platforms? |
66a84ca to
62f307d
Compare
|
Hi, sorry I was on holiday last week. Screenshots added and also rebased to latest main. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.45-0 🚀
|
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.45-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.45-21 🚀
|


Explanation of Change
I decided put back
onLayoutmeasuring on iOS introduced in #59078. It doesn't make sense to branch it for Android/iOS because with fix forautoGrowHeighit would add too much complexity toBaseTextInputcomponent for very little benefit of smaller overhead on iOS. WithonLayoutback it should fixautoGrowHeigh.Once
TextInputcomponent on Android is fixed properly upstream we should migrate both Android/iOS to native auto grow to avoid onLayout overhead inBaseTextInput.Fixed Issues
$ #60765
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop