Report actions Onyx migration for accountIDs#21509
Conversation
1565a7f to
bccd465
Compare
|
@AndrewGable 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] |
Beamanator
left a comment
There was a problem hiding this comment.
a few general comments before continuing - i think it looks good, i just need these comments answered to wrap my brain around these migrations first :D
Beamanator
left a comment
There was a problem hiding this comment.
One more question @puneetlath : Should we also be removing old email data from the front-end? Or will we do that in a different step?
We'll do that in a different step once the back-end has stopped sending it. For now, we're just making sure the client doesn't break because it is missing needed data. Once the back-end stops sending any given email-based data, we'll also update this migration to include removing any of that type of data. |
Beamanator
left a comment
There was a problem hiding this comment.
Nice, ok this makes sense to me now and looks like it's working well!
Co-authored-by: Alex Beaman <alexbeaman@expensify.com>
Beamanator
left a comment
There was a problem hiding this comment.
Lookin great! Sorry don't have time to completely test this today, can get to it tomorrow if nobody else does by then 🙏
|
Taking this as C+ |
s77rt
left a comment
There was a problem hiding this comment.
Looking good and tests well, just left very minor comments
| return; | ||
| } | ||
|
|
||
| const newReportAction = reportAction; |
There was a problem hiding this comment.
Why we are adding a new variable here? Both newReportAction and reportAction refer to the same object.
There was a problem hiding this comment.
Hmm but under the hood we are doing exactly that right? if you console.log reportAction it will be exactly the same as newReportAction
There was a problem hiding this comment.
I agree. Do you see it as a problem though? Is there a reason for me to copy the object instead?
There was a problem hiding this comment.
No, the objects here are used only once. All good 👍
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 1.3.33-1 🚀
|
|
Maybe we should have waited to merge this migration because of SHN. |
|
Hmm maybe yeah. I should've started a convo about it at least. My thinking was that we should've done this earlier already because people could have broken report actions in Onyx already. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.33-4 🚀
|

Details
This is the first stage in the email-to-accountID migrations that we are going to need to do. For now this migration:
This is built off the work that @roryabraham originally did in this PR.
Fixed Issues
#21454 (comment)
Tests
Onyx.set('reportActions_123', {1234: {originalMessage: {oldLogin: 'fdjsklfjdsk'}}});reportActions_123reportActions_123no longer has any dataOffline tests
There is no difference between being online or offline, since the migration is run over the locally stored data in Onyx.
QA Steps
There is nothing for QA to test, since this doesn't change the app experience in any way. It just updates the underlying Onyx data.
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