#10148 — The message got sent but it also stayed in the compose box#22227
#10148 — The message got sent but it also stayed in the compose box#22227AndrewGable merged 17 commits intoExpensify:mainfrom
Conversation
There was a problem hiding this comment.
I know this is still a draft, but as far as I know, in React Native for iOS, the text input switches between single-line and multi-line input. So, if the name is mandatory to update, it may cause some issues with multi-line input.
here is the source of the code in react native :
https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.js#L1412-L1416
and it may have a different name in Android I think it's AndroidTextInput .
what do you think?
|
@rushatgabhane 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] |
|
On clicking the send message button, the app keeps crashing for me on the release build. |
|
I'll check it too. maybe after fixing tests I've broke something. On which platform does it occur for you? @rushatgabhane |
|
Yeah my bad, will fix it! |
rushatgabhane
left a comment
There was a problem hiding this comment.
Thanks for the fix! Tests well and the composer feels fluid to use
Requesting a few minor style changes
rename aref to animatedRef Co-authored-by: Rushat Gabhane <rushatgabhane@gmail.com>
|
Hi @rushatgabhane ! All review requests are implemented and conflicts resolved 🚀 |
|
Thank you! Reviewing |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-07-21.at.22.40.20.movMobile Web - ChromeWhatsApp.Video.2023-07-21.at.21.26.48.mp4Mobile Web - SafariScreen.Recording.2023-07-21.at.23.40.25.movDesktopScreen.Recording.2023-07-21.at.23.45.10.movAndroidWhatsApp.Video.2023-07-21.at.21.14.21.mp4Multiline - WhatsApp.Video.2023-07-21.at.21.22.03.mp4 |
| 'worklet'; | ||
|
|
||
| const viewTag = animatedRef(); | ||
| const viewName = 'RCTMultilineTextInputView'; |
There was a problem hiding this comment.
is the view name important for _updatePropsPaper?
because i still think this is not the correct name in Android.
as I remember it was something like AndroidTextInput.
There was a problem hiding this comment.
It’s relevant only for iOS, on Android this argument is ignored.
|
All yours @AndrewGable |
|
@AndrewGable bumping |
|
✋ 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/AndrewGable in version: 1.3.47-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.47-6 🚀
|
|
Did this fix the issue in iOS as well? On Dev, on iOS app, I found the message still stays in the composer if i click send quickly and then keep typing text. Screen.Recording.2023-08-03.at.10.51.57.PM.mov |
| const animatedRef = this.props.animatedRef; | ||
| const setCommentEmpty = () => this.setState({isCommentEmpty: true}); | ||
| const Tap = Gesture.Tap() | ||
| .enabled(!(this.state.isCommentEmpty || isBlockedFromConcierge || this.props.disabled || hasExceededMaxCommentLength)) |
There was a problem hiding this comment.
Hi, this PR caused a bug. The cursor is not of type disabled when the composer is disabled.
More details here - #23848 (comment)

Details
This PR introduces new clearing input mechanic for sending messages. It utilize the reanimated worklets to run code on native UI thread, when JS thread tends to be occupied
Fixed Issues
$ #10148
PROPOSAL: #10148 (comment)
Tests
Offline tests
Same as Test steps
QA Steps
Same as Test steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-07-13.at.20.18.14.mov
Mobile Web - Chrome
Screen.Recording.2023-07-13.at.20.28.27.mov
Mobile Web - Safari
Screen.Recording.2023-07-13.at.20.16.06.mov
Desktop
Screen.Recording.2023-07-13.at.20.33.01.mov
iOS
Screen.Recording.2023-07-11.at.19.05.09.mov
Android
Screen.Recording.2023-07-12.at.12.32.41.mov