-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix #16696] Rewrite BaseTextInput
to function component
#20186
[Fix #16696] Rewrite BaseTextInput
to function component
#20186
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@mountiny @narefyev91 One of you needs to 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] |
BaseTextInput
to function component
@narefyev91 lets make sure to test the app thoroughly not only based on the tests steps due to the importance of this component. Mentions might be a good thing to look at |
Reviewer Checklist
Screenshots/VideosWebweb2.movweb1.movMobile Web - Chromeandroid-web2.movandroid-web1.movMobile Web - Safariios-web2.movios-web1.movDesktopdesktop2.movdesktop1.moviOSios2.movios1.movAndroidScreen.Recording.2023-06-07.at.14.03.49.movScreen.Recording.2023-06-07.at.13.55.36.mov |
@hannojg something strange happened with native android, sometimes cursor jumped in not correct position - when typing fast, and i could not see highlight menu most of the times..... and when you get it, you can only move highlighter area on one position Screen.Recording.2023-06-07.at.13.55.36.movScreen.Recording.2023-06-07.at.14.03.49.mov |
Hey @narefyev91 thanks for the testing! I think the issues you are encountering on android are due to the fact, that your environment doesn't include the native fixes from Expensify/react-native#55 yet (i double tested it, and with the native fix i can't reproduce the issues). I think those bugs have been also there before this changes, however, i am not entirely sure. Do you guys feel it makes sense to put the PR on hold until the native fix has landed? |
If we have already those bugs before - and current implementation is not introduce something new for other platforms (which is true) - i think we can not hold this - there are several tickets that may be unblocked/moving forward with new functional implementation - i will say that we can merge this one, but let's have @mountiny get last word here. |
Thanks, due to SNH Conference and this being such important component, I will wait with merging this for next week! Thanks so much for thorough review and testing. |
Meanwhile, we are waiting. @mountiny Do you think I should also be assigned to the issue for payment? This component's complexity was high thus more testing work. |
@parasharrajat I'm assigned in #16696 but I didn't review this PR since I was not aware of it (only after some time later) because this PR linked the other issue first and you got requested for review instead. So I think it would be fair that you take the C+ role here #16696 as well. |
…re/rewrite-basetextinput-to-function-component
Merge conflicts resolved, made sure the latest changes made to the class component are reflected appropriately in the new function component |
Bump @mountiny |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your patience while i was ooo and thorough testing and review. Going to ship it now. Thanks everyone!
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
✋ 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/mountiny in version: 1.3.37-0 🚀
|
FYI this PR also seems to have introduced this regression. I'd revert it, but we have a PR ready to go so I think that's the simpler path forward. |
I think we mistakenly removed it during merge conflicts. There was no intention of changing styles. Or may be this flex1 style was added while we working on the PR and thus accidentally got removed. |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.37-7 🚀
|
This regression was caused by the changes introduce in this PR. IssueTitle: DEV: Console error on type email in close account page |
This caused a regression of Text Description not toggling properly - more information here #22204 (comment) |
Details
Previously the
BaseTextInput
component would control its own internal state for the input's value. Meaning when thevalue
prop changed, it would re-render another time as incomponentDidUpdate
the internalvalue
state got updated with a consecutivesetState
call.It was discussed that the most future proof fix for this is to refactor to a function component and to use the
value
prop directly.Fixed Issues
$ #16205
$ #16696
PROPOSAL: #16696 (comment)
Tests
Offline tests
This change doesn't work with any network features, so no separate offline tests are needed.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
chrome.mov
safari.mov
Mobile Web - Chrome
mWeb-AndroidChrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mov