[PR #4119] [MERGED] [Redux Toolkit Migration] modalsSlice #5194

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4119
Author: @joel-jeremy
Created: 1/9/2025
Status: Merged
Merged: 3/4/2025
Merged by: @joel-jeremy

Base: masterHead: redux-toolkit-modals-slice


📝 Commits (10+)

📊 Changes

107 files changed (+2438 additions, -1711 deletions)

View changed files

📝 packages/desktop-client/src/components/HelpMenu.tsx (+3 -3)
📝 packages/desktop-client/src/components/ManageRules.tsx (+22 -12)
📝 packages/desktop-client/src/components/Modals.tsx (+180 -203)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+52 -26)
📝 packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx (+9 -3)
📝 packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx (+21 -11)
📝 packages/desktop-client/src/components/banksync/index.tsx (+16 -4)
📝 packages/desktop-client/src/components/budget/goals/CategoryAutomationButton.tsx (+2 -2)
📝 packages/desktop-client/src/components/budget/index.tsx (+24 -11)
📝 packages/desktop-client/src/components/manager/BudgetList.tsx (+17 -5)
📝 packages/desktop-client/src/components/manager/WelcomeScreen.tsx (+4 -2)
📝 packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx (+61 -34)
📝 packages/desktop-client/src/components/mobile/accounts/Accounts.tsx (+2 -2)
📝 packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (+115 -85)
📝 packages/desktop-client/src/components/mobile/budget/index.tsx (+147 -81)
📝 packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (+85 -46)
📝 packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx (+12 -7)
📝 packages/desktop-client/src/components/modals/AccountMenuModal.tsx (+5 -8)
📝 packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx (+6 -1)
📝 packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx (+13 -8)

...and 80 more files

📄 Description

Reviewers - summary of changes (There are a lot more files because we have a lot of modals):

  1. Deleted loot-core/client/actions/modals.ts and loot-core/client/reducers/modals.ts
  2. Changed imports from loot-core/client/actions to desktop-client/app/modalsSlice
  3. Actions payloads are now objects for consistency
  4. Moved Modal type to modalsSlice and updated to be a union type. This results in better autocomplete when dispatching pushModal
  5. Updated modals to re-use the options type in modalsSlice's Modal type (# 4) so that we don't have to define modal props/options in 2 places

🔄 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/4119 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 1/9/2025 **Status:** ✅ Merged **Merged:** 3/4/2025 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `redux-toolkit-modals-slice` --- ### 📝 Commits (10+) - [`fb8ad47`](https://github.com/actualbudget/actual/commit/fb8ad475598d5a61eb15be6ee52113daf176ec31) Migrate to accountSlice - [`ce7509f`](https://github.com/actualbudget/actual/commit/ce7509f3351192230b61aa4f31d34a0a98c18914) Fix lint and typecheck errors - [`ad6b500`](https://github.com/actualbudget/actual/commit/ad6b5009d5422d0da3c1c65f0dc07375fe36df10) Update types - [`57c68c8`](https://github.com/actualbudget/actual/commit/57c68c893cfc965bcb4a277f682bb738b5fac081) Fix lint - [`c5d7a72`](https://github.com/actualbudget/actual/commit/c5d7a7264fd127e5e978092a553c18cad9154391) Fix types - [`c05773b`](https://github.com/actualbudget/actual/commit/c05773bbcbb107ebbfa4d18184ed036e77e06947) Cleanup - [`84c7822`](https://github.com/actualbudget/actual/commit/84c7822173f90e34584836550ab946cbd300765b) Rename file - [`f893837`](https://github.com/actualbudget/actual/commit/f8938378458a99c729808e9da8356d157f062c8e) Rename state - [`4e20e6d`](https://github.com/actualbudget/actual/commit/4e20e6db93f486adeb9d8cf4b73ece66b72aeebc) Cleanup - [`05423a1`](https://github.com/actualbudget/actual/commit/05423a167b2d7903d655fc4709751c776b1f5242) Fix typecheck error ### 📊 Changes **107 files changed** (+2438 additions, -1711 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/HelpMenu.tsx` (+3 -3) 📝 `packages/desktop-client/src/components/ManageRules.tsx` (+22 -12) 📝 `packages/desktop-client/src/components/Modals.tsx` (+180 -203) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+52 -26) 📝 `packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx` (+9 -3) 📝 `packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx` (+21 -11) 📝 `packages/desktop-client/src/components/banksync/index.tsx` (+16 -4) 📝 `packages/desktop-client/src/components/budget/goals/CategoryAutomationButton.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/budget/index.tsx` (+24 -11) 📝 `packages/desktop-client/src/components/manager/BudgetList.tsx` (+17 -5) 📝 `packages/desktop-client/src/components/manager/WelcomeScreen.tsx` (+4 -2) 📝 `packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx` (+61 -34) 📝 `packages/desktop-client/src/components/mobile/accounts/Accounts.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx` (+115 -85) 📝 `packages/desktop-client/src/components/mobile/budget/index.tsx` (+147 -81) 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx` (+85 -46) 📝 `packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx` (+12 -7) 📝 `packages/desktop-client/src/components/modals/AccountMenuModal.tsx` (+5 -8) 📝 `packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx` (+6 -1) 📝 `packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx` (+13 -8) _...and 80 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 --> - [x] `actions/account.ts` / `reducers/account.ts` -> `accounts/accountsSlice.ts` #4012 - [x] `actions/queries.ts` / `reducers/queries.ts` -> `queries/queriesSlice.ts` #4016 - [x] `actions/app.ts` / `reducers/app.ts` -> `app/appSlice.ts` #4018 - [x] `actions/budgets.ts` / `reducers/budgets.ts` -> `budgets/budgetsSlice.ts` #4114 - [x] `actions/modals.ts` / `reducers/modals.ts` -> `modals/modalsSlice.ts` - [ ] `actions/notifications.ts` / `reducers/notifications.ts` -> `notifications/notificationsSlice.ts` - [ ] `actions/prefs.ts` / `reducers/prefs.ts` -> `prefs/prefsSlice.ts` - [ ] `actions/user.ts` / `reducers/user.ts` -> `users/usersSlice.ts` Reviewers - summary of changes (There are a lot more files because we have a lot of modals): 1. Deleted loot-core/client/actions/modals.ts and loot-core/client/reducers/modals.ts 2. Changed imports from loot-core/client/actions to desktop-client/app/modalsSlice 3. Actions payloads are now objects for consistency 4. Moved `Modal` type to `modalsSlice` and updated to be a union type. This results in better autocomplete when dispatching `pushModal` 5. Updated modals to re-use the options type in `modalsSlice`'s `Modal` type (\# 4) so that we don't have to define modal props/options in 2 places --- <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:07:48 -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#5194