actual icon indicating copy to clipboard operation
actual copied to clipboard

[Feedback]: Custom Reports

Open carkom opened this issue 1 year ago • 160 comments

Thanks to everyone for their input in getting this merged. Thanks to the maintainers for the reviews. Anything not listed please feel free to add to the conversation. Cheers!

Update: moving completed items down and consolidating most recent feedback items

Known Issues:

  • [x] Newly hidden categories do not update the dashboad cards. The actual report correctly excludes newly hidden categories.
  • [x] Table Totals need a callback

Upcoming Additions:

  • [x] Add interval selection (by: day, week, month, year)
  • [x] Implement disabledList so all disabled functions can get updated/maintained in one place
  • [ ] Drag and drop dashboard

UI suggestions:

  • [ ] Condsider adding Rolling Averages (like Category Spending graph)
  • [ ] Add Net Worth numbers
  • [x] Click graph items (table cell, donut section, single bar, etc.) and see transaction that contribute to that cell *all done except table graph
  • [ ] onHover first columns (make faster)
  • [x] Change Category sort order
  • [ ] Refactor show hidden and show empty toggles

***** Version 1 ***** Known Issues:

  • [x] Need to find a way to freeze first row column when scrolling (table graph) (fixed by #1996)
  • [x] Would like to freeze bottom "totals" row as well. Not sure it's possible (table graph) (same as above)
  • [x] Table Rendering is funky when using filters (makes me think my rendering could be done much better) (same as above)
    • Add tnum to table formats
  • [x] Load Payees is intermitent (must navigate to payee page to load them into app before it will work)
  • [x] Hidden Groups crash Bar Graph
    • [x] Hidden Groups crash Table Graph
  • [x] Error when changing "split" drop down in "time" mode for StackedBarGraph
  • [x] The Range: "all time" is not working.
  • [x] Loading time for large budgets is quite slow (fixed by #1988)
  • [x] dataset does not update on "Type" change
  • [x] Add interval selection (by: day, week, fortnight, month, year)

Upcoming Additions:

  • [x] Saving the graph to the "Reports" homepage (#1924)
    • Drag and drop to reorder
    • "..." to rename or delete on homepage
  • [x] Make relative saved graphs update when opened (eg. current month)
  • [x] Enable "Show Label" button
  • [x] Enable "Show Legend" button
  • [x] Add range options "year to date" and "last year"
  • [x] Figure out logic for when/how to show labels on each graph
  • [x] Create Live/Static choice for date ranges.

UI suggestions from reviewers (open to discussion, leave your comment!):

  • [x] Legend and Summary on by default (changed to global variables)
  • [ ] Condsider adding Rolling Averages (like Category Spending graph)
  • [x] Display percentages in pie chart (argument here is that it could get really busy with 30+ categories)
    • It's been suggested to only display pieces with more than 10%
  • [ ] Collapse Groups in matrix table (not entirely neccessary since groups can be found in the "split" menu). A nice functionality to consider though.
  • [x] Remove hover highlight on Bar/StackedBar
  • [ ] Add Net Worth numbers
  • [x] Add select all and unselect all buttons to categorySelector
  • [x] Use global variables for view (legend/summart/labels)

Backend planned additions/changes to improve code/functionality:

  • [ ] Improve state variables
  • [ ] Implement disabledList so all disabled functions can get updated/maintained in one place

carkom avatar Nov 16 '23 19:11 carkom

Great work! It looks as if it must have been a huge task for which we are very grateful indeed.

My main use will be of the Table view. As you say, the alignment of numbers (particularly larger numbers) in the table still needs some work and also this alignment seems inconsistent between various time-scale views.

The "year to date" and "last year" options will be great additions!

Kidglove57 avatar Nov 17 '23 10:11 Kidglove57

In my dream world I would also love to be able to click through the table entry to see the underlying transactions!

Kidglove57 avatar Nov 17 '23 10:11 Kidglove57

Hidden category groups break the processing. The error below is what gets printed, but the core of the issue is that the categoryGroupCalcData ends up with a null entry for each hidden category.

default-spreadsheet.tsx:350 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'id')
  ¦ at default-spreadsheet.tsx:350:19
  ¦ at Array.map (<anonymous>)
  ¦ at default-spreadsheet.tsx:349:29
  ¦ at Array.map (<anonymous>)
  ¦ at default-spreadsheet.tsx:332:40
(anonymous) @ default-spreadsheet.tsx:350
(anonymous) @ default-spreadsheet.tsx:349
(anonymous) @ default-spreadsheet.tsx:332
Promise.then (async)
(anonymous) @ useReport.js:11
sS @ react-dom.production.min.js:244
lM @ react-dom.production.min.js:286
lP @ react-dom.production.min.js:283
lO @ react-dom.production.min.js:281
ly @ react-dom.production.min.js:273
i_ @ react-dom.production.min.js:127
(anonymous) @ react-dom.production.min.js:267

youngcw avatar Nov 17 '23 14:11 youngcw

Awesome work. Couple issues i've noticed.

  • Selecting a payee filter seems to show it as deleted

image

  • Flipping between the 'Type' when in 'Time' mode crashes the app.

Shazib avatar Nov 18 '23 02:11 Shazib

Flipping between the 'Type' when in 'Time' mode crashes the app” I have been unable to reproduce this crash on my live budget. Although I do get the crash when selecting a Split other than category EDIT I should have added that this happened in the stacked bar graph. But seems to be fixed in 1930.

Kidglove57 avatar Nov 18 '23 09:11 Kidglove57

Really happy to have this feature!

  • The Range: "all time" is not working.
  • Reducing Range in table view does not work properly I saw the initial save report feature (https://github.com/actualbudget/actual/pull/1924) and it's sleek
  • not a big fan of the grey hover color for bar charts and I would remove it in the reports page

idea for the future that I had: net worth view which displays a breakdown of account balance. Ideally with an area chart

Redbox3070 avatar Nov 18 '23 09:11 Redbox3070

Overall: super impressive work! This is a MASSIVE improvement to Actual. I will personally be using it loads as well! Thanks for all the hard work!

My feedback (sorry for nitpicking):

  • [x] loading indicators - I think we're missing these; for large budgets (such as mine) it takes ~40 seconds for the split_by:payee to load the data - and there is no loading indicator while this is happening.
  • [ ] if I change from split_by:payee to split_by:group while payee is still loading - I will get a weird "flash" of the payee data after it finishes loading - I think the previous calculations don't get cancelled
  • [x] the category visibility selector gets hidden on small screens with no ability to scroll in it - I think we're missing a minHeight
  • [x] would be nice to add on-hover tooltips to the icons (i.e. show summary); the native title attribute shows up with a bit of a delay

MatissJanis avatar Nov 18 '23 14:11 MatissJanis

When reporting on categories it would be great to have a select and deselect all button. Particularly the latter, In order to quickly narrow down the categories required for a particular report.

Kidglove57 avatar Nov 18 '23 15:11 Kidglove57

When reporting on categories it would be great to have a select and deselect all button. Particularly the latter, In order to quickly narrow down the categories required for a particular report.

Can you specify what part of the page you are referring to?

carkom avatar Nov 18 '23 15:11 carkom

“Can you specify what part of the page you are referring to?” Sorry for being unclear! I am referring to the sidebar in the Custom Reports screen where all Groups and Categories are ticked. I would like to be able to “deselect all” (rather than individually deselecting Grouos or Categories. This would make it quicker for me to then individually select just a few categories to compare.

Kidglove57 avatar Nov 18 '23 17:11 Kidglove57

Flipping between the 'Type' when in 'Time' mode crashes the app” I have been unable to reproduce this crash on my live budget. Although I do get the crash when selecting a Split other than category EDIT I should have added that this happened in the stacked bar graph. But seems to be fixed in 1930.

Sorry there is an additional step in the sequence

switch from Total to Time, then change the Split

Here is a clip from demo.actualbudget.org

https://github.com/actualbudget/actual/assets/4405777/34451f1a-0463-4c73-bc5f-cf8892f65be9

Shazib avatar Nov 18 '23 18:11 Shazib

* [x]  loading indicators - I think we're missing these; for large budgets (such as mine) it takes ~40 seconds for the `split_by:payee` to load the data - and there is no loading indicator while this is happening.

Can you check this on #1930? I put in a fix but can't test it since my budget isn't that big...

carkom avatar Nov 20 '23 00:11 carkom

* [x]  loading indicators - I think we're missing these; for large budgets (such as mine) it takes ~40 seconds for the `split_by:payee` to load the data - and there is no loading indicator while this is happening.

Can you check this on #1930? I put in a fix but can't test it since my budget isn't that big...

My budget goes back to Dec 2019 so I tested this in Netlifly. I used "all time", in "table view" and in "time mode". Loading time changing from category to payee was 13 seconds in Safari, although no indication that loading was happening.

Kidglove57 avatar Nov 20 '23 08:11 Kidglove57

PS: Thank you so much for adding in Year to Date and Last Year!

Kidglove57 avatar Nov 20 '23 08:11 Kidglove57

* [x]  loading indicators - I think we're missing these; for large budgets (such as mine) it takes ~40 seconds for the `split_by:payee` to load the data - and there is no loading indicator while this is happening.

Can you check this on #1930? I put in a fix but can't test it since my budget isn't that big...

Sadly it's still quite slow and doing these "glitches". Tricky to explain what I'm seeing visually.. if you added privacy mode for the Y axis - I could share a screen recording.

MatissJanis avatar Nov 20 '23 18:11 MatissJanis

Sadly it's still quite slow and doing these "glitches". Tricky to explain what I'm seeing visually.. if you added privacy mode for the Y axis - I could share a screen recording.

Due to the way recharts handles YAxis tick labels I'm not sure I can use the "privacyFilter" implementation. I've used it everywhere else (tooltips, legends, etc) but the best I can do for Axis is replace the numbers with a static string variable. I chose '...' for now. Open to changing the string if there's a better or more consistant UI with how we do it elsewhere in the app. Cheers!

carkom avatar Nov 20 '23 20:11 carkom

Here you go:

https://github.com/actualbudget/actual/assets/886567/6cedf0be-1714-4cb2-a0e2-f9639673a2f4

MatissJanis avatar Nov 21 '23 08:11 MatissJanis

The control side bar isn't very reactive. There seems to be a max height. This is clear on the categories selection, where there is plenty of space below, but it introduces a scroll bar element : image

Setting the overflow-y behaviour of the ul element from scroll to auto had the desired result for me.

Akellade avatar Nov 21 '23 11:11 Akellade

Here you go: Screen.Recording.2023-11-21.at.08.12.28.mov

I've added a loading indicator. Still not sure what to do to help speed that up though. Payees loading can be quite slow for larger SQL files. Also, not sure how to cancel current data load when something new is clicked - currently it just waits for first one to complete then loads the next one.

Maybe make individual query files and call them via switch statement based on "mode" "groupBy" and "graphType" selections?

carkom avatar Nov 21 '23 16:11 carkom

I have also asked for feedback on this in the Project Reports discussion.

My thoughts are then when the Expense view is selected in Reports this should show the net in each expense category, after any refunds. In turn, the Income view should only show Income categories.

At present receipts into an expense category are shown as Income.

Just wondering if this behaviour is intended? Thanks!

Kidglove57 avatar Nov 25 '23 22:11 Kidglove57

At present receipts into an expense category are shown as Income.

@carkom Im looking at one of my categories that is specifically for reimbursements and it isn't acting like you described on discord. I can select expenses only and get what is expected, but net and income views don't show the money coming into the category. My guess is that this is due to the income all being in the form of off-budget to on-budget transfers. Those don't seem to count towards the table data.

youngcw avatar Nov 27 '23 03:11 youngcw

@carkom Im looking at one of my categories that is specifically for reimbursements and it isn't acting like you described on discord.

Heya! I'm not sure which discord post you're referencing. I posted some suggestions on how it could work but wasn't saying that is how it currently does.

For further understanding of what/how data is displayed. By default the report hides off-budget, hidden categories/groups, empty ($0) categories, and uncategorized transactions. You can choose to show any/all of this data by ticking the corresponding checkbox in the sidebar.

I can select expenses only and get what is expected, but net and income views don't show the money coming into the category. My guess is that this is due to the income all being in the form of off-budget to on-budget transfers. Those don't seem to count towards the table data.

FYI, the app labels transfers as uncategorized transactions that have a "payee.transfer_acct" not equal to null. It shows these in the transactions list of the accounts pages but does not add them to any budget totals since they have no category.

If you'd like to see income for an account select the table graph and Time/Account/Net for the sidebar choices. You can easily see all the income for that account in the "assets" column and all the expenses in the "debts" column.

carkom avatar Nov 27 '23 12:11 carkom

Just chipping in here but maybe I read the question wrongly? The off budget to on budget transfers seem to be key to this comment. They do not of course have a category on the off budget side of the transfer. However, on receipt into the on budget account that side would be categorised.

is @youngcw in fact saying that these categorised inflows are not appearing as income in the Custom Reports OR as a net off against the expense?

Kidglove57 avatar Nov 27 '23 12:11 Kidglove57

@Kidglove57 that was what I was trying to get at. The transfers don't get counted as income even though they are categorized in that reimbursement category. That category has a balance of zero on the budget. If I set the custom table report to "net" I only see the expenses and nothing shows up under "income".

youngcw avatar Nov 27 '23 14:11 youngcw

It would be nice to be able to hide the side bar and top bar settings options, especially if viewing a saved report.

youngcw avatar Nov 27 '23 15:11 youngcw

Just chipping in here but maybe I read the question wrongly? The off budget to on budget transfers seem to be key to this comment. They do not of course have a category on the off budget side of the transfer. However, on receipt into the on budget account that side would be categorised.

On the receipt side, where you say they have a category, what category would that be?

If you click on Payee and then "make transfer" it converts the transaction to a transfer and locks the category. You litterally can't set the category unless you remove the transfer flag. My contention is that it's not possible for a transfer to also have a category...

carkom avatar Nov 27 '23 16:11 carkom

@Kidglove57 that was what I was trying to get at. The transfers don't get counted as income even though they are categorized in that reimbursement category. That category has a balance of zero on the budget. If I set the custom table report to "net" I only see the expenses and nothing shows up under "income".

Can you tick all these boxes and tell me if you see what you're expecting. image

carkom avatar Nov 27 '23 16:11 carkom

@youngcw @Kidglove57 I think what we are missing here is examples. Can either of you share an example file that I can play with? Feel free to adjust a demo file to match what you are seeing so you don't have to share anything personal.

carkom avatar Nov 27 '23 16:11 carkom

My contention is that it's not possible for a transfer to also have a category...

It is most certainly possible, I have lots of transfers with categories. Here is a demo budget that has an example. Look at the category Reimburse:Off-budget Reimburse. It has a charge then a transfer from off-budget. The budget table shows a balance of zero, but the data table shows only the expense even when selecting "net". 2023-11-27-_test-budget.zip

I tried selecting all the optional checkboxes and I still got the same issue

youngcw avatar Nov 27 '23 16:11 youngcw

On the receipt side, where you say they have a category, what category would that be?

If you click on Payee and then "make transfer" it converts the transaction to a transfer and locks the category. You litterally can't set the category unless you remove the transfer flag. My contention is that it's not possible for a transfer to also have a category...

I wonder if we are at cross purposes here? If I make a transfer from an "Off Budget Account" into a "For Budget" account then Actual will insist that I enter a category but on that one side only - i.e. for the transaction side that is entering the "For Budget" account. I can choose whichever category is appropriate.

At the moment, the categorised receipt into the For Budget account is not reflected whatever box or dropdown is selected. I am guessing this must be because transfers are ignored completely - as indeed they should be between "For Budget" accounts. So it is just this very specific use case that falls through the cracks ie uncategorised transfer from Off Budget become categorised transfer on the For Budget side.

Kidglove57 avatar Nov 27 '23 16:11 Kidglove57