New Feature: Add Split by percentage to the split expense flow for new splits#74652
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
ℹ️ This file got resized when I ran npm run compress-svg.
…7-splitEvenlyPercentage
|
@abdulrahuman5196 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] |
|
@abdulrahuman5196 PR ready for review! Ignore the failing workflows as they are not related to this PRs changes and I'll merge main again before we merge the PR to make sure they all pass 🟢 |
|
The spacing on this warning seems a bit off. It should basically follow the same spacing as our RBR on the footer button. Just with a different icon:
Also keen to hear if @jamesdeanexpensify could shorten the copy enough to get the above onto one line. Applies to the above and mock below:
Otherwise this is looking good |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
what's next project 👍
|
There is some issues where the keyboard is covering the input but I noticed similiar issues on staging so we don't need to block this PR on that. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.2.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.2.82-0 🚀
|
|
This PR is failing because of issue ##74652 The issue is reproducible in: Web Bug7033138_1766085303077.18.12.2025_14.14.16_REC20.1.mp4 |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.2.82-0 🚀
|
|
@ikevin127 @parasharrajat this PR probably caused #78080 |
It's related to Splits by date, so probably #77920 |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 9.2.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.84-8 🚀
|
| }} | ||
| value={inputValue} | ||
| textInputContainerStyles={StyleUtils.splitPercentageInputStyles(styles)} | ||
| containerStyles={styles.optionRowPercentInputContainer} |
There was a problem hiding this comment.
Left margin is missing here which caused an issue #78099
| return amount === '' || regex.test(amount); | ||
| } | ||
|
|
||
| const regexString = allowDecimal ? '^(100(\\.0)?|[0-9]{1,2}(\\.\\d)?)$' : '^(100|[0-9]{1,2})$'; |
There was a problem hiding this comment.
Coming from #78246 checklist: the current regex only supports the period character, so we should allow both period and comma characters to support other languages.


Explanation of Change
Adding 'Split by percentage' to the split expense flow for new splits as stated in the issue.
Fixed Issues
$ #72228
PROPOSAL:
Tests
Enabling Percentage Mode
% Percentagetab to switch to ‘Split by percentage’.Changing Percentages
Change Amount - Verify Percentage Changed
Switch to Percentage and verify that the percentage for Split 3 is 12.5%. (explanation: original expense = $200 / 3 => [50%, 50%, 12.5%])
Attempt Save and verify that an error shows noting that the total is $25 greater than the original expense.
Verify that no errors appear in the JS console
Offline tests
Same as Tests, while offline.
QA Steps
Same as Tests.
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: HybridApp
android-hybrid.mp4
Android: mWeb Chrome
android-mweb.mp4
iOS: HybridApp
ios-hybrid.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov