-
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
Improve performance of optionslist #13398
Conversation
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeMobile Web - Safari |
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.
Changes look good to me. Aside from my one, nit-picky NAB, the linter is complaining about some unused import
s
src/libs/ReportUtils.js
Outdated
CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, | ||
CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE, | ||
CONST.REPORT.CHAT_TYPE.DOMAIN_ALL, | ||
], lodashGet(report, ['chatType'], '')); | ||
].indexOf(report ? report.chatType : '') > -1; |
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.
NAB: You could probably DRY this up a bit between here and 187.
Test well 👍 Just need to fix the lint. Screenshots/VideosWeb13398.Web.mov13398.Web.Offline.movMobile Web - Chrome13398.mWeb-Chrome.movMobile Web - Safari13398.mWeb-Safari.movDesktop13398.Desktop.mov13398.Desktop.Offline.moviOS13398.iOS.mov13398.iOS.Offline.movAndroid13398.Android.mov13398.Android.Offline.mov |
…nslist' into tgolen-analyze-performance-optionslist
…nslist' into tgolen-analyze-performance-optionslist
…nslist' into tgolen-analyze-performance-optionslist
OK, this is updated to DRY up checking the report chatType and it also fixed a console warning that I caused. Please be sure to re-run all tests. |
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.
LGTM and tests well! 👍
Web ✅
mWeb/Safari ✅
mWeb/Chrome ✅
Desktop ✅
iOS ✅
Android ✅
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@deetergp Could you tag the BZ who assigned the final payment? Thanks! |
@deetergp I just following the C+ External process 😅 |
Ah, I understand now, thanks! |
🚀 Deployed to production by @chiragsalian in version: 1.2.38-6 🚀
|
const displayNameStyle = StyleUtils.combineStyles(props.mode === CONST.OPTION_MODE.COMPACT | ||
? [styles.optionDisplayName, ...textUnreadStyle, styles.optionDisplayNameCompact, styles.mr2] | ||
: [styles.optionDisplayName, ...textUnreadStyle], props.style); | ||
const alternateTextStyle = StyleUtils.combineStyles(props.mode === CONST.OPTION_MODE.COMPACT | ||
? [textStyle, styles.optionAlternateText, styles.textLabelSupporting, styles.optionAlternateTextCompact] | ||
: [textStyle, styles.optionAlternateText, styles.textLabelSupporting], props.style); | ||
const contentContainerStyles = props.mode === CONST.OPTION_MODE.COMPACT | ||
? [styles.flex1, styles.flexRow, styles.overflowHidden, styles.alignItemsCenter] | ||
: [styles.flex1]; | ||
const sidebarInnerRowStyle = StyleSheet.flatten(props.mode === CONST.OPTION_MODE.COMPACT ? [ | ||
styles.chatLinkRowPressable, | ||
styles.flexGrow1, | ||
styles.optionItemAvatarNameWrapper, | ||
styles.optionRowCompact, | ||
styles.justifyContentCenter, | ||
] : [ | ||
const displayNameStyle = [styles.optionDisplayName, ...textUnreadStyle, props.style]; | ||
const alternateTextStyle = [textStyle, styles.optionAlternateText, styles.textLabelSupporting, props.style]; | ||
const contentContainerStyles = [styles.flex1]; |
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.
The removal of StyleUtils.combineStyles
caused this #13508
(following BugZero Checklist)
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/228943
Tests
Offline tests
Same as the above. The only difference you will see is that avatars probably won't be displayed, which is fine.
QA Steps
Same as the above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
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)Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android