-
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
Remove deprecated createOrFetchReport method #12157
Conversation
…xist, and call openReport to get new messages if they exist
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
@@ -86,7 +86,6 @@ class AuthScreens extends React.Component { | |||
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! |
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.
Testing well for me 👍
Awesome! @roryabraham @thienlnam if you guys could review so we can merge this after today's web deploy that would be great! |
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 🚀
|
@@ -708,6 +510,7 @@ function openReport(reportID, participantList = [], newReportObject = {}) { | |||
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!
@@ -969,7 +791,7 @@ function handleReportChanged(report) { | |||
// A report can be missing a name if a comment is received via pusher event | |||
// 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.
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/238801
Tests
QA Steps
PR Review Checklist
PR Author Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting 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)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesWaiting 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
have been tested & I retested again)/** 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)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