-
Notifications
You must be signed in to change notification settings - Fork 0
Standardize product behavior using Global Create #31
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ import type {Attendee, Participant, SplitExpense} from '@src/types/onyx/IOU'; | |
| import type {Errors, PendingAction} from '@src/types/onyx/OnyxCommon'; | ||
| import type {CurrentUserPersonalDetails} from '@src/types/onyx/PersonalDetails'; | ||
| import type {OnyxData} from '@src/types/onyx/Request'; | ||
| import type {SearchDataTypes} from '@src/types/onyx/SearchResults'; | ||
| import type { | ||
| Comment, | ||
| Receipt, | ||
|
|
@@ -2460,6 +2461,11 @@ function shouldReuseInitialTransaction( | |
| return !isMultiScanEnabled || (transactions.length === 1 && (!initialTransaction.receipt?.source || initialTransaction.receipt?.isTestReceipt === true)); | ||
| } | ||
|
|
||
| function mergeTransactionIdsHighlightOnSearchRoute(type: SearchDataTypes, data: Record<string, boolean> | null) { | ||
kacper-mikolajczak marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ CONSISTENCY-5 (docs)This ESLint rule disable lacks a clear justification comment. Why this matters: ESLint rule disables without justification can mask underlying issues and reduce code quality. Clear documentation ensures team members understand exceptions, promoting better maintainability. Suggested fix: Add a comment explaining why the rule needs to be disabled. For example: function mergeTransactionIdsHighlightOnSearchRoute(type: SearchDataTypes, data: Record<string, boolean> | null) {
// eslint-disable-next-line rulesdir/prefer-actions-set-data
// We use Onyx.merge here instead of actions/setData because this is a utility function
// that needs to be called from multiple places without circular dependencies
return Onyx.merge(ONYXKEYS.TRANSACTION_IDS_HIGHLIGHT_ON_SEARCH_ROUTE, {[type]: data});
}Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency. |
||
| // eslint-disable-next-line rulesdir/prefer-actions-set-data | ||
| return Onyx.merge(ONYXKEYS.TRANSACTION_IDS_HIGHLIGHT_ON_SEARCH_ROUTE, {[type]: data}); | ||
| } | ||
|
|
||
| export { | ||
| buildOptimisticTransaction, | ||
| calculateTaxAmount, | ||
|
|
@@ -2587,6 +2593,7 @@ export { | |
| getOriginalAmountForDisplay, | ||
| getOriginalCurrencyForDisplay, | ||
| shouldShowExpenseBreakdown, | ||
| mergeTransactionIdsHighlightOnSearchRoute, | ||
| }; | ||
|
|
||
| export type {TransactionChanges}; | ||
Uh oh!
There was an error while loading. Please reload this page.