-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[TS migration] Migrate 'updatePropsPaperWorklet' lib to TypeScript #31546
[TS migration] Migrate 'updatePropsPaperWorklet' lib to TypeScript #31546
Conversation
src/pages/home/report/ReportActionCompose/ReportActionCompose.js
Outdated
Show resolved
Hide resolved
@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] |
@rushatgabhane friendly bump :) |
// We are setting the isCommentEmpty flag to true so the status of it will be in sync of the native text input state | ||
runOnJS(setIsCommentEmpty)(true); | ||
runOnJS(resetFullComposerSize)(); | ||
updatePropsPaperWorklet(viewTag, viewName, updates); // clears native text input on the UI thread | ||
setNativeProps(animatedRef, {text: ''}); // clears native text input on the UI thread |
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.
setNativeProps
for react-native
is deprecated.
To migrate to Fabric architecture, we have to remove all usages of setNativeProps
.
Could we confirm if it's OK to use setNativeProps
from react-native-reanimated
?
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.
setNativeProps
from react-native-reanimated
is something different than setNativeProps
from react-native
; it works on the UI thread and it doesn't have some of the problems of setNativeProps
from react-native
, see docs here: https://docs.swmansion.com/react-native-reanimated/docs/advanced/setNativeProps/
It's used here as a workaround to fix an underlying issue in RN's TextInput component until we have a better solution.
Finally, setNativeProps
from react-native-reanimated
in fact a public wrapper on _updatePropsPaper
(which is meant to be used only internally) so this PR does not introduce any functional changes.
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.
Does this answer your question? @rushatgabhane 😄
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.
yes thank you so much, Tomek!!
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-19.at.04.35.13.movAndroid: mWeb ChromeScreen.Recording.2023-12-19.at.05.02.41.moviOS: NativeScreen.Recording.2023-12-19.at.03.04.21.moviOS: mWeb SafariScreen.Recording.2023-12-19.at.05.03.41.movMacOS: Chrome / SafariScreen.Recording.2023-12-19.at.04.52.52.movMacOS: Desktop |
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
We did not find an internal engineer to review this PR, trying to assign a random engineer to #24765 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@lakchote we should merge this, right? |
@rushatgabhane I think we should but PR Reviewer Checklist is failing for some reason |
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.
recheck.
ok all looks good now
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.
@BartoszGrajdek Could you please merge main into this PR before merging?
merge main into ts-migration/update-props-worklet-lib
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!
✋ 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.4.23-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.23-4 🚀
|
Details
After this task was created react-native-reanimated has been updated and there's no longer a need for this code, so I'm removing it, and using built-in function.
Fixed Issues
$ #24765
Tests
Offline tests
QA 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
android.mov
Android: mWeb Chrome
chrome.mov
iOS: Native
ios.mov
iOS: mWeb Safari
safari.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov