-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Created Add Split Button #4536
base: master
Are you sure you want to change the base?
Created Add Split Button #4536
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There is already a button to add a split. The the one that says how much is left |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
I may not have explained this right, or im just blind. The goal here is to allow the user to split more than twice. So splitting a transaction three or four ways instead of just splitting twice. On desktop there is an add split button that allows splitting between more than two categories on one transaction. Unless I am blind on mobile, which is possibe lol. |
You can add more than two ways. The button at the bottom adds more split lines |
Ahhh I see now. I was clicking it while I didn't assign both other boxes. Sorry for wasting your time! |
Feel free to try to make that process easier/more intuitive |
My PR here simply adds an additional "Add Split" button below the latest split element. I could see it being advantageous to leave the functionality of the "Remaining" button's ability to split, as well as the addition of this new button. It would still allow the work flow of users who are accustomed to the current method, while new users like myself may find it more obvious with a separate button. Open to your thoughts. |
WalkthroughThe pull request introduces a new conditional rendering block within the Suggested labels
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (2)
175-186
: Consider adding visual distinction between the "Add Split" and "Remaining" buttonsWhile the new "Add Split" button works well with the existing "Remaining" button in the footer, users might be confused by having two ways to add splits. Both buttons use the same SvgSplit icon but serve different purposes.
Consider differentiating these buttons visually so users can more easily understand their different functions:
- The footer "Remaining" button helps balance splits with incorrect amounts
- The new "Add Split" button is purely for adding new split lines
You could use a different icon (perhaps SvgAdd) for the "Add Split" button, or add a subtle visual difference in styling.
- <SvgSplit - width={17} - height={17} - style={{ color: theme.formLabelText }} - /> + <SvgAdd + width={17} + height={17} + style={{ color: theme.formLabelText }} + />
971-972
: Use a more descriptive label for the Add Split buttonThe current label "Add Split" is clear, but you might consider making it even more explicit for new users.
- {t('Add Split')} + {t('Add Split Line')}This small change would make it even clearer to users that clicking this button adds another split line to further divide the transaction.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
upcoming-release-notes/4536.md
is excluded by!**/*.md
📒 Files selected for processing (1)
packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
(1 hunks)
🔇 Additional comments (4)
packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (4)
944-975
: Good addition of the "Add Split" buttonThis new conditional rendering block adds the "Add Split" button when child transactions exist, improving usability for mobile users. The implementation is consistent with the existing UI/UX patterns.
The button:
- Only appears when there are child transactions (smart conditional rendering)
- Is properly disabled during active editing (matches other button behavior)
- Uses the same styling and icon as the "Split" button for consistency
- Is well-positioned below the split transaction boxes for intuitive access
- Correctly calls the
onAddSplit
function with the transaction idThis change successfully addresses the PR objectives to make splitting transactions into multiple categories more intuitive for mobile users, similar to desktop functionality.
1276-1282
: The onAddSplit implementation is correctThe function correctly modifies the transactions array by adding a new split transaction. It follows the established pattern of returning changes and updating the state.
163-170
: LGTM: Footer component properly receives the onAddSplit propThe Footer component correctly receives the
onAddSplit
prop, which is then used in theonClickRemainingSplit
function and passed to the new "Add Split" button.
804-814
: LGTM: The Footer component is properly called with all required propsThe Footer component is correctly instantiated with all necessary props, including the
onAddSplit
function that's needed for the new button functionality.
On the desktop client, a user can split a transaction an endless amount of times. On mobile, it is hard coded to a single split. This change creates an add split button below split transaction boxes on mobile to allow for additional splits.
Edit: I was informed infact it is possible to add endless amounts of splits on mobile by using the "Remaining" button at the bottom. This may not be intuitive for new users like myself. This PR adds an "Add Split" button below the split transaction elements on the page for a clear intuitive way to add more splits.
I am open to feedback on this, or closing if other reviewers feel the current implementation is sufficient.