Remove data from being sideloaded in the money request header#27286
Conversation
|
@techievivek 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] |
|
My android setup is broken 😢 I am not sure if I can fill the whole checklist. |
|
Let me try to bring it up. Sorry for the delay. |
|
Before any new conflicts arise, I'm going to bring in a C+ to help with review, since both Android and iOS builds are broken for me: https://expensify.slack.com/archives/C03TQ48KC/p1694747895004179 |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Also please pull main
| personalDetails: PropTypes.objectOf(participantPropTypes).isRequired, | ||
|
|
||
| /** Onyx Props */ | ||
| ...windowDimensionsPropTypes, |
There was a problem hiding this comment.
As this is function component, let's use useWindowDimensions hook
| transaction: { | ||
| key: ({report, parentReportActions}) => | ||
| `${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(parentReportActions, [report.parentReportActionID, 'originalMessage', 'IOUTransactionID'], '')}`, | ||
| key: ({parentReportAction}) => `${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(parentReportAction, 'originalMessage.IOUTransactionID', 0)}`, |
There was a problem hiding this comment.
Good catch! parentReportActions -> parentReportAction
Seems like fixing regression from #25498
There was a problem hiding this comment.
Yes! I spotted that and wanted to fix it here.
|
Lint is failing |
|
I have fixed the lint issues, used the dimension hook, and retested it. Can you please have another look? Thanks! |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.mov |
|
@arosiclair 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] |
|
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #27676. |
|
@arosiclair can you please review and merge this? There is already a reviewer checklist filled out, so you can skip that (I'm not sure why Melvin requested you to fill one out). |
arosiclair
left a comment
There was a problem hiding this comment.
Code LGTM but I don't actually see any of those sideloading get functions being removed from MoneyRequestHeader in these changes 🤔
So, the funny part about it is that someone already updated this component while my PR was open to remove those methods :D I promise they were there when I started! 😂 |
|
Oh makes sense haha. Good to merge then 👍 |
|
✋ 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/arosiclair in version: 1.3.72-0 🚀
|
|
I just checked on
However, for the purposes of this testing, as long as you see this scanning header, then that's really all that matters.
An alternative way to test this would be to do a manual request to User A and a scan request to User B, and check each of the headers. It doesn't matter if the transactions are in the same report or not. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|





Details
This PR marks the two methods as deprecated and then removes them from the money request header and instead loads the data using
withOnyx()Fixed Issues
Part of #27262
Tests
Offline tests
None really. If you create the requests when you're offline, you can't open them up to view the details until it's synced with the server.
QA Steps
Same as tests
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