-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Don't allow duplicate category names (per group) #1833
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Hey @Shazib This doesn't actually fix the problem though, I could create Food in one group then hide it and create it later in another group and it would still show me two Food's on the transaction entry. I would have to go back to the budget check which group the category is showing for then go back to the transaction entry screen and enter the transaction..seems like a lot of clicking around. What would the use case be for two categories on the budget being called the same thing ever existing? For example, would this be a possibility? Usual Expenses - Food If it wouldn't it might be worth preventing duplicate category names entirely? |
Hi @rich-howell, I can envisage scenarios where you have multiple of the same categories under different groups e.g. Or
|
Maybe the popup could indicate hidden categories? |
@rich-howell what do you think |
I don't like this. It's going to clutter the crap out of it. Honestly I don't see the big deal with checking your hiddens before creating a group 🤷 |
Do people have loads of hidden categories? I wouldnt consider that super cluttered personally! |
I actually think its kind of useful to see if its hidden 🤷 Although maybe this is kind of two separate PR's; not allowing duplicate names is fairly straightforward. |
I think the category picker change should be a separate PR. Have you checked the case of moving a category from one group to another? I would be ok with allowing same names but different groups, but then we need to do the checks on moves as well as creates. That wouldn't matter if only one of the same name are allowed. |
The change isn't actually in the PR just a screenshot. I will check the case of moving a category! |
There are two workflows here that are impacted by hidden categories and the ability to create a category with a duplicate name. The Budget Sheet If you have a category you created 2 years ago and it is hidden your not going to remember that you hid it before creating a new one, I don't think the workflow of checking if the category is hidden before creating any new category really works all that well. Transaction Sheet When adding a new transaction, the category shows regardless of if it is hidden or not so if you select the category you hid two years ago and remember you might not know it is there you will be thinking why is my budget now showing negative numbers. My thoughts I agree that seeing if the category is hidden in the category picker is an improvement on the current workflow and would solve the problem entirely. (You might not even have to stop people creating duplicates) |
This seems to be working well. Can you look at getting the tests to pass, and the merge conflicts cleared up? |
This is great @Shazib. Maybe you'd be interested in doing the same for account names? If not, no worries. Cheers! |
Yes sorry - you can just click off it though, you don't have to go through with the create, it cancels if you focus away from the cell |
I have removed the tag linking that issue. I think this is safe to merge standalone while we work on that. |
…o category-guard
@Shazib This is pretty much ready right? If you merge master the electron issues should be fixed. |
Should this check for same name, different case? ie not capitalized |
good spot - added |
Might be good to also do group names? Could be a separate PR. |
Yeh i'd do that as a separate PR to avoid scope creep with this one. |
* Remove author from electron package.json * Don't allow dupes in cat names (per group) * Release Notes * Handle reorders and moves * Fix linter warnings * Fix typecheck * Show the name of the duplicate category * missed func call * Upper case before compare * lint fixes --------- Co-authored-by: Shazib Hussain <[email protected]>
GUI Level check and a separate one at DB to catch API etc.