use useSearchSelector hook and remove unused and duplicated code#71427
use useSearchSelector hook and remove unused and duplicated code#71427NikkiWines merged 26 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Patch coverage is
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@rushatgabhane 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] |
|
I suppose this is mine 😃 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2025-10-09.16.38.58.movAndroid: mWeb Chrome2025-10-09.16.38.58.moviOS: HybridApp2025-10-09.16.30.35.moviOS: mWeb Safari2025-10-09.16.30.35.movMacOS: Chrome / Safari2025-10-09.16.23.46.movMacOS: Desktop2025-10-09.16.23.46.mov |
|
I'd like to be added as additional reviewer @ZhenjaHorbach @pecanoro |
I think you can leave comments without any permission 😅 |
|
That's true 😅 I thought I need to be assigned officialy |
|
|
||
| function getSelectedOptionData(option: Option) { | ||
| return {...option, reportID: `${option.reportID}`, selected: true}; | ||
| // eslint-disable-next-line rulesdir/no-default-id-values |
There was a problem hiding this comment.
Just checked
Do we really need this rule disable?
There was a problem hiding this comment.
Yes, I added because it was failed.
There was a problem hiding this comment.
do we really still need this function at all?
useSearchSelector returns already selected options that have isSelected set to true. i think, this should be deprecated
@sosek108 |
|
Issue mentions 3 components to change:
Only Two are changed in current PR |
|
I also worry that test cases only focuses on selection and not on other important cases like filtering, sorting etc. |
|
@mkzie2 yeah, we want. useSearchSelector lacks this currently but I created a proposal for that #66615 (comment) . |
|
@sosek108 So we don't need to do that here, right? |
|
Let's wait, please. You'll need to add one |
|
Got it. |
|
I will check and update soon. |
|
@pecanoro I resolved the conflict. |
I tested. |
|
@mkzie2 could you merge main quick just cause this is a few days out of date? |
|
@mkzie2 |
|
@ZhenjaHorbach @NikkiWines I merged main. |
|
@NikkiWines looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
All the tests passed?? 😕 |
|
✋ 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/NikkiWines in version: 9.2.44-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.44-5 🚀
|
Explanation of Change
use useSearchSelector hook and remove unused and duplicated code
Fixed Issues
$ #71061
PROPOSAL:
Tests
Recent reportssectionRecent reportsand below the selfDM if it existsOffline tests
Same
QA Steps
Recent reportssectionRecent reportsand below the selfDM if it existsPR 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
Screen.Recording.2025-09-28.at.00.12.38.mov
Android: mWeb Chrome
Screen.Recording.2025-09-28.at.00.11.41.mov
iOS: Native
Screen.Recording.2025-09-28.at.00.14.25.mov
iOS: mWeb Safari
Screen.Recording.2025-09-28.at.00.13.23.mov
MacOS: Chrome / Safari
Screen.Recording.2025-09-28.at.00.11.09.mov
Screen.Recording.2025-10-08.at.21.44.38.mp4
MacOS: Desktop
Screen.Recording.2025-09-28.at.00.15.33.mov