-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Remove duplicate withOnyx calls #28866
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
Conversation
Deploying with
|
| Latest commit: |
21dbdb7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3ddfae1c.helpdot.pages.dev |
| Branch Preview URL: | https://tgolen-remove-multiple-witho.helpdot.pages.dev |
|
npm has a |
|
@situchan are you able to do the checklist today? If now, we can reassign to someone else with spare cycles. Thanks! |
|
I think everywhere right? @tgolen |
|
Now that Onyx is updated I can remove the nested |
|
@tgolen conflicts! |
|
@situchan conflicts are resolved now |
|
@situchan bump for review please |
|
reviewing |
| report: { | ||
| key: ({route, iou}) => `${ONYXKEYS.COLLECTION.REPORT}${IOU.getIOUReportID(iou, route)}`, | ||
| }, | ||
| iou: { | ||
| key: ONYXKEYS.IOU, | ||
| }, |
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.
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.
Ah, that's interesting. The undefined is expected so the only thing that matters is that getIOUReport() protects against an undefined value, which it does. However, I see that it returns an empty string in the case of undefined which is not desired and would subscribe to the entire report collection. I've updated this to return 0 for the iou report ID which is the more proper way of handling this.
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 am still concerned about undefined on first render.
Sometimes this will cause unexpected behavior like #30866 (comment)
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.
Yeah, I agree with you that it's a problem for #30866. I would like to take a look at it in that PR and try to solve it over there. I feel it's unrelated to this specifically, but will let you know.
|
Looks good but only one concern above. Can that be out of scope and fix in Onyx repo? |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
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.
![]()
|
@joelbettner 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] |
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 pushing this ahead, I will merge this one as it would be great to include this in a following deploy
|
✋ 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.98-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.99-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.99-0 🚀
|



Details
This PR removes the duplicates usages of
withOnyxand turns the ESLint error back on. I used this grep to find multiple calls towithOnyx(. The only remaining files are ones where "withOnyx()" exists in comments.Fixed Issues
$ #28824
Tests
Offline tests
None
QA Steps
Same as the tests above
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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android