-
Notifications
You must be signed in to change notification settings - Fork 185
feat(categories)!: Ability to delete Categories and consequences on transactions and recurring transactions #344
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?
Conversation
Thanks @napitek. We will review this issue in our meeting and we will add it to our task list. Regarding the type of behaviour you suggest to adapt, I prefer the first one (Mark a category as deleted: all old transactions will still be displayed everywhere, but it will not be possible to create new ones with the category marked). I also suggest that in the future, when you add a transaction and you select a category, the deleted one will not be present on the list anymore. |
Ok the overall approach seems good to me! A few things on edge cases.
|
Not really. My initial idea was to totally hide the ability to create a transaction or edit it with “uncategorized.” Then I thought of the case where a person enters transactions so as not to forget them, and if he arranges them with categories when he has more time.
I noticed this myself, but I honestly see two paths:
I hadn't noticed. I'll look at it
not true! check more closely 😜 I refreshed the page 3 times because I couldn't find point 2 |
I'd keep things simple and not create an "uncatecorized" category.
I agree on what @napitek said: we have to think to a way to differentiate a deleted category that will still be present in the statistics. I suggest a tag/chip to be added alongside the category name, and a kind of visual representation (like a disabled state). If you guys give us some time we are planning to put this issue at the top of our design todo list. |
Since the user is always required to add the category for adding a transaction, i don't see how selecting "uncategorized" instead of something else could speed up the process. It would be different if "uncategorized" was preselected by default, but I think it would encourage users to add too much noise and crap data. Generally i agreed with @federicopozzato
Yes! This would be a simple and brilliant solution! I suggest same icon and name, but grey color and an icon/tag suggesting this is a deleted category. But last word to our designers ofc. We did something similar with with recurring transactions (Oh... seems we found our missing point 2! 🤔) |
is that okay? @mikev-cw @federicopozzato |
@napitek If you want you can proceed with what we said even if there's no design for it. We will catch up with that in the following weeks, but in the meantime you can go on. |
@mikev-cw @federicopozzato |
We should delete the budget if the corresponding category is deleted. Showing another pop up is not great but it'll be ok for now |
I have some point for improvements:
|
@lucaantonelli "markedAsDelete" just to distinguish from true deletion (with the delete button). it's not a problem to edit it obviously. |
INSERT INTO `$categoryTransactionTable`(`${CategoryTransactionFields.id}`, `${CategoryTransactionFields.name}`, `${CategoryTransactionFields.type}`, `${CategoryTransactionFields.symbol}`, `${CategoryTransactionFields.color}`, `${CategoryTransactionFields.note}`, `${CategoryTransactionFields.parent}`, `${CategoryTransactionFields.deleted}`, `${CategoryTransactionFields.createdAt}`, `${CategoryTransactionFields.updatedAt}`) VALUES | ||
(0, "Uncategorized", "IN", "question_mark", 0, 'This is a default category for no categorized transactions', null, '0', '${DateTime.now()}', '${DateTime.now()}'), | ||
(1, "Uncategorized", "OUT", "question_mark", 0, 'This is a default category for no categorized transactions', null, '0', '${DateTime.now()}', '${DateTime.now()}'); |
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.
There's a problem in migration 5:
Users who don't have the demo data (i.e. they went through onboarding by adding a budget, or started from scratch and added a category afterwards) already have a categoryTransaction with ID 1, so this query fails and the app doesn't open.
There are two ways to fix it:
-
We allow those categories to have any ID (I don't remember if they must be 0 and 1), and let the auto-increment assign them.
-
Before running the query, we check if category ID 1 already exists, and if so, we assign it a different ID and update all associated transactions. Only then we insert the new categories with IDs 0 and 1.
Any other ideas?
Hi @napitek👋 If there’s no response in the next 15 days, we’ll consider this PR inactive and plan to close it to keep things tidy. Thanks! |
Description
In reference to the issue #177
with this PR there is the possibility of deleting categories while retaining transactions and recurring transactions.
There are two ways:
Technical details
For IN and OUT, there are now two reserved “Uncategorized” system categories, with respective gray color, inserted within the color list.
These categories are not editable, but can be used, if there is a need to enter transactions without a specific category.
When trying to delete a category from the settings, a Dialog appears that looks like this:
For @federicopozzato and the design team, I tried to keep the style already used on other occasions. Free to come up with something more appealing (e.g., some loaders while the reassignment process proceeds), as well as the gray and the icon for the category “Uncategorized”
In the planning section, you cannot choose the “Uncategorized” category, since I think it is useless in this case. If there is a need for a separate category, you create it custom