-
Notifications
You must be signed in to change notification settings - Fork 3.9k
refactor: cleanup duplicate create expense navigation logic #71820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
neil-marcellini
merged 68 commits into
Expensify:main
from
rohit9625:refactor/create-expense-navigation-logic
Jan 20, 2026
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
7176b4f
refactor: move duplicate navigateToConfirmationPage logic to IOU actions
rohit9625 519bd7c
refactor: fix prettier and lint issues
rohit9625 dffeb79
refactor: move duplicate createTransaction function to IOU file
rohit9625 e2a90ed
refactor: move navigateToConfirmationStep from IOURequestStepScan
rohit9625 f2ba63b
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 3eb7d0b
fix: remove redundant dependencies and add important ones
rohit9625 32e69d2
refactor: move duplicate navigation code for IOU request distance step
rohit9625 fa727f3
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 d82eebd
fix: use setTransactionReport in reusable functions as present on main
rohit9625 3c3de79
refactor: move duplicate navigation code of manual distance request step
rohit9625 cf97278
refactor: remove redundant navigation function
rohit9625 c28fce7
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 b572ff4
fix: get correct rate id for unreported transaction
rohit9625 5b4a205
test: fix unit tests by providing mock for geolocation
rohit9625 9868fdc
fix: pass localeCompare for customUnitRateID to match the logic on main
rohit9625 e18ac4f
refactor: fix typo
rohit9625 84b6cee
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 1f24dd9
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 f51f0d6
fix: update createTransaction function code sync with main branch
rohit9625 385d35b
refactor: fix lint and typescript errors
rohit9625 88365d6
refactor: move navigation utility function to IOUUtils
rohit9625 70e6ff7
test: add unit tests for navigateToConfirmationPage utility function
rohit9625 864814c
Merge branch 'Expensify:main' into refactor/create-expense-navigation…
rohit9625 71d42a4
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 947ab86
refactor: fix lint errors and warnings
rohit9625 2419b6a
refactor: move createTransaction to the IOUUtils file
rohit9625 9c4b473
test: write test cases for createTransaction util function
rohit9625 c92ae46
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 c8f3b95
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 fd4de23
refactor: fix imports and lint issues
rohit9625 d850cfb
test: fix failing tests
rohit9625 f70a275
Merge branch 'Expensify:main' into refactor/create-expense-navigation…
rohit9625 a26a728
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 d8e8db2
refactor: add quickAction for IOU to match the main branch
rohit9625 952379c
refactor: resolve lint warnings
rohit9625 e162cbe
test: remove geolocation mockup from test setup
rohit9625 b34d5f2
fix: remove redundant maximumAge and timeout from parameters
rohit9625 f683f73
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 3960ee3
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 0531622
Merge branch 'main' into refactor/create-expense-navigation-logic
rohit9625 7695b63
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 95d131a
refactor: move IOU distance and scan step utility functions to IOUUtils
rohit9625 eeab6aa
test: write unit tests for money request distance step utility function
rohit9625 922d209
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 671f283
refactor: move MoneyRequest related functions and tests to separate file
rohit9625 8c4dc26
test: fix failing test and lint issues
rohit9625 75b9794
test: add remaining test cases for distance step navigation
rohit9625 2bf88ab
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 6d5a27e
test: fix failing tests
rohit9625 ffaebbf
test: refactor and fix failing tests
rohit9625 0199d2f
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 efecff0
test: update tests according new changes
rohit9625 1903341
test: write test cases for IOU scan step and refactor existing tests
rohit9625 f861c22
Merge branch 'Expensify:main' into refactor/create-expense-navigation…
rohit9625 c2c0148
refactor: fix missing import and lint errors
rohit9625 e4c4d76
test: add test cases for IOU money request step scan navigation function
rohit9625 923fc7b
test: remaining test cases for IOU request scan step navigation function
rohit9625 8c7580e
typo: correct the spelling
rohit9625 0ca14ed
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 8b4a683
refactor: update manualDistance condition to check if undefined only
rohit9625 80f4e01
Merge branch 'main' into refactor/create-expense-navigation-logic
rohit9625 9896a30
refactor: replace manualDistance condition with existing condition check
rohit9625 d319645
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 8ddd0a2
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 ebc9e5e
refactor: extract duplicate code into a reusable function
rohit9625 20ebf02
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 26a5201
Merge remote-tracking branch 'origin/main' into refactor/create-expen…
rohit9625 97865df
Merge branch 'main' into refactor/create-expense-navigation-logic
rohit9625 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this, I don't think you can send the money with a manual distance expense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words this case should never occur so maybe it would be best to remove the handling, or add a comment and a warning log line if it's just for a defensive coding style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that check because the navigation call for the
IOU.TYPE.SENDat theIOURequestStepDistance.tsxfile, was a little bit different fromIOURequestStepDistanceManual.tsx:App/src/pages/iou/request/step/IOURequestStepDistance.tsx
Lines 296 to 307 in fb1e667
App/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
Lines 157 to 165 in fb1e667
Should I really remove that, @neil-marcellini?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB, we can leave it for now. I do think it's dead code though