[HOLD] Replace one use of fetchChatReportsByIDs which makes multiple API calls with a single API call to GetChats#9631
[HOLD] Replace one use of fetchChatReportsByIDs which makes multiple API calls with a single API call to GetChats#9631cead22 wants to merge 12 commits into
Conversation
0bf0b77 to
31f2c52
Compare
| // Removing the workspace data from Onyx as well | ||
| return Onyx.set(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, null); | ||
| }) | ||
| .then(() => Report.fetchAllReports(false)) |
There was a problem hiding this comment.
Looks like we added this so that report names for policy rooms would update when deleted -> #7301
Since we are still using the DeprecatedAPI.Policy_Delete() here I wonder if we have plans to add this back in.
cc @chiragsalian since you got https://github.com/Expensify/Expensify/issues/215184
There was a problem hiding this comment.
Yeah I ended up adding a call to AppInit::fetchReports($authToken); on web (https://github.com/Expensify/Web-Expensify/pull/34172/files#diff-8367f109728fcc54db479ccc765a52d2115e52d35eba9c660e665be1a34411acR1613) to push the updated report names
There was a problem hiding this comment.
Ah got it, totally reviewed this PR before seeing that other one 🤦♂️
|
|
||
| if (shouldRecordHomePageTiming) { | ||
| Timing.end(CONST.TIMING.HOMEPAGE_REPORTS_LOADED); | ||
| } |
There was a problem hiding this comment.
We're leaving a dangling timer here now that will never get the end() called
I'm not sure if there's a clear way to preserve this behavior and think this metric matters less now that all of the front end logic we were timing is moved to the backend. We can probably just 🔪 this particular trace.
| @@ -661,43 +660,6 @@ function fetchInitialActions(reportID) { | |||
| * @param {Boolean} shouldRecordHomePageTiming whether or not performance timing should be measured | |||
| * @returns {Promise} | |||
| */ | |||
There was a problem hiding this comment.
Doc above this can be removed as well.
|
Updated, but still on HOLD til the Web PR is merged |
|
@luacmartins @marcaaron closing this since per this comment https://github.com/Expensify/Web-Expensify/pull/34172#pullrequestreview-1074255591, to leave the removal of fetchAllReports to the person refactoring Policy_Delete |
Details
Fixed Issues
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly 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
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly 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)QA Steps
Screenshots
Web
Mobile Web
Desktop
iOS
Android