actual icon indicating copy to clipboard operation
actual copied to clipboard

[WIP] Save custom reports

Open carkom opened this issue 1 year ago • 11 comments

I have a working prototype for saving custom reports. Rather than working behind closed doors, I wanted to get this out there so people can offer feedback and bug reports. It's working pretty well. I still have some tweaks to make. LMK what you think!

carkom avatar Nov 17 '23 23:11 carkom

Deploy Preview for actualbudget ready!

Name Link
Latest commit 257cf4662cabc0a82d048fe9917d1a4d6e2844d2
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/657ae83c975cbc0008187a1f
Deploy Preview https://deploy-preview-1924.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 Nov 17 '23 23:11 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.98 MB (+8.39 kB) +0.28%
Changeset
File Δ Size
src/components/reports/reports/CustomReportListCards.js 🆕 +9.51 kB 0 B → 9.51 kB
src/components/reports/graphs/TableGraph.tsx 🆕 +2.51 kB 0 B → 2.51 kB
../loot-core/src/client/data-hooks/reports.tsx 🆕 +686 B 0 B → 686 B
src/components/reports/Convert.tsx 🆕 +166 B 0 B → 166 B
src/components/reports/SaveReport.tsx 📈 +8.36 kB (+337.96%) 2.47 kB → 10.84 kB
src/components/reports/ReportOptions.tsx 📈 +564 B (+37.03%) 1.49 kB → 2.04 kB
src/components/reports/Overview.js 📈 +754 B (+25.28%) 2.91 kB → 3.65 kB
src/components/reports/reports/CustomReport.js 📈 +3.16 kB (+21.74%) 14.52 kB → 17.68 kB
src/components/reports/ReportTableHeader.tsx 📈 +363 B (+15.80%) 2.24 kB → 2.6 kB
src/components/common/AnchorLink.tsx 📈 +77 B (+14.75%) 522 B → 599 B
src/components/reports/ReportTableList.tsx 📈 +717 B (+12.14%) 5.77 kB → 6.47 kB
src/components/reports/ReportTopbar.js 📈 +843 B (+12.08%) 6.81 kB → 7.64 kB
src/components/reports/ReportTableTotals.tsx 📈 +363 B (+11.43%) 3.1 kB → 3.46 kB
src/hooks/useFilters.ts 📈 +97 B (+6.11%) 1.55 kB → 1.65 kB
src/components/common/MenuButton.tsx 📈 +29 B (+5.23%) 555 B → 584 B
src/components/reports/ReportCard.tsx 📈 +36 B (+3.03%) 1.16 kB → 1.2 kB
src/components/filters/SavedFilters.js 📈 +220 B (+1.64%) 13.09 kB → 13.3 kB
src/components/transactions/SelectedTransactions.js 📈 +85 B (+1.25%) 6.66 kB → 6.74 kB
src/style/styles.ts 📈 +44 B (+0.96%) 4.5 kB → 4.54 kB
src/components/reports/graphs/StackedBarGraph.tsx 📈 +36 B (+0.66%) 5.35 kB → 5.38 kB
src/components/payees/index.js 📈 +85 B (+0.45%) 18.55 kB → 18.63 kB
src/components/table.tsx 📈 +30 B (+0.09%) 32.43 kB → 32.46 kB
src/components/reports/spreadsheets/default-spreadsheet.tsx 📉 -13 B (-0.08%) 15.58 kB → 15.57 kB
src/components/common/Menu.tsx 📉 -7 B (-0.12%) 5.58 kB → 5.58 kB
src/components/reports/ChooseGraph.js 📉 -1.11 kB (-26.44%) 4.2 kB → 3.09 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
static/js/402.chunk.js 0 B → 13.65 kB (+13.65 kB) -

Removed

Asset File Size % Changed
static/js/301.chunk.js 13.31 kB → 0 B (-13.31 kB) -100%

Bigger

Asset File Size % Changed
static/js/reports.chunk.js 74.37 kB → 82.45 kB (+8.08 kB) +10.86%
static/js/main.js 1.15 MB → 1.15 MB (+93 B) +0.01%

Smaller

Asset File Size % Changed
static/js/wide-components.chunk.js 127.18 kB → 127.05 kB (-127 B) -0.10%

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/231.chunk.js 117.37 kB 0%
static/js/narrow-components.chunk.js 53.17 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 Nov 17 '23 23:11 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 → 2.22 MB (+1.88 kB) +0.08%
Changeset
File Δ Size
packages/loot-core/src/server/reports/app.ts 🆕 +2.63 kB 0 B → 2.63 kB
packages/loot-core/src/server/aql/schema/index.ts 📈 +1.19 kB (+9.44%) 12.58 kB → 13.76 kB
packages/loot-core/src/server/main.ts 📈 +52 B (+0.08%) 63.24 kB → 63.29 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.23 MB → 1.23 MB (+1.88 kB) +0.15%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
xfo.xfo.kcab.worker.js 1014.46 kB 0%

github-actions[bot] avatar Nov 17 '23 23:11 github-actions[bot]

These reports look great. Looking forward to this - it'll help me with my taxes 😂.

I uploaded my budget, then tried to navigate to the custom reports and I'm getting this error:

image

Split is null - would hope the type checking could pick up on that image

Looks like something to do with hidden categories

EDIT: I've just noticed you have a common on your feedback issue - will delete this

MikesGlitch avatar Nov 18 '23 10:11 MikesGlitch

How would saving reports work with the time options of "year to date" and "last year" would those get saved as raw date ranges and needed re created upon a new year or new month?

youngcw avatar Nov 21 '23 15:11 youngcw

How would saving reports work with the time options of "year to date" and "last year" would those get saved as raw date ranges and needed re created upon a new year or new month?

When the report is saved start date is set to currentMonth.firstMonthThisYear and the end dat is set to current month. It's not a dynamicly changing variable that updates with each passing day.

I suppose it would be possible to update those dates each time the user opens the report.

carkom avatar Nov 21 '23 16:11 carkom

When the report is saved start date is set to currentMonth.firstMonthThisYear and the end dat is set to current month. It's not a dynamicly changing variable that updates with each passing day.

I suppose it would be possible to update those dates each time the user opens the report.

I bet the "last year" option isn't a big deal since that wont change really at all, but the "year to date" one would be nice to have the new months get added.

youngcw avatar Nov 21 '23 16:11 youngcw

If you do setup a way to save a "last year" report it would also be useful to have a this month and last month sliding window.

Maybe one option would be to have a few built in ranges that are saved as strings like "last year", "this year", "last month", "last 3 months", "this quarter" and such, then also have the option for a custom window that doesn't change.

youngcw avatar Nov 21 '23 18:11 youngcw

Just linking this for visibility while we're on the topic of sliding windows: https://github.com/actualbudget/actual/pull/1924#discussion_r1398210016

MatissJanis avatar Nov 21 '23 19:11 MatissJanis

@MatissJanis what are you thoughts on something like this?

carkom avatar Dec 12 '23 19:12 carkom

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 14 '24 01:01 github-actions[bot]

I should be able to pick this up again in another week. Just waiting on other PRs to get merged first.

carkom avatar Jan 15 '24 16:01 carkom

This PR got too far behind master and became unmanageable to try to fix and bring current.

New PR is #2335

carkom avatar Feb 05 '24 23:02 carkom