-
Notifications
You must be signed in to change notification settings - Fork 3k
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
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
ReportActionItem
seems 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting 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)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android