Fix/64607 - Tapping on sub projects tag directs to hmm not here#65499
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] |
| function getTagListByOrderWeight(policyTagList: OnyxEntry<PolicyTagLists>, orderWeight: number): ValueOf<PolicyTagLists> { | ||
| const tagListEmpty = { | ||
| name: '', | ||
| required: false, | ||
| tags: {}, | ||
| orderWeight: 0, | ||
| }; | ||
| if (isEmptyObject(policyTagList)) { | ||
| return tagListEmpty; | ||
| } | ||
|
|
||
| return Object.values(policyTagList).find((tag) => tag.orderWeight === orderWeight) ?? tagListEmpty; |
There was a problem hiding this comment.
Why don't you use getTagLists method as in getTagList function? Ideally, I think we should keep the same implementation, only update to find by orderweight instead of index
There was a problem hiding this comment.
Because I find that the filter and sort steps in getTagList are unnecessary if we're only filtering based on orderWeight and not index, I implemented it similar to getTagListName.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-07-08.at.15.11.33.movAndroid: mWeb ChromeScreen.Recording.2025-07-08.at.15.09.58.moviOS: HybridAppScreen.Recording.2025-07-08.at.15.13.05.moviOS: mWeb SafariScreen.Recording.2025-07-08.at.15.09.14.movMacOS: Chrome / SafariScreen.Recording.2025-07-08.at.15.07.11.movMacOS: DesktopScreen.Recording.2025-07-08.at.15.12.30.mov |
|
✋ 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/roryabraham in version: 9.1.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.78-4 🚀
|
Explanation of Change
Fixed Issues
$ #64607
PROPOSAL: #64607 (comment)
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
Android: Native
android.native.mp4
Android: mWeb Chrome
android.mweb.chrome.mp4
iOS: Native
ios.native.mp4
iOS: mWeb Safari
ios.mweb.safari.mp4
MacOS: Chrome / Safari
mac.safari.mp4
MacOS: Desktop
mac.desktop.mp4