-
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
#10148 — The message got sent but it also stayed in the compose box #22227
Conversation
'worklet'; | ||
|
||
const viewTag = aref(); | ||
const viewName = 'RCTSinglelineTextInputView'; |
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.
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! |
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 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 <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s relevant only for iOS, on Android this argument is ignored.
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.
LGTM! (storybook tests well too)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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
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