-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
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] |
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.
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
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.
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. |
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.
Nice, ok this makes sense to me now and looks like it's working well!
Co-authored-by: Alex Beaman <alexbeaman@expensify.com>
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.
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+ |
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.
Looking good and tests well, just left very minor comments
return; | ||
} | ||
|
||
const newReportAction = reportAction; |
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.
Why we are adding a new variable here? Both newReportAction
and reportAction
refer to the same object.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the objects here are used only once. All good 👍
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!
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_123
reportActions_123
no 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android