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

[Maintenance] Convert ExpenseGroup, ExpenseCategory, IncomeCategory components to Typescript. #1897

Merged

Conversation

MikesGlitch
Copy link
Contributor

@MikesGlitch MikesGlitch commented Nov 11, 2023

Convert ExpenseGroup, ExpenseCategory, IncomeCategory components to Typescript.

#1483

Copy link

netlify bot commented Nov 11, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 9c41c5e
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/654fea4e3e27a80007835208
😎 Deploy Preview https://deploy-preview-1897.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.

@MikesGlitch MikesGlitch changed the title Maintenance: ExpenseGroup to Typescript [Maintenance] ExpenseGroup to Typescript Nov 11, 2023
Copy link
Contributor

github-actions bot commented Nov 11, 2023

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.83 MB → 2.83 MB (-37 B) -0.00%
Changeset
File Δ Size
src/components/budget/ExpenseGroup.tsx 🆕 +3.4 kB 0 B → 3.4 kB
src/components/budget/ExpenseCategory.tsx 🆕 +2.57 kB 0 B → 2.57 kB
src/components/budget/IncomeCategory.tsx 🆕 +1.81 kB 0 B → 1.81 kB
src/components/sort.tsx 📈 +21 B (+0.63%) 3.23 kB → 3.25 kB
src/components/budget/SidebarCategory.tsx 📉 -14 B (-0.21%) 6.37 kB → 6.36 kB
src/components/budget/ExpenseGroup.js 🔥 -3.4 kB (-100%) 3.4 kB → 0 B
src/components/budget/ExpenseCategory.js 🔥 -2.63 kB (-100%) 2.63 kB → 0 B
src/components/budget/IncomeCategory.js 🔥 -1.81 kB (-100%) 1.81 kB → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/main.js 1.12 MB → 1.12 MB (+6 B) +0.00%

Smaller

Asset File Size % Changed
static/js/wide-components.chunk.js 127.12 kB → 127.08 kB (-43 B) -0.03%

Unchanged

Asset File Size % Changed
static/js/848.chunk.js 760.98 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 52.15 kB 0%
static/js/reports.chunk.js 30 kB 0%
static/js/473.chunk.js 13 kB 0%
static/js/312.chunk.js 12.93 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%

Copy link
Contributor

github-actions bot commented Nov 11, 2023

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 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.23 MB 0%
xfo.xfo.kcab.worker.js 1014.46 kB 0%

@@ -36,7 +34,6 @@ function SidebarCategory({
editing,
style,
isLast,
onDragChange,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused

@MikesGlitch MikesGlitch changed the title [Maintenance] ExpenseGroup to Typescript [Maintenance] Convert ExpenseGroup, ExpenseCategory, IncomeCategory components to Typescript. Nov 11, 2023
@MikesGlitch MikesGlitch force-pushed the maintenance/typescript-components branch from 782c1ca to e50e3b8 Compare November 11, 2023 20:24
function ExpenseCategory({
cat,
budgetArray,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused

@@ -67,7 +90,6 @@ function ExpenseCategory({
onEditName={onEditName}
onSave={onSave}
onDelete={onDelete}
onDragChange={onDragChange}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused

@MikesGlitch MikesGlitch marked this pull request as ready for review November 11, 2023 20:37
end(item) {
_onDragChange.current({ state: 'end', type, item });
end(dragState) {
_onDragChange.current({ state: 'end', type, item: dragState.item });
Copy link
Contributor Author

@MikesGlitch MikesGlitch Nov 11, 2023

Choose a reason for hiding this comment

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

I've changed this - it was a bug - the type checking picked it up.

The end function passes in the DragState as its prop. We were passing the full DragState through as the "item" when we should pass the item that is being dragged(T).

I have checked and this isn't getting used anywhere - so the bug wasn't visible/depended on - safe to change.

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.

Thanks for all this hard work!

@MatissJanis MatissJanis merged commit 30c7024 into actualbudget:master Nov 11, 2023
19 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Nov 11, 2023
@MikesGlitch MikesGlitch deleted the maintenance/typescript-components branch November 11, 2023 21:08
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
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