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] TypeScript migration #1483

Open
11 of 46 tasks
MatissJanis opened this issue Aug 7, 2023 · 7 comments
Open
11 of 46 tasks

[Maintenance] TypeScript migration #1483

MatissJanis opened this issue Aug 7, 2023 · 7 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed maintenance Related to making the project easier to maintain

Comments

@MatissJanis
Copy link
Member

MatissJanis commented Aug 7, 2023

We are currently at around 50% TypeScript. There is still lots of work to be done to get to 100%.

Feel free to help out by converting a file here and there. Also hardening the existing TS files is welcome (i.e. converting unknown and any to more strict types).

Please do not send massive migration PRs. Try to keep it small and isolated.


Remaining files:

  • packages/desktop-client/src/components/accounts/Account.jsx - ♻️ (typescript) moving account component to TS #3311
  • packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx
  • packages/desktop-client/src/components/accounts/Balance.jsx
  • packages/desktop-client/src/components/accounts/Header.jsx - ♻️ (typescript) migrated account header to TS #3640
  • packages/desktop-client/src/components/accounts/Reconcile.jsx - ♻️ (typescript) migrate reconcile file to TS #3355
  • packages/desktop-client/src/components/budget/BudgetCategories.jsx
  • packages/desktop-client/src/components/budget/BudgetTable.jsx
  • packages/desktop-client/src/components/filters/FiltersMenu.jsx
  • packages/desktop-client/src/components/manager/ManagementApp.jsx
  • packages/desktop-client/src/components/manager/Modals.jsx
  • packages/desktop-client/src/components/mobile/accounts/Account.jsx
  • packages/desktop-client/src/components/mobile/accounts/Accounts.jsx
  • packages/desktop-client/src/components/mobile/accounts/AccountTransactions.jsx
  • packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx
  • packages/desktop-client/src/components/mobile/budget/CategoryTransactions.jsx
  • packages/desktop-client/src/components/mobile/transactions/ListBox.jsx
  • packages/desktop-client/src/components/mobile/transactions/ListBoxSection.jsx
  • packages/desktop-client/src/components/mobile/transactions/Option.jsx
  • packages/desktop-client/src/components/mobile/transactions/Transaction.jsx
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
  • packages/desktop-client/src/components/mobile/transactions/TransactionList.jsx
  • packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.jsx
  • packages/desktop-client/src/components/modals/EditField.jsx
  • packages/desktop-client/src/components/modals/EditRule.jsx
  • packages/desktop-client/src/components/modals/ImportTransactions.jsx - ♻️ (typescript) migrate parts of ImportTransactionModal to TS #3570
  • packages/desktop-client/src/components/modals/ImportTransactions.test.js - ♻️ (typescript) migrate parts of ImportTransactionModal to TS #3570
  • packages/desktop-client/src/components/modals/LoadBackup.jsx - ♻️ (typescript) migrated ManagePayees and LoadBackupModal files #3507
  • packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx
  • packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx
  • packages/desktop-client/src/components/payees/ManagePayees.jsx - ♻️ (typescript) migrated ManagePayees and LoadBackupModal files #3507
  • packages/desktop-client/src/components/payees/ManagePayeesPage.jsx
  • packages/desktop-client/src/components/payees/ManagePayeesWithData.jsx
  • packages/desktop-client/src/components/reports/Header.jsx
  • packages/desktop-client/src/components/reports/reports/NetWorth.jsx - ♻️ (typescript) migrated NetWorth component to TS #3576
  • packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx
  • packages/desktop-client/src/components/schedules/ScheduleDetails.jsx
  • packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx - Convert RecurringSchedulePicker.jsx -> RecurringSchedulePicker.tsx #3396
  • packages/desktop-client/src/components/transactions/SelectedTransactionsButton.jsx - ♻️ (typescript) migrated account header to TS #3640
  • packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx
  • packages/desktop-client/src/components/transactions/TransactionList.jsx
  • packages/desktop-client/src/components/transactions/TransactionsTable.jsx
  • packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx
  • packages/desktop-client/src/components/util/GenericInput.jsx
  • packages/desktop-client/src/hooks/useSplitsExpanded.jsx
  • packages/desktop-client/src/icons/add-attribute.js
  • packages/loot-core/src/platform/server/indexeddb/index.js
@doggan
Copy link
Contributor

doggan commented Sep 6, 2023

While looking at this, I found a cool package (https://github.com/codemix/deprank) that uses PageRank algorithm to find the 'most important' files in the project and list out dependencies. This can give a good idea of which files are good to tackle first for JS -> TS conversion (and which files may be more challenging).

Here's the command I ran for desktop-client:
npx deprank --ext=".js,.jsx" --deps-first ./packages/desktop-client/src | grep -v "/icons/"

@joel-jeremy
Copy link
Contributor

@MatissJanis I think we should pin this so that community is aware that the project is still accepting typescript PRs.

@MatissJanis
Copy link
Member Author

That makes sense @joel-jeremy , but we can only pin 3x issues. Perhaps lets wait for one of the experimental features to be released and then pin this one?

VejayPersaud added a commit to VejayPersaud/actual that referenced this issue Jun 19, 2024
browser-server.js to browser-server.ts and updates browser-preload.browser.js
@MatissJanis MatissJanis pinned this issue Jul 8, 2024
@MatissJanis
Copy link
Member Author

The majority of the codebase has been migrated to TypeScript.

Pinning this issue to give it more visibility. If folks want to contribute - working on the TS migration is an easy way to learn more about the Actual codebase while also benefiting the community.

@MatissJanis
Copy link
Member Author

Updated the root description with a list of files remaining. Not much to go to be 100% TS compliant!

@cindywu
Copy link

cindywu commented Nov 21, 2024

I'm going to try to chip away at this over the next few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed maintenance Related to making the project easier to maintain
Projects
None yet
Development

No branches or pull requests

5 participants