[PR #5225] [CLOSED] [WIP] Migrating BudgetCategories to TypeScript #5831

Closed
opened 2026-02-28 21:19:26 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5225
Author: @technohiker
Created: 6/22/2025
Status: Closed

Base: masterHead: dev


📝 Commits (10+)

  • 32abd95 Converted file to TS, added imports and prop type declarations.
  • aa59bb9 Fixed import in BudgetCategories.
  • c9dd7a4 Types of props such as onDeleteCategory match types of props passed down from index.tsx.
  • 89b7e9f Updated onApplyBudgetTemplatesInGroup to accept string[] on all relevant files.
  • 1459a54 Added types to items object in BudgetCategories.
  • a404d21 Added 'collapsed' field to SidebarGroup and fixed month type in ExpenseCategory.
  • 5174279 Temporarily changed dataComponents to any and added null innerRef.
  • 9f19e76 Merge branch 'master' into dev
  • 614b02b Updated BudgetTable to resolve merge conflicts.
  • e8a3b08 Added release note.

📊 Changes

5 files changed (+74 additions, -29 deletions)

View changed files

📝 packages/desktop-client/src/components/budget/BudgetCategories.tsx (+50 -16)
📝 packages/desktop-client/src/components/budget/BudgetTable.tsx (+12 -9)
📝 packages/desktop-client/src/components/budget/ExpenseCategory.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/index.tsx (+5 -3)
upcoming-release-notes/5225.md (+6 -0)

📄 Description

Fixes #1483

This is to convert BudgetCategories.jsx to TypeScript. Primarily consists of defining types, very few changes to the code were made. A few other files like BudgetTable had changes made to ensure compatibility. There are a couple parts that must be examined before a merge can be done.

The first is small, it is to properly define an innerRef prop for SidebarGroup. There was none before and I currently have it set to null as I was not sure what the best method for handling this is.

The second step is more work, it is to properly define the dataComponents prop that will be passed into the Category components. The MonthComponent props of ExpenseCategory, ExpenseGroup and IncomeHeader had a type mismatch for what was initially defined in components/budget/index.tsx. At the moment dataComponents is typed as any simply to resolve the error, but a proper type will need to be defined. I did not know how to handle this step as it may require redefining types, and wish to have this discussed in this pull request before moving forward.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5225 **Author:** [@technohiker](https://github.com/technohiker) **Created:** 6/22/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dev` --- ### 📝 Commits (10+) - [`32abd95`](https://github.com/actualbudget/actual/commit/32abd95168b27a8e0754ff2d2818981f2b902c35) Converted file to TS, added imports and prop type declarations. - [`aa59bb9`](https://github.com/actualbudget/actual/commit/aa59bb9187fc861ede373fe23426fe76bf616358) Fixed import in BudgetCategories. - [`c9dd7a4`](https://github.com/actualbudget/actual/commit/c9dd7a4ea320ee729c3623fcb228c9391dedcd73) Types of props such as onDeleteCategory match types of props passed down from index.tsx. - [`89b7e9f`](https://github.com/actualbudget/actual/commit/89b7e9fb02d099a78681a734961e8f25c0b76e78) Updated onApplyBudgetTemplatesInGroup to accept string[] on all relevant files. - [`1459a54`](https://github.com/actualbudget/actual/commit/1459a54c14941375e9a1102efd00899362e2e7ed) Added types to items object in BudgetCategories. - [`a404d21`](https://github.com/actualbudget/actual/commit/a404d21016c010fa9aa079eb660fe4c94f852f18) Added 'collapsed' field to SidebarGroup and fixed month type in ExpenseCategory. - [`5174279`](https://github.com/actualbudget/actual/commit/5174279d6dcb79e5013dcaea777e4ce32fdab8ef) Temporarily changed dataComponents to any and added null innerRef. - [`9f19e76`](https://github.com/actualbudget/actual/commit/9f19e76e538270f3a35b787247382abef1a80eb2) Merge branch 'master' into dev - [`614b02b`](https://github.com/actualbudget/actual/commit/614b02bda1c36030cc684083c24326fd367a7af0) Updated BudgetTable to resolve merge conflicts. - [`e8a3b08`](https://github.com/actualbudget/actual/commit/e8a3b08d36028ef875c4fde7dcd461bad8491343) Added release note. ### 📊 Changes **5 files changed** (+74 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/budget/BudgetCategories.tsx` (+50 -16) 📝 `packages/desktop-client/src/components/budget/BudgetTable.tsx` (+12 -9) 📝 `packages/desktop-client/src/components/budget/ExpenseCategory.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/index.tsx` (+5 -3) ➕ `upcoming-release-notes/5225.md` (+6 -0) </details> ### 📄 Description Fixes #1483 This is to convert BudgetCategories.jsx to TypeScript. Primarily consists of defining types, very few changes to the code were made. A few other files like BudgetTable had changes made to ensure compatibility. There are a couple parts that must be examined before a merge can be done. The first is small, it is to properly define an innerRef prop for SidebarGroup. There was none before and I currently have it set to null as I was not sure what the best method for handling this is. The second step is more work, it is to properly define the dataComponents prop that will be passed into the Category components. The MonthComponent props of ExpenseCategory, ExpenseGroup and IncomeHeader had a type mismatch for what was initially defined in components/budget/index.tsx. At the moment dataComponents is typed as `any` simply to resolve the error, but a proper type will need to be defined. I did not know how to handle this step as it may require redefining types, and wish to have this discussed in this pull request before moving forward. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 21:19:26 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5831