Restore missing PlusMinus icon and negative amount functionality from PR #56092#65546
Closed
Restore missing PlusMinus icon and negative amount functionality from PR #56092#65546
Conversation
Co-authored-by: nkuoch <2463975+nkuoch@users.noreply.github.com>
…ive amount functionality Co-authored-by: nkuoch <2463975+nkuoch@users.noreply.github.com>
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Copilot
AI
changed the title
[WIP] Restore missing files and code from PR #56092 (e.g., plus-minus.svg) to main
Restore missing PlusMinus icon and negative amount functionality from PR #56092
Jul 7, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR restores the missing files and functionality from the original PR #56092 "Add PlusMinus icon and allow negative values in MoneyRequestAmountInput" that were not properly included in the main branch. The original PR was merged with commit
146dd00c4de5a8c1247de450903bf1ea0c6708bcbut several critical files and changes were missing.Issues Fixed
The main branch was missing essential components for negative amount functionality in expense requests:
assets/images/plus-minus.svgicon fileChanges Made
🎨 Assets & Icons
assets/images/plus-minus.svg- The PlusMinus icon for toggling amount signsrc/components/Icon/Expensicons.ts- Added PlusMinus import and export🌍 Internationalization
src/languages/en.ts- "Flip"src/languages/de.ts- "Umkehren"src/languages/es.ts- "Cambiar"src/languages/fr.ts- "Inverser"src/languages/it.ts- "Inverti"src/languages/ja.ts- "反転"src/languages/nl.ts- "Omdraaien"src/languages/pl.ts- "Odwróć"src/languages/pt-BR.ts- "Inverter"src/languages/zh-hans.ts- "翻转"🧩 Core Components
Updated
src/components/MoneyRequestAmountInput.tsx:isNegative,toggleNegative,clearNegative,allowFlippingAmountpropsUpdated
src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.tsx:isNegativeprop supportUpdated
src/components/TextInputWithCurrencySymbol/types.ts:isNegativeprop type definition🔧 Utility Functions
Updated
src/libs/ReportUtils.ts:shouldEnableNegative()function to determine when negative amounts are allowedgetTransactionDetails()withallowNegativeAmountanddisableOppositeConversionparametersshouldEnableNegativeUpdated
src/libs/TransactionUtils/index.ts:getAmount()function withallowNegativeanddisableOppositeConversionparametersUpdated
src/libs/ModifiedExpenseMessage.ts:oldAmountValue > 0tooldAmountValue🎨 Styling
src/styles/utils/spacing.ts:minWidth18style (72px) for PlusMinus button stylingFunctionality Overview
This restoration enables:
Testing
The changes restore core functionality that:
Validation
All restored files match their state in the original merge commit
146dd00c4de5a8c1247de450903bf1ea0c6708bc:Impact
The main branch now fully reflects the intent of the original PR #56092, restoring the complete negative value functionality in MoneyRequestAmountInput that was missing from the production codebase.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.