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

🐛 fix networth graph loading forever for empty budgets #2725

Merged
merged 4 commits into from May 13, 2024

Conversation

MatissJanis
Copy link
Member

Fix #2711

Do not show the loading indicator forever in empty budget files.

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label May 7, 2024
@github-actions github-actions bot changed the title 🐛 fix networth graph loading forever for empty budgets [WIP] 🐛 fix networth graph loading forever for empty budgets May 7, 2024
Copy link

netlify bot commented May 7, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 5be5f84
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/663e68cf20fd390008c36d95
😎 Deploy Preview https://deploy-preview-2725.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.

@trafico-bot trafico-bot bot added 🚧 WIP Still work-in-progress, please don't review and don't merge and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 7, 2024
@@ -41,6 +42,7 @@
"inter-ui": "^3.19.3",
"jest": "^27.5.1",
"jest-watch-typeahead": "^2.2.2",
"lodash": "^4.17.21",
Copy link
Member Author

Choose a reason for hiding this comment

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

Adding lodash. I think using these utils instead of rebuilding our own (and making them strict TS compliant) would be a good thing. It would definitely save us time. LMK if you disagree.

Comment on lines -24 to -26
if (accounts.length === 0) {
return null;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only functional change. Everything else is to make this file TS strict compliant.

@@ -18,18 +18,6 @@ export async function runAll(
cb(data);
}

export function index<
Copy link
Member Author

Choose a reason for hiding this comment

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

Making this strict TS compliant was a big pain.. so instead I opted to use lodash.

Copy link
Contributor

github-actions bot commented May 7, 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
9 4.71 MB → 4.72 MB (+3.18 kB) +0.07%
Changeset
File Δ Size
node_modules/lodash/keyBy.js 🆕 +1.2 kB 0 B → 1.2 kB
node_modules/lodash/_createAggregator.js 🆕 +746 B 0 B → 746 B
node_modules/lodash/_baseAggregator.js 🆕 +741 B 0 B → 741 B
node_modules/lodash/_arrayAggregator.js 🆕 +694 B 0 B → 694 B
package.json 📈 +45 B (+1.57%) 2.8 kB → 2.85 kB
node_modules/lodash/_baseEvery.js 📈 +4 B (+0.65%) 615 B → 619 B
node_modules/lodash/mapValues.js 📈 +4 B (+0.29%) 1.34 kB → 1.34 kB
node_modules/lodash/findIndex.js 📈 +4 B (+0.25%) 1.58 kB → 1.58 kB
node_modules/lodash/every.js 📈 +4 B (+0.21%) 1.82 kB → 1.83 kB
src/components/reports/spreadsheets/net-worth-spreadsheet.ts 📉 -58 B (-1.65%) 3.42 kB → 3.37 kB
src/components/reports/util.ts 📉 -158 B (-19.75%) 800 B → 642 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.23 MB → 1.23 MB (+3.13 kB) +0.25%
static/js/index.js 3 MB → 3 MB (+45 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/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.53 kB 0%
static/js/narrow.js 59.81 kB 0%
static/js/wide.js 262.4 kB 0%

Copy link
Contributor

github-actions bot commented May 7, 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%

@MatissJanis MatissJanis changed the title [WIP] 🐛 fix networth graph loading forever for empty budgets 🐛 fix networth graph loading forever for empty budgets May 7, 2024
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed 🚧 WIP Still work-in-progress, please don't review and don't merge labels May 7, 2024
Copy link
Contributor

@carkom carkom left a comment

Choose a reason for hiding this comment

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

LGTM!

@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 13, 2024
@MatissJanis MatissJanis merged commit 44770a3 into master May 13, 2024
19 checks passed
@MatissJanis MatissJanis deleted the matiss/fix-2711 branch May 13, 2024 16:34
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels May 13, 2024
shall0pass added a commit to shall0pass/actual that referenced this pull request May 13, 2024
* 🐛 fix networth graph loading forever for empty budgets (actualbudget#2725)

* add release workflow

---------

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.

[Bug]: Net Worth report will permanently show a loading animation for new accounts with 0 transactions
2 participants