Cleanup some dependencies on report name value pairs#59962
Conversation
|
The tests are failing because of the anti-patterns of using |
| policy: OnyxTypes.OnyxInputOrEntry<OnyxTypes.Policy> | SearchPolicy, | ||
| chatReportRNVP?: OnyxTypes.ReportNameValuePairs, | ||
| ) { | ||
| function canApproveIOU(iouReport: OnyxTypes.OnyxInputOrEntry<OnyxTypes.Report> | SearchReport, policy: OnyxTypes.OnyxInputOrEntry<OnyxTypes.Policy> | SearchPolicy) { |
There was a problem hiding this comment.
There wasn't any instance of canApproveIOU() that was passing more than two arguments, so I removed the third parameter entirely.
Trying to get rid of getReportNameValuePairs() is very difficult, so I'm going to slowly try to do it in other PRs. It's because canApproveIOU() is used in many places, so it will take many updates to be able to pass the rNVPs as an argument.
There was a problem hiding this comment.
Sounds good, I also think we could get a contributor to help with this if we make this external? If there's a reason for it to be internal, I can also help with this
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Desktop |
|
I'm finding one problem with this, the admins room does not seem to have the
|
|
Actually, this happens on main as well: Interesting that this test doesn't catch it. I'm going to make a bug report but this PR should be good to merge |
|
✋ 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/srikarparsi in version: 9.1.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.28-15 🚀
|




Explanation of Change
This performs some
Fixed Issues
Part of #59940
Tests
NOTE: This can only be tested in web because that is the only platform that let's you go back to the archived report.
Offline tests
Same as above
QA Steps
NOTE: This can only be tested in web because that is the only platform that let's you go back to the archived report.
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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