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

Custom Reports - add schema #2246

Merged
merged 12 commits into from
Jan 20, 2024
Merged

Conversation

carkom
Copy link
Contributor

@carkom carkom commented Jan 18, 2024

This is all backend work to saving reports from the Custom Report feature.

Copy link

netlify bot commented Jan 18, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 6c20b05
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/65ab0c85a9a2500008a01452
😎 Deploy Preview https://deploy-preview-2246.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 Jan 18, 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 5.08 MB → 5.09 MB (+1.51 kB) +0.03%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/client/data-hooks/reports.ts 🆕 +731 B 0 B → 731 B
src/components/common/AnchorLink.tsx 📈 +55 B (+18.33%) 300 B → 355 B
src/components/reports/ReportOptions.ts 📈 +413 B (+12.29%) 3.28 kB → 3.69 kB
src/components/reports/Overview.jsx 📈 +84 B (+4.73%) 1.73 kB → 1.82 kB
src/components/reports/reports/CustomReport.jsx 📈 +235 B (+2.08%) 11.02 kB → 11.25 kB
src/components/reports/reports/CustomReportCard.jsx 📈 +20 B (+1.13%) 1.73 kB → 1.75 kB
src/components/reports/ReportCard.tsx 📈 +8 B (+0.96%) 830 B → 838 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/ReportRouter.js 1.95 MB → 1.95 MB (+1.46 kB) +0.07%
static/js/index.js 2.63 MB → 2.63 MB (+55 B) +0.00%

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/BackgroundImage.js 122.29 kB 0%
static/js/ButtonLink.js 379 B 0%
static/js/narrow.js 82.17 kB 0%
static/js/BalanceTooltip.js 6.07 kB 0%
static/js/FiltersMenu.js 28.92 kB 0%
static/js/wide.js 239.01 kB 0%

Copy link
Contributor

github-actions bot commented Jan 18, 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.23 MB → 1.24 MB (+1.64 kB) +0.13%
Changeset
File Δ Size
packages/loot-core/src/server/reports/app.ts 🆕 +2.36 kB 0 B → 2.36 kB
packages/loot-core/src/server/aql/schema/index.ts 📈 +1.01 kB (+7.97%) 12.68 kB → 13.69 kB
packages/loot-core/src/server/main.ts 📈 +63 B (+0.10%) 63.69 kB → 63.75 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.24 MB (+1.64 kB) +0.13%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

Some small comments, but overall looks really good! Thanks for keeping the scope small. It's much easier to review PRs like this one.

);
}

const flag = true;
Copy link
Member

Choose a reason for hiding this comment

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

❓ question: ‏what's this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried to explain it in commnets in line 23.

"useReports" is meant to pull an array of all reports in the db table...except there's no db table yet. This is the work-around I implemented so that the code doesn't create fatal errors. It's basically returning an empty array but all this code will be used for querying the db for saved reports.

@carkom carkom requested a review from MatissJanis January 20, 2024 00:12
@carkom carkom merged commit c66d6e0 into actualbudget:master Jan 20, 2024
19 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Jan 20, 2024
@carkom carkom deleted the createReportsSchema branch January 20, 2024 11:32
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
* Add schema work

* notes

* merge fixes

* add to handlers

* notes update

* Update packages/loot-core/src/server/reports/app.ts

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* review changes

* type updates

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
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.

2 participants