Refactored localeCompare in ReportUtils (part 3)#68101
Refactored localeCompare in ReportUtils (part 3)#68101mountiny merged 7 commits intoExpensify:mainfrom
Conversation
|
@DylanDylann 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] |
| participantDetails.push([accountID, displayNameLogin ?? '', avatarSource, personalDetails?.[accountID]?.fallbackIcon ?? '']); | ||
| } | ||
|
|
||
| const sortedParticipantDetails = participantDetails.sort((first, second) => { |
There was a problem hiding this comment.
Context: Removed the sorting from here as major refactor revolving this happened where we are sorting later for multiple icons anyway.
There was a problem hiding this comment.
@shubham1206agra Could you please give more details to explain why we remove the sort function here?
There was a problem hiding this comment.
We don't need to sort because sorting is happening for icons case-by-case basis now in different place.
There was a problem hiding this comment.
@shubham1206agra Sorry, where is the sorting happening? Could you please provide an example?
There was a problem hiding this comment.
There was a problem hiding this comment.
@shubham1206agra Since we removed the sorting logic from getIconsForParticipants, we now need to ensure that sorting is applied wherever this function is used. Could you please confirm that all such places have been covered?
There was a problem hiding this comment.
@DylanDylann I have discussed about this here https://expensify.slack.com/archives/C08CZDJFJ77/p1754547372604689. So you can proceed as usual here
|
@DylanDylann Bump here |
|
@shubham1206agra Got it. Thanks for your explanation |
|
@shubham1206agra Could you add some tests for sortIconsByName function? |
@DylanDylann We are not exporting that function anywhere. So, we can't write test for that. |
|
Can we export it or move it to a util file? I believe that we require the UTs for sorting logic |
|
@shubham1206agra Kindly bump |
|
@DylanDylann Added tests here |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2025-08-25.at.18.41.15.movAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ 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/mountiny in version: 9.1.99-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.99-11 🚀
|
Explanation of Change
Refactor for
getIconsForParticipantsFixed Issues
$ #66325
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
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))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
Screen.Recording.2025-08-07.at.3.44.46.PM.mov