-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Remove deprecated createOrFetchReport method #12157
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
…xist, and call openReport to get new messages if they exist
roryabraham
left a 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.
Heads up – there were a few extra changes from this PR that we should include over here
| super(props); | ||
|
|
||
| Timing.start(CONST.TIMING.HOMEPAGE_INITIAL_RENDER); | ||
| Timing.start(CONST.TIMING.HOMEPAGE_REPORTS_LOADED); |
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.
This timer was being started but never stopped / recorded, because the stop for it was in fetchAllReports, which was no longer being called anywhere.
|
cc @Julesssss since you graciously volunteered to make sure I didn't break IOUs with this <3 |
|
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
|
Also if anyone can think of other test cases based on the code this touches, please suggest it! |
|
Awesome! @roryabraham @thienlnam if you guys could review so we can merge this after today's web deploy that would be great! |
roryabraham
left a 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.
According to the React Native Upgrade Helper, it looks like we shouldn't commit that contents.xcworkspacedata file. I don't really know if it matters, but I'd suggest just adding it to the .gitignore since it was explicitly removed from the template app at some point.
d827fc4
|
Nice catch. Remove the file! |
|
Just need @thienlnam for the final review! |
|
Who's taking care of the PR Reviewer checklist? |
|
|
✋ 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 @thienlnam in version: 1.2.27-0 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.2.27-4 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.2.27-4 🚀
|
| isLoadingMoreReportActions: false, | ||
| lastVisitedTimestamp: Date.now(), | ||
| lastReadSequenceNumber: getMaxSequenceNumber(reportID), | ||
| reportName: CONST.REPORT.DEFAULT_REPORT_NAME, |
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.
This caused a regression. Whenever a report is opened the name is reset to the default, and it's only set back to the proper name, like #admins, when the response comes back.
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 letting me know and taking care of it!
| // and the report does not yet exist in Onyx (eg. a new DM created with the logged in person) | ||
| if (report.reportID && report.reportName === undefined) { | ||
| fetchChatReportsByIDs([report.reportID]); | ||
| openReport(report.reportID); |
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.
Calling OpenReport here caused a regression #13913 . OpenReport also marks the report as read.
| return; | ||
| } | ||
| this.getOrCreateChatReport(userLogins); | ||
| Report.navigateToAndOpenReport(userLogins); |
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.
We should had closed the keyboard before navigating to the report, this caused #57578
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/238801
Tests
QA Steps
PR Review Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting 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)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** 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)Screenshots
Web
2022-11-03_13-59-15.mp4
Mobile Web - Chrome
2022-11-03_13-57-20.mp4
Mobile Web - Safari
2022-11-03_15-17-07.mp4
Desktop
2022-11-03_14-18-12.mp4
iOS
2022-11-03_15-16-00.mp4
Android
2022-11-03_14-14-04.mp4