refactor startMoneyRequest part 1#79951
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@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] |
src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Outdated
Show resolved
Hide resolved
src/components/ReportActionItem/MoneyRequestReportPreview/MoneyRequestReportPreviewContent.tsx
Outdated
Show resolved
Hide resolved
JmillsExpensify
left a comment
There was a problem hiding this comment.
Product review not required.
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Let's wait for #79948 |
|
Same as above |
|
@DylanDylann It's ready for review |
|
@codex review |
|
|
||
| function clearMoneyRequest(transactionID: string, skipConfirmation = false, draftTransactions?: OnyxCollection<OnyxTypes.Transaction>) { | ||
| removeDraftTransactions(undefined, draftTransactions); | ||
| function clearMoneyRequest(transactionID: string, skipConfirmation = false, draftTransactionIDs: string[] = []) { |
There was a problem hiding this comment.
Don't use default value
| skipConfirmation = false, | ||
| backToReport?: string, | ||
| draftTransactions?: OnyxCollection<OnyxTypes.Transaction>, | ||
| // TODO: Make draftTransactionIDs required in the follow-up PR |
There was a problem hiding this comment.
Please link the issue to the comment
| startDistanceRequest( | ||
| CONST.IOU.TYPE.SUBMIT, | ||
| report?.reportID ?? String(CONST.DEFAULT_NUMBER_ID), | ||
| lastDistanceExpenseType, | ||
| false, | ||
| undefined, | ||
| draftTransactionIDs, |
There was a problem hiding this comment.
@dukenv0307 Your PRs are conflicting with each other. The order of draftTransactionIDs is different from other PRs in the refactor. It’s fine to work on PRs in parallel, but let’s make sure they stay consistent.
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Explanation of Change
Refactor startMoneyRequest part 1 (too many startMoneyRequest usages). In the next PR, we'll update other usages of startMoneyRequest
Fixed Issues
$ #67778
PROPOSAL:
Tests
Offline tests
QA Steps
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))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
Screen.Recording.2026-01-20.at.16.42.09.mov