[no qa] perf: decompose OptionRowLHN avatar/delegate logic into a separate component#89087
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
# Conflicts: # src/components/LHNOptionsList/OptionRowLHN.tsx
# Conflicts: # src/components/LHNOptionsList/OptionRowLHN.tsx
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
🚧 @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! 🧪🧪
|
|
✋ 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/JS00001 in version: 9.3.66-0 🚀
|
|
No help site changes needed — this PR is a pure internal refactoring (extracting avatar rendering into a child component for performance). There are no user-facing changes. |

Explanation of Change
Extracts the avatar rendering and delegate-avatar substitution logic into a child component (
OptionRowAvatar). The four delegate-related derivations (delegateAccountID,skipDelegate,icons,delegateTooltipAccountID) and theusePersonalDetailsread move out of the parent row.useCurrentUserPersonalDetailsstays in the parent (still consumed for status timezone). Thenull-render short-circuit when!optionItem.icons?.length || !firstIconis preserved inside the child.React.memo(OptionRowLHN)is preserved.Measured impact
Fixed Issues
$ #89093
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari