[NO QA] Reduce re-renders & remove global reports subscription in report action list#82684
[NO QA] Reduce re-renders & remove global reports subscription in report action list#82684
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…-reports-susbcription
heyjennahay
left a comment
There was a problem hiding this comment.
Code change only. Product approval not required
…-reports-susbcription
…-reports-susbcription
blimpich
left a comment
There was a problem hiding this comment.
One nab comment. Feel free to merge.
| /** | ||
| * This is a pure version of ReportActionItem, used in ReportActionList and Search result chat list items. | ||
| * Since the search result has a separate Onyx key under the 'snapshot_' prefix, we should not connect this component with Onyx. | ||
| * Instead, pass all Onyx read/write operations as props. | ||
| */ |
There was a problem hiding this comment.
Why did we remove this comment? Is it no longer true?
There was a problem hiding this comment.
@blimpich yep this is no longer true ( and it hasn't been for a while ), which made this PR originally hard to implement.
|
@blimpich could I trouble you with another approval since I had to merge and manually fix conflicts 🙇🏻 |
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.26-8 🚀
|
Explanation of Change
Removes the subscription to all reports in the report action list, to prevent excessive re-renders in the list. Also decreases the memory to render these items
Fixed Issues
$ #82706
$ #82711
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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./** 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)