fix - Held expense - Back button closes RHP when accessing Hold reason page from report details RHP#57565
Conversation
|
@hungvu193 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] |
| } | ||
|
|
||
| const changeMoneyRequestHoldStatus = (reportAction: OnyxEntry<ReportAction>, backTo?: string, searchHash?: number): void => { | ||
| const changeMoneyRequestHoldStatus = (reportAction: OnyxEntry<ReportAction>, searchHash?: number): void => { |
There was a problem hiding this comment.
| const changeMoneyRequestHoldStatus = (reportAction: OnyxEntry<ReportAction>, searchHash?: number): void => { | |
| const changeMoneyRequestHoldStatus = (reportAction: OnyxEntry<ReportAction>, searchHash: number | undefined): void => { |
There was a problem hiding this comment.
FYI, this is somethings we discussed internaly:
TL;DR:
When you see a failing lint rule for the default values, make sure the following is done:
- For numeric values, make sure you default to CONST.DEFAULT_NUMBER_ID instead of -1 or 0
For string values:
- You must remove the default fallback
- If the function you're passing this value to has this param specified as a non-nullable string:
- Change this parameter type to param: string | undefined, not param?: string
- Alter the function logic to handle the case when the param is passed as undefined.
In many cases, it will mean adding an early return.
A good reference PR can be this: https://github.com/Expensify/App/pull/54297
There was a problem hiding this comment.
No @hungvu193 this is a different case. We intentionally made searchHash to be an optional param because we use the function for both search and non-search case.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-02-27.at.10.41.36.movAndroid: mWeb ChromeScreen.Recording.2025-02-27.at.10.46.17.moviOS: NativeScreen.Recording.2025-02-27.at.10.39.07.moviOS: mWeb SafarimSafari.movMacOS: Chrome / SafariScreen.Recording.2025-02-27.at.10.35.29.movMacOS: DesktopScreen.Recording.2025-02-27.at.10.36.24.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/dangrous in version: 9.1.9-0 🚀
|
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.1.9-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.9-8 🚀
|
Details
Fixed Issues
$ #56946 (comment)
PROPOSAL: #56946 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
hold.a.mp4
Android: mWeb Chrome
hold.aw.mp4
iOS: Native
2025-02-27.23-55-15.mp4
iOS: mWeb Safari
hold.iw.mp4
MacOS: Chrome / Safari
hold.w.mp4
MacOS: Desktop
hold.d.mp4