-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix memoization of ReportActionItem
#24057
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
Fix memoization of ReportActionItem
#24057
Conversation
|
@j-piasecki Is this coming from a specific GH issue? Can you link it properly in the description? |
|
@j-piasecki Ahh gotcha, thank you for the context |
|
It's similar to #19761. Someone probably made a mistake when adding the conditions for memoization. Or was this intentional @jasperhuangg (looks like you added the code)? |
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
@j-piasecki Are there any test steps we can add to the description to make sure nothing broke after this? Basically so the QA team can test it. |
|
I think they should be exactly the same as in #20841, since we fix an issue introduced in that PR. |
|
Awesome, I will update the description and then merge! |
|
✋ 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 https://github.com/pecanoro in version: 1.3.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀
|
|
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.3.52-0 🚀
|
|
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.3.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.52-5 🚀
|


Details
The memoization of
ReportActionItemseems to be broken at the moment as it's updated on each render. This PR makes it so that it's actually memorized.Fixed Issues
$
PROPOSAL:
Tests/Offline tests/QA
These tests should function exactly the same when offline, since we're setting optimistic data for everything
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting 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)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.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android