Skip to content
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

Hide hidden categories in auto-complete #2429

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

carkom
Copy link
Contributor

@carkom carkom commented Mar 6, 2024

Picking up #1843 as it was basically complete. Seemed like everyone had come to concensus on how to implement and best UI, just needed some tweaks to get it passing CI. I've also added the same logic/process to the category groups that was applied to the items.

Props to @Shazib for doing all the legwork and coding.

I have showhiddenitems = true on "all accounts" transaction table so you can see what it looks like. It's disabled in the filters menu so you can compare. I plan to disable on the transactions table before merge.

Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 76be610
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/65eb251e62d817000893e391
😎 Deploy Preview https://deploy-preview-2429.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Mar 6, 2024

Bundle Stats — desktop-client

Hey 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

Files count Total bundle size % Changed
10 4.43 MB → 4.43 MB (+972 B) +0.02%
Changeset
File Δ Size
src/components/autocomplete/ItemHeader.tsx 📈 +62 B (+19.94%) 311 B → 373 B
src/components/autocomplete/CategoryAutocomplete.tsx 📈 +659 B (+9.21%) 6.98 kB → 7.63 kB
src/components/budget/rollover/CoverTooltip.tsx 📈 +34 B (+2.07%) 1.6 kB → 1.63 kB
src/components/budget/rollover/TransferTooltip.tsx 📈 +31 B (+1.14%) 2.65 kB → 2.68 kB
src/components/modals/ConfirmCategoryDelete.tsx 📈 +39 B (+0.95%) 4.02 kB → 4.06 kB
src/components/util/GenericInput.jsx 📈 +36 B (+0.71%) 4.95 kB → 4.98 kB
src/components/modals/CloseAccount.tsx 📈 +45 B (+0.66%) 6.69 kB → 6.73 kB
src/components/modals/EditField.jsx 📈 +32 B (+0.47%) 6.66 kB → 6.69 kB
src/components/transactions/TransactionsTable.jsx 📈 +34 B (+0.06%) 55.83 kB → 55.86 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 2.74 MB → 2.75 MB (+904 B) +0.03%
static/js/BalanceTooltip.js 6.06 kB → 6.09 kB (+34 B) +0.55%
static/js/wide.js 270.32 kB → 270.35 kB (+34 B) +0.01%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/ButtonLink.js 379 B 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 79.87 kB 0%
static/js/AppliedFilters.js 20.35 kB 0%
static/js/ReportRouter.js 1.17 MB 0%

Copy link
Contributor

github-actions bot commented Mar 6, 2024

Bundle Stats — loot-core

Hey 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

Files count Total bundle size % Changed
1 1.2 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.2 MB 0%

@youngcw
Copy link
Member

youngcw commented Mar 6, 2024

Nice. Wasn't it that we wanted to show hidden opposite of what you set this as? Show in filters and reports, hide when editing transactions.

@carkom
Copy link
Contributor Author

carkom commented Mar 6, 2024

Nice. Wasn't it that we wanted to show hidden opposite of what you set this as? Show in filters and reports, hide when editing transactions.

The last comment I saw was from you here. Saying hiding/showing descision is out of scope for this PR. I'd planned to follow that and hide it everywhere. As I said in OP, how I have it set now is temporary, for testing purposes.

We can change that and decide now where to hide/show for each case. I'd be happy to make those changes now. From what I can see these are the locations it's used:
Filters
TransactionsTable
ConfirmCategoryDelete
TransferToAnotherCategory
CloseAccount
CoverOverspending

@youngcw
Copy link
Member

youngcw commented Mar 6, 2024

I think long term I would vote for something like this
Filters: Include
TransactionsTable: Exclude
ConfirmCategoryDelete: Include
TransferToAnotherCategory: Include
CloseAccount: ? (isn't this only accounts that are shown?)
CoverOverspending: Exclude

@carkom
Copy link
Contributor Author

carkom commented Mar 6, 2024

CloseAccount: ? (isn't this only accounts that are shown?)

If you close an on-budget account and transfer the balance to an off-budget account you are prompted to categorize the transfer via CategoryAutoComplete. I'd vote in include here.

@youngcw
Copy link
Member

youngcw commented Mar 7, 2024

This all looks good to me. Are you wanting to get other input or are you ready to get this merged in?

@psybers
Copy link
Contributor

psybers commented Mar 8, 2024

I like how this looks now. It was ever so briefly confusing when I went to select the hidden category:

image

and the transaction category changed:

image

and the name did not match. I had to mentally process that it was the right name, despite looking much shorter. But probably that is fine.

But why are hidden categories not shown in the list in some places now? For example, setting a rule you can't make the category a hidden one?

Similarly, I think being able to filter by them is very useful, especially in cases where you miscategorize something as a hidden category and need to find it again.

@Teprifer
Copy link

Teprifer commented Mar 8, 2024

But why are hidden categories not shown in the list in some places now? For example, setting a rule you can't make the category a hidden one?

Being able to set a hidden category in a rule doesn't make sense, if a category is hidden, it's not relevant any more. If it is indeed relevant, then it shouldn't be hidden.
Being able to add it would also lead to the numbers appearing not to balance within the roll over budget if expenses or deposits are out of sight.

Similarly, I think being able to filter by them is very useful, especially in cases where you miscategorize something as a hidden category and need to find it again.

I agree with this, or even just for wanting to see what you'd put against it(a hidden category) previously.


The drop down list still appears when attempting to filter on the accounts screen for a category that:

is hidden:
image

Doesn't exist:
image

Although this would go away if the above suggested behaviour to allow filtering hidden categories the same way as when adding a transaction is implemented.

@psybers
Copy link
Contributor

psybers commented Mar 8, 2024

Being able to set a hidden category in a rule doesn't make sense, if a category is hidden, it's not relevant any more. If it is indeed relevant, then it shouldn't be hidden. Being able to add it would also lead to the numbers appearing not to balance within the roll over budget if expenses or deposits are out of sight.

That logic probably makes sense for rollover budgeting. For report budgeting, I think what I describe makes sense. I have many things that show on my accounts that I don't consider part of my budget, so I hide them. I have a lot of rules set up to do that.

@carkom
Copy link
Contributor Author

carkom commented Mar 8, 2024

Being able to set a hidden category in a rule doesn't make sense, if a category is hidden, it's not relevant any more. If it is indeed relevant, then it shouldn't be hidden. Being able to add it would also lead to the numbers appearing not to balance within the roll over budget if expenses or deposits are out of sight.

That logic probably makes sense for rollover budgeting. For report budgeting, I think what I describe makes sense. I have many things that show on my accounts that I don't consider part of my budget, so I hide them. I have a lot of rules set up to do that.

This is not a rollover vs report discussion. You're both making assumptions on how everyone uses the software based on how you (personally) use the software. Some people hide categories they still actively use and some people hide categories that are no longer used.

@carkom
Copy link
Contributor Author

carkom commented Mar 8, 2024

I think long term I would vote for something like this
Filters: Include
TransactionsTable: Exclude
ConfirmCategoryDelete: Include
TransferToAnotherCategory: Include
CloseAccount: ? (isn't this only accounts that are shown?)
CoverOverspending: Exclude

Only thing I'd change on your list is Filters. You can find transactions in hidden categories using the search bar.

I forgot to add "Rules creation modal" which I'd vote for include.

@psybers
Copy link
Contributor

psybers commented Mar 8, 2024

This is not a rollover vs report discussion. You're both making assumptions on how everyone uses the software based on how you (personally) use the software. Some people hide categories they still actively use and some people hide categories that are no longer used.

And with that in mind, it would probably make sense to keep hidden categories showing in most places because that would support more use cases.

@Shazib
Copy link
Contributor

Shazib commented Mar 8, 2024

Hey all, thanks for getting this over the last hurdle!

If I recall, the idea that people hide and keep using categories was raised early on and it was decided that we didn't want to support people using the software 'incorrectly'.

I.e. Hidden categories should not be active

Copy link
Member

@youngcw youngcw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to add now. We can decide if we want the settings changed as we use it.

@carkom carkom merged commit 5bcfc71 into actualbudget:master Mar 11, 2024
19 checks passed
@carkom carkom deleted the hiddenCategory branch March 11, 2024 16:23
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants