actual icon indicating copy to clipboard operation
actual copied to clipboard

Indicate Hidden Categories in autocomplete dropdown

Open Shazib opened this issue 1 year ago โ€ข 38 comments

CHOSEN SOLUTION

On the transactions table, the hidden categories are not shown at all.

When used via GenericInput for filtering and reporting, the hidden transactions are shown in their own group

I could use some help figuring out why the tests are failing. I've tried replicating them in the browser and the data-id tags are present etc

image

Shazib avatar Oct 30 '23 22:10 Shazib

Deploy Preview for actualbudget ready!

Name Link
Latest commit 5613c6f65477600d6a5f63bb757e7624815911ff
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/655ba18f25184c00087fdb42
Deploy Preview https://deploy-preview-1843.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.

netlify[bot] avatar Oct 30 '23 22:10 netlify[bot]

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
16 2.97 MB โ†’ 2.97 MB (+392 B) +0.01%
Changeset
File ฮ” Size
src/components/autocomplete/CategoryAutocomplete.tsx ๐Ÿ“ˆ +1.06 kB (+13.19%) 8.06 kB โ†’ 9.12 kB
src/components/util/GenericInput.js ๐Ÿ“ˆ +47 B (+0.67%) 6.86 kB โ†’ 6.91 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/main.js 1.16 MB โ†’ 1.16 MB (+392 B) +0.03%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/665.chunk.js 824.28 kB 0%
static/media/Inter-italic.var.woff2 239.29 kB 0%
static/media/Inter-roman.var.woff2 221.86 kB 0%
static/js/444.chunk.js 156.11 kB 0%
static/js/wide-components.chunk.js 117.61 kB 0%
static/js/231.chunk.js 117.37 kB 0%
static/js/reports.chunk.js 74.37 kB 0%
static/js/narrow-components.chunk.js 52.67 kB 0%
static/js/301.chunk.js 13.31 kB 0%
static/js/473.chunk.js 13 kB 0%
static/js/resize-observer-polyfill.chunk.js 8.88 kB 0%
static/css/main.css 7.41 kB 0%
asset-manifest.json 2.07 kB 0%
index.html 1.66 kB 0%
static/media/browser-server.js 903 B 0%

github-actions[bot] avatar Oct 30 '23 22:10 github-actions[bot]

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
2 2.22 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.23 MB 0%
xfo.xfo.kcab.worker.js 1014.46 kB 0%

github-actions[bot] avatar Oct 30 '23 22:10 github-actions[bot]

May be a dumb question..... Is there an elegant way to NOT show hidden categories in the account ledger/schedule/rules pages... But DO show them in the reports pages?

Reasoning : I wouldn't expect to have hidden categories as options in the normal day-to-day pages, but I can definitely see the desire to be able to include them in reports.

shall0pass avatar Oct 30 '23 22:10 shall0pass

Exploring some of these options right now too.

You could pass a flag into the CategoryAutocomplete to decide whether or not to show them.

I guess my concern is that older transactions that are tagged with hidden categories, if you accidentally change the category there isn't an easy way to get it back without un-hiding the category etc.

There is also the possibility that people just hide cateegories to 'de-clutter' the budget page vs using it to deprecate categories.

Shazib avatar Oct 30 '23 22:10 Shazib

There is also the possibility that people just hide cateegories to 'de-clutter' the budget page vs using it to deprecate categories.

Maybe... I find that idea foreign.

When the lock/reconciliation transactions PR is merged, it should be less likely to accidentally change categories since it will offer a warning to click past.

shall0pass avatar Oct 30 '23 22:10 shall0pass

Not sure how easy it would be to implement , but another idea is to initially show a collapsed Hidden group on the bottom of auto complete and only show the hidden categories when the Hidden group is clicked.

joel-jeremy avatar Oct 31 '23 00:10 joel-jeremy

Not sure how easy it would be to implement , but another idea is to initially show a collapsed Hidden group on the bottom of auto complete and only show the hidden categories when the Hidden group is clicked.

Probably outside my wheelhouse! We could go for an easy-win option 1/2 and open a separate feature ticket for the more advanced solution, as one of those options won't be a 'breaking' change

Shazib avatar Oct 31 '23 00:10 Shazib

There is also the possibility that people just hide cateegories to 'de-clutter' the budget page vs using it to deprecate categories.

I think I would categorize this as bad behavior and not try to make it easier to get away with.

Of the options you have up currently my favorites are 4 then 1. I also like @joel-jeremy idea with the possible addition of opening up the hidden list if there are no longer any valid non hidden options left.

youngcw avatar Oct 31 '23 02:10 youngcw

May be a dumb question..... Is there an elegant way to NOT show hidden categories in the account ledger/schedule/rules pages... But DO show them in the reports pages?

Reasoning : I wouldn't expect to have hidden categories as options in the normal day-to-day pages, but I can definitely see the desire to be able to include them in reports.

This was pretty much what I said over on discord, I don't know why hidden categories are even shown in the picker, there must be a flag somewhere to tell Actual they are hidden as they don't appear on the budget sheet, why can't that logic just be applied to this dropdown?

rich-howell avatar Nov 01 '23 07:11 rich-howell

I think what I will do is hide them entirely by default, with an optional flag to show them in the format of option number 4.

I'll check that version in soon.

Shazib avatar Nov 01 '23 11:11 Shazib

I think what I will do is hide them entirely by default, with an optional flag to show them in the format of option number 4.

Just realized this PR exists. This option is good. I made a PR to go ahead and hide them by default. #1914

ioslife avatar Nov 16 '23 15:11 ioslife

I think what I will do is hide them entirely by default, with an optional flag to show them in the format of option number 4.

Just realized this PR exists. This option is good. I made a PR to go ahead and hide them by default. #1914

I have already done this as part of this PR. I just haven't checked it in yet!

Shazib avatar Nov 16 '23 23:11 Shazib

Putting the legacy ideas here to keep the top PR comment clean now that an option has been chosen

Previous Options

A number of options were discussed. I'm still working on trialing them all so watch this space!

Please comment your preferred view or other ideas you have. I hope to add screenshots of some other options shortly including a separate group at the bottom for all hidden categories.

  1. Grey it out image

  2. Add '(hidden)' text image

  3. Separate section for all hidden categories at the bottom. image

  4. As above with different styling? We can grey/italic etc. image

There is technically nothing stopping you adding a category group called 'Hidden' so that might be confusing. Maybe we shoulse use an alternate text or something.

  1. Just don't show them at all.

  2. Show via one of the above options, but only on certain screens with an optional prop, otherwise default to not shown.

Shazib avatar Nov 17 '23 22:11 Shazib

Some thoughts:

  1. It looks like this doesn't handle hidden category groups. Those still show up as normal
  2. Im conflicted on if its needed to treat the transaction edit drop down different. By putting the hidden categories at the bottom of the list they are already mostly out of sight. What if we just used the same organization in both the filter dropdown and transaction dropdown?

youngcw avatar Nov 20 '23 17:11 youngcw

I would vote for option 7 with the view of option 2 in the reports.

I can't rationalize why someone would want to hide a category and then actively budget with it. I think hidden should mean hidden.

shall0pass avatar Nov 20 '23 18:11 shall0pass

Some thoughts:

1. It looks like this doesn't handle hidden category groups.  Those still show up as normal

2. Im conflicted on if its needed to treat the transaction edit drop down different.  By putting the hidden categories at the bottom of the list they are already mostly out of sight.  What if we just used the same organization in both the filter dropdown and transaction dropdown?

RE your point 2, the general consensus seemed to be that people wanted them entirely gone on that screen. Happy to change it if people want to.

Shazib avatar Nov 20 '23 18:11 Shazib

I would vote for option 7 with the view of option 2 in the reports.

I can't rationalize why someone would want to hide a category and then actively budget with it. I think hidden should mean hidden.

I like the idea of being able to see the hidden categories without needing to unhide them, but that is likely not that useful in practice, so Im ok either way on this. I do think showing them in the options for reports and filters makes sense though because you may have used that category earlier in the year for example. I agree option 2 is nice in that case

youngcw avatar Nov 20 '23 18:11 youngcw

From a coding POV, option 2 is much simpler to implement that the current option creating a totally separate heading, but people seemed to prefer 4 at the time.

Happy to make a change to option 2.

Shazib avatar Nov 20 '23 18:11 Shazib

Happy to make a change to option 2.

I wouldn't complain if you did that

youngcw avatar Nov 21 '23 02:11 youngcw

fixes #1829

youngcw avatar Nov 27 '23 15:11 youngcw

Happy to make a change to option 2.

I wouldn't complain if you did that

I will try to get this done soon, not had much time recently

Shazib avatar Nov 27 '23 19:11 Shazib

I would vote for option 7 with the view of option 2 in the reports.

I can't rationalize why someone would want to hide a category and then actively budget with it. I think hidden should mean hidden.

I'd caution against making assumptions on other's usage of the software just because it doesn't match your usage. Example: someone may have a category that is the same every month. They aren't concerned about seeing it because it never changes. They want it calculated into the budget but don't need to see it. Their solution could be to hide it but still actively budget with it calculated in.

carkom avatar Dec 06 '23 12:12 carkom

I'd agree with the "option 2" concensus. Would it make sense to combine option one and two? Gray it out and write (hidden) next to it?

Is the plan to apply this to hidden groups as well?

carkom avatar Dec 06 '23 12:12 carkom

I'd caution against making assumptions on other's usage of the software just because it doesn't match your usage. Example: someone may have a category that is the same every month. They aren't concerned about seeing it because it never changes. They want it calculated into the budget but don't need to see it. Their solution could be to hide it but still actively budget with it calculated in.

I see. In my case I have some categories I used years ago, for example a Baby category. I have no intentions of using this category again, but yet it still exists. When the option to hide a category was introduced, it was presented in a way that you wouldn't have to move your category out of the group and it would still reflect in the proper place in the reports. I have no wish to see the category in the normal picker, but with only option 2 being selected it will always be there. If this is the path chosen, I'll have to make a choice and I'll probably opt to move those categories back into a 'hidden' group at the bottom and deal with the reports differently. I think it's going to feel like a half finished idea that needs a workaround to feel right. My 2ยข.

shall0pass avatar Dec 06 '23 12:12 shall0pass

On the transactions table, the hidden categories are not shown at all.

Wait is there some setting I'm missing? My local is not behaving as above. They all appear the same to me.

Budget List (showing hidden category): image

Transactions List (transactions is present): image

Edit Transaction Dropdown (hidden category is present): image

Filter Dropdown (hidden category is present): image

carkom avatar Dec 06 '23 14:12 carkom

I see. In my case I have some categories I used years ago, for example a Baby category. I have no intentions of using this category again, but yet it still exists. When the option to hide a category was introduced, it was presented in a way that you wouldn't have to move your category out of the group and it would still reflect in the proper place in the reports. I have no wish to see the category in the normal picker, but with only option 2 being selected it will always be there. If this is the path chosen, I'll have to make a choice and I'll probably opt to move those categories back into a 'hidden' group at the bottom and deal with the reports differently. I think it's going to feel like a half finished idea that needs a workaround to feel right. My 2ยข.

Do you not currently see those hidden categories in the category dropdown autocomplete for the transactions list? I can currently see all my hidden categories and groups in the autocomplete dropdowns for every place they are used in the app.

carkom avatar Dec 06 '23 14:12 carkom

Do you not currently see those hidden categories in the category dropdown autocomplete for the transactions list? I can currently see all my hidden categories and groups in the autocomplete dropdowns for every place they are used in the app.

I do see them in the drop down list. Personally, I think that's design mistake. If I hide a category, with special exceptions (reports), I would expect those categories to be hidden throughout the app. Leaving them in the picker list seems like we can't decide if we are really committed to hiding something, which is kind of silly since it's easy to unhide it.

shall0pass avatar Dec 06 '23 21:12 shall0pass

I do see them in the drop down list. Personally, I think that's design mistake. If I hide a category, with special exceptions (reports), I would expect those categories to be hidden throughout the app. Leaving them in the picker list seems like we can't decide if we are really committed to hiding something, which is kind of silly since it's easy to unhide it.

I agree with you. However, we need to enable a way to find those transaction easily and I think the proposed solution is trying to do that.

In your budget, you've hidden a "Baby" category you don't use anymore. What would you do if, for some reason, you needed to look up a transaction from a year ago that is in that category. You'd have to go to budget list, unhide it then go to the transaction list and filter to find it then back to budget list to re-hide it.

carkom avatar Dec 07 '23 13:12 carkom

I do see them in the drop down list. Personally, I think that's design mistake. If I hide a category, with special exceptions (reports), I would expect those categories to be hidden throughout the app. Leaving them in the picker list seems like we can't decide if we are really committed to hiding something, which is kind of silly since it's easy to unhide it.

I agree with you. However, we need to enable a way to find those transaction easily and I think the proposed solution is trying to do that.

In your budget, you've hidden a "Baby" category you don't use anymore. What would you do if, for some reason, you needed to look up a transaction from a year ago that is in that category. You'd have to go to budget list, unhide it then go to the transaction list and filter to find it then back to budget list to re-hide it.

Wait, hold on. I was just tinkering with this statement and noticed you can just use the search bar to find hidden items in the transactions list.

So I'll update my opinion, I think it should be hidden everywhere (filter list and reports).

Reports can enable a choice to show/hide if we so choose but that can be decided upon for each report (not part of this PR).

carkom avatar Dec 07 '23 13:12 carkom