migrate from withOnyx HOC to the useOnyx hook#50443
Merged
neil-marcellini merged 5 commits intoExpensify:mainfrom Nov 5, 2024
Merged
migrate from withOnyx HOC to the useOnyx hook#50443neil-marcellini merged 5 commits intoExpensify:mainfrom
neil-marcellini merged 5 commits intoExpensify:mainfrom
Conversation
janicduplessis
approved these changes
Oct 9, 2024
Contributor
janicduplessis
left a comment
There was a problem hiding this comment.
Looks good to me!
Contributor
Contributor
|
Does this one require C+ review? |
Contributor
|
I do not think so, the change is pretty simple and just a refactor to hooks. |
Contributor
|
I would like a C+ review and I would also like to see some test steps please, to make sure we don't break anything. |
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
neil-marcellini
approved these changes
Nov 5, 2024
Contributor
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks great thank you
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
71 tasks
Contributor
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.0.58-0 🚀
|
Contributor
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.58-2 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
I removed the userLocation from the props and fetched it from the Onyx store using the useOnyx hook. This change caused a TypeScript error because userLocation was still listed in the MapView props. You can see the relevant code here: MapView types.
To fix the error, I had to remove userLocation from the props types. However, these props types were also used in other files file: MapViewImpl.
Hence I changed withOnyx to useOnyx in all these files.
Since only MapViewProps was needed in the types file, I realized there was no need for the types.ts file in the MapView folder. Instead, we can directly import MapViewProps in the MapView components.
Here are the changes I made:
Thank you.
Fixed Issues
$#50343
PROPOSAL:#50343 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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