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: Table Totals Callback #2768

Merged
merged 3 commits into from
May 20, 2024

Conversation

carkom
Copy link
Contributor

@carkom carkom commented May 16, 2024

Creating a callback for the table totals to fix a bug that created duplicate columns while rendering.

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label May 16, 2024
@github-actions github-actions bot changed the title Custom Reports: Table Totals Callback [WIP] Custom Reports: Table Totals Callback May 16, 2024
@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 16, 2024
Copy link

netlify bot commented May 16, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 410c92d
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/66493a5a6337f20009f4e8ea
😎 Deploy Preview https://deploy-preview-2768.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 May 16, 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.72 MB → 4.71 MB (-4.15 kB) -0.09%
Changeset
File Δ Size
src/components/reports/graphs/tableGraph/ReportTable.tsx 📈 +1.11 kB (+59.92%) 1.85 kB → 2.96 kB
src/components/reports/graphs/tableGraph/ReportTableRow.tsx 📈 +572 B (+9.38%) 5.96 kB → 6.52 kB
src/components/reports/spreadsheets/recalculate.ts 📈 +7 B (+0.48%) 1.42 kB → 1.42 kB
src/components/reports/graphs/tableGraph/ReportTableHeader.tsx 📈 +12 B (+0.47%) 2.52 kB → 2.53 kB
src/components/reports/spreadsheets/custom-spreadsheet.ts 📈 +8 B (+0.18%) 4.28 kB → 4.28 kB
src/components/reports/graphs/tableGraph/ReportTableList.tsx 📉 -225 B (-9.89%) 2.22 kB → 2 kB
src/components/reports/ChooseGraph.tsx 📉 -775 B (-18.16%) 4.17 kB → 3.41 kB
src/components/reports/graphs/tableGraph/RenderTableRow.tsx 📉 -96 B (-18.50%) 519 B → 423 B
src/components/reports/graphs/tableGraph/ReportTableTotals.tsx 📉 -4.77 kB (-73.16%) 6.52 kB → 1.75 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
static/js/ReportRouter.js 1.23 MB → 1.23 MB (-4.15 kB) -0.33%

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/narrow.js 59.97 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.54 kB 0%
static/js/wide.js 261.78 kB 0%
static/js/index.js 3 MB 0%

Copy link
Contributor

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

@carkom carkom changed the title [WIP] Custom Reports: Table Totals Callback Custom Reports: Table Totals Callback May 16, 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 16, 2024
@Teprifer
Copy link

Hrm, I wonder if #2643 might be interfering here?

Using the test budget.

Starting from default:

image

Clicking on the total returns no results:

image

Change type to deposit:

image

Returns payments:

image

Change type to net:

image

Deposit total and payment total as above, total total returns deposit and payments.


Changing to Mode: Time

image

Jan - no results:

image

Change type to deposit - see payments and deposits:

image

Change type to net - see payments and deposits:

image

@carkom
Copy link
Contributor Author

carkom commented May 18, 2024

Hrm, I wonder if #2643 might be interfering here?

Yea looks to be the case. I'll keep that regression fix to a separate PR since it's also not working for any of the other graphs. This PR is concerned about the totals row call back and not to with the showActivity clicks. Good call out though as I didn't know we'd created a bug with that PR.

@carkom carkom requested a review from MatissJanis May 18, 2024 20:33
@MatissJanis
Copy link
Member

How can I reproduce the bug on edge?

@carkom
Copy link
Contributor Author

carkom commented May 18, 2024

Open a new custom report. Click table graph. Click time. Click a cell to go to accounts page. Click browser back button. Notice that the totals row has a bunch of 0s before the actual data starts.

@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 18, 2024
…ph/ReportTableRow.tsx

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed ✅ Approved Pull Request has been approved and can be merged labels May 18, 2024
@carkom carkom requested a review from MatissJanis May 18, 2024 23:32
@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 20, 2024
@carkom carkom merged commit 3f1fd55 into actualbudget:master May 20, 2024
19 checks passed
@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 20, 2024
@carkom carkom deleted the CRTotalsCallback branch May 20, 2024 16:24
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.

None yet

3 participants