-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add PlusMinus icon and allow negative values in MoneyRequestAmountInput #56092
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?
Add PlusMinus icon and allow negative values in MoneyRequestAmountInput #56092
Conversation
…n MoneyRequestAmountForm
…nd simplify state updates
… and related functions
…r improved transaction handling
…text in MoneyRequestAmountForm
… currency flipping and improve amount validation
…to use updated utility functions and improve code clarity
… getTransactionDetails function
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@ZhenjaHorbach 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] |
2025-03-05.10.19.51.movWe still have this issue |
@shawnborton 2025-03-05.17.03.44.movI think it would be more convenient to flip the sign at any time |
We have 400 error when split expense with negative amount 2025-03-05.17.20.57.mov |
Could you check if you are using the latest version? Screen.Recording.2025-03-05.at.21.20.45.mov |
@ZhenjaHorbach |
Strange 🧐 |
Still easy to reproduce Dev 2025-03-06.11.11.25.movStaging 2025-03-06.11.12.09.mov |
@pasyukevich That the minus sign is reset to amount 2025-03-06.11.24.34.mov |
@ZhenjaHorbach The Issue with minus disappearing is on the API part since it is the Commented earlier - #53441 (comment) |
According to this comment - #53441 (comment) I will update the PR to limit negative functionality |
Updates:
I will continue work with a focus only on limitations for this functionality |
What's the latest on this one? |
I've posted the issues that I've found here: #53441 (comment) waiting for clarification or fixes since it is the core of the feature to finalize |
Clarified in the issue regarding expected behavior. |
Thanks! I will continue work here |
Updates:
|
Updates: Coming back to this issue |
What's the latest here? |
Updates:
|
Updates:
Next steps - take into account that the API returns the opposite value of the amount |
Updates:
|
Explanation of Change
Fixed Issues
$ #53441
PROPOSAL:
Tests
For mobile:
1. Open the “Create Expense” screen.
2. Enter an amount and press “Flip”.
3. Verify that a minus sign appears before the currency.
4. Submit the expense.
5. Open the newly created expense.
6. Verify that the amount does not have a minus sign.
7. Tap on the amount and confirm that the minus sign appears before the currency.
For desktop:
1. Open the “Create Expense” screen.
2. Enter an amount and place the cursor at the beginning.
3. Press minus
4. Verify that a minus sign appears before the currency.
5. Press minus one more time
6. Verify that a minus sign disappeared before the currency.
7. Add minus again and clear the amount with "backspace"
8. After input is clear, press backspace one more time and verify that minus was removed
9. Add minus again and enter the amount
10. Submit the expense.
11. Open the newly created expense.
12. Verify that the amount does not have a minus sign.
13. Tap on the amount and confirm that the minus sign appears before the currency.
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
For mobile:
1. Open the “Create Expense” screen.
2. Enter an amount and press “Flip”.
3. Verify that a minus sign appears before the currency.
4. Submit the expense.
5. Open the newly created expense.
6. Verify that the amount does not have a minus sign.
7. Tap on the amount and confirm that the minus sign appears before the currency.
For desktop:
1. Open the “Create Expense” screen.
2. Enter an amount and place the cursor at the beginning.
3. Press minus
4. Verify that a minus sign appears before the currency.
5. Press minus one more time
6. Verify that a minus sign disappeared before the currency.
7. Add minus again and clear the amount with "backspace"
8. After input is clear, press backspace one more time and verify that minus was removed
9. Add minus again and enter the amount
10. Submit the expense.
11. Open the newly created expense.
12. Verify that the amount does not have a minus sign.
13. Tap on the amount and confirm that the minus sign appears before the currency.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native-converted.webm
Android: mWeb Chrome
android-web-converted.webm
iOS: Native
ios-native-converted.mp4
iOS: mWeb Safari
ios-web-converted.mp4
MacOS: Chrome / Safari
desktop-web-converted.mov
MacOS: Desktop
desktop-native-converted.mov