[PR #4828] [MERGED] Move loot-core/client/data-hooks over to desktop-client package #5606

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4828
Author: @joel-jeremy
Created: 4/16/2025
Status: Merged
Merged: 5/16/2025
Merged by: @joel-jeremy

Base: masterHead: loot-core-client-data-hooks-to-desktop-client


📝 Commits (8)

  • b76cc34 Move loot-core/client/modals code over to desktop-client package
  • 54e9b39 Fix lint error
  • 1aae065 Move loot-core/client/data-hooks over to desktop-client package
  • 679b23a Fix lint errors
  • 7cafae6 Fix typecheck error
  • df24aa9 Fix typecheck and lint errors
  • 8533af9 Fix typecheck error
  • 6cfb649 Fix lint error

📊 Changes

51 files changed (+366 additions, -232 deletions)

View changed files

📝 packages/desktop-client/src/components/ManageRules.tsx (+1 -1)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+4 -6)
📝 packages/desktop-client/src/components/accounts/Balance.tsx (+1 -1)
📝 packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx (+3 -2)
📝 packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx (+2 -1)
📝 packages/desktop-client/src/components/banksync/EditSyncAccount.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/BudgetTable.tsx (+1 -1)
📝 packages/desktop-client/src/components/filters/FiltersMenu.jsx (+2 -2)
📝 packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx (+4 -8)
📝 packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (+1 -1)
📝 packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx (+3 -5)
📝 packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx (+1 -1)
📝 packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsx (+2 -1)
📝 packages/desktop-client/src/components/modals/EditRuleModal.jsx (+1 -1)
📝 packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx (+1 -1)
📝 packages/desktop-client/src/components/reports/Overview.tsx (+2 -2)
📝 packages/desktop-client/src/components/reports/SaveReport.tsx (+2 -1)
📝 packages/desktop-client/src/components/reports/reports/Calendar.tsx (+8 -5)
📝 packages/desktop-client/src/components/reports/reports/CashFlow.tsx (+3 -3)
📝 packages/desktop-client/src/components/reports/reports/CustomReport.tsx (+3 -3)

...and 31 more files

📄 Description

The original reason this was designed this way it to share the code with a mobile app. But since we no longer have a mobile app, these codes can now be merged to desktop-client package.

  • accounts folder
  • app folder
  • budgets folder
  • modals folder
  • notifications folder
  • prefs folder
  • queries folder
  • users folder
  • data-hooks folder
  • store folder
  • files under root loot-core/client folder

There will be some suppressed import warning due to loot-core importing some desktop-client files but this is only temporary until we migrate all the files

Changes done:

  1. Break-up files under data-hooks folder into one file per hook i.e.
  • useSchedules
  • useCachedSchedules
  • useTransactions
  • usePreviewTransactions
  • useTransactionsSearch
  • useTransactionFilters <-- Renamed from useFilters
  • useDashboard
  • useWidget
  • useReports
  • useReport
  1. Move the new files to desktop-client/src/hooks (vscode handles updating of imports)
  2. Renamed desktop-client/src/hooks/useFilters to useRuleConditionFilters to disambiguate from the useFilters from loot-core/client/data-hooks
  3. Run yarn lint:fix

🔄 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/4828 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 4/16/2025 **Status:** ✅ Merged **Merged:** 5/16/2025 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `loot-core-client-data-hooks-to-desktop-client` --- ### 📝 Commits (8) - [`b76cc34`](https://github.com/actualbudget/actual/commit/b76cc3450a2679cdc91ef4277df4589639bcb179) Move loot-core/client/modals code over to desktop-client package - [`54e9b39`](https://github.com/actualbudget/actual/commit/54e9b39e5366ede0903323cbbc1a91cdbc640ca7) Fix lint error - [`1aae065`](https://github.com/actualbudget/actual/commit/1aae065f4c41820dc8281c95d7b945293c09af38) Move loot-core/client/data-hooks over to desktop-client package - [`679b23a`](https://github.com/actualbudget/actual/commit/679b23add9be5acff34c3df6375dfde339cccccb) Fix lint errors - [`7cafae6`](https://github.com/actualbudget/actual/commit/7cafae647c46263085e039dcfd677aba10558e50) Fix typecheck error - [`df24aa9`](https://github.com/actualbudget/actual/commit/df24aa9ebca795ffb9a8325fb5e23616aff6ad09) Fix typecheck and lint errors - [`8533af9`](https://github.com/actualbudget/actual/commit/8533af91a8ef9f681ee867cb28d8381bc673e943) Fix typecheck error - [`6cfb649`](https://github.com/actualbudget/actual/commit/6cfb649f033650f1c817cc35b129f4fdd0ec82f1) Fix lint error ### 📊 Changes **51 files changed** (+366 additions, -232 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/ManageRules.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+4 -6) 📝 `packages/desktop-client/src/components/accounts/Balance.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx` (+3 -2) 📝 `packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/banksync/EditSyncAccount.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/BudgetTable.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/filters/FiltersMenu.jsx` (+2 -2) 📝 `packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx` (+4 -8) 📝 `packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx` (+1 -1) 📝 `packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx` (+3 -5) 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/modals/BudgetAutomationsModal.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/modals/EditRuleModal.jsx` (+1 -1) 📝 `packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/reports/Overview.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/reports/SaveReport.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/reports/reports/Calendar.tsx` (+8 -5) 📝 `packages/desktop-client/src/components/reports/reports/CashFlow.tsx` (+3 -3) 📝 `packages/desktop-client/src/components/reports/reports/CustomReport.tsx` (+3 -3) _...and 31 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> The original reason this was designed this way it to share the code with a mobile app. But since we no longer have a mobile app, these codes can now be merged to `desktop-client` package. - [x] accounts folder - [x] app folder - [x] budgets folder - [x] modals folder - [x] notifications folder - [x] prefs folder - [x] queries folder - [x] users folder - [x] data-hooks folder - [x] store folder - [ ] files under root `loot-core/client` folder There will be some suppressed import warning due to loot-core importing some desktop-client files but this is only temporary until we migrate all the files # Changes done: 1. Break-up files under `data-hooks` folder into one file per hook i.e. - `useSchedules` - `useCachedSchedules` - `useTransactions` - `usePreviewTransactions` - `useTransactionsSearch` - `useTransactionFilters` <-- **Renamed from useFilters** - `useDashboard` - `useWidget` - `useReports` - `useReport` 2. Move the new files to `desktop-client/src/hooks` (vscode handles updating of imports) 3. Renamed `desktop-client/src/hooks/useFilters` to `useRuleConditionFilters` to disambiguate from the `useFilters` from `loot-core/client/data-hooks` 4. Run `yarn lint:fix` --- <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:15:15 -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#5606