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

[WIP] [Redux Toolkit Migration] accountSlice #4012

Open
wants to merge 11 commits into
base: redux-toolkit
Choose a base branch
from

Conversation

joel-jeremy
Copy link
Contributor

@joel-jeremy joel-jeremy commented Dec 19, 2024

  • actions/account.ts / reducers/account.ts -> accounts/accountsSlice.ts [WIP] [Redux Toolkit Migration] accountSlice #4012
  • actions/queries.ts / reducers/queries.ts -> queries/queriesSlice.ts
  • actions/app.ts / reducers/app.ts -> app/appSlice.ts
  • actions/budgets.ts / reducers/budgets.ts -> budgets/budgetsSlice.ts
  • 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

@actual-github-bot actual-github-bot bot changed the title [Redux Toolkit Migration] accountSlice [WIP] [Redux Toolkit Migration] accountSlice Dec 19, 2024
Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit ccaf3d7
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67647fa2f1fd910008bf7dd3
😎 Deploy Preview https://deploy-preview-4012.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.

Copy link
Contributor

github-actions bot commented Dec 19, 2024

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
10 5.54 MB → 5.57 MB (+36.47 kB) +0.64%
Changeset
File Δ Size
node_modules/immer/dist/immer.mjs 🆕 +17.74 kB 0 B → 17.74 kB
home/runner/work/actual/actual/packages/loot-core/src/client/accounts/accountsSlice.ts 🆕 +5.12 kB 0 B → 5.12 kB
node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs 📈 +17.97 kB (+354.33%) 5.07 kB → 23.04 kB
home/runner/work/actual/actual/packages/loot-core/src/client/actions/queries.ts 📈 +1.64 kB (+19.92%) 8.21 kB → 9.85 kB
home/runner/work/actual/actual/packages/loot-core/src/client/store/index.ts 📈 +92 B (+9.31%) 988 B → 1.05 kB
src/global-events.ts 📈 +126 B (+4.01%) 3.07 kB → 3.2 kB
home/runner/work/actual/actual/packages/loot-core/src/client/shared-listeners.ts 📈 +235 B (+2.97%) 7.72 kB → 7.95 kB
src/components/modals/SelectLinkedAccountsModal.jsx 📈 +147 B (+1.98%) 7.24 kB → 7.38 kB
src/index.tsx 📈 +11 B (+1.50%) 735 B → 746 B
node_modules/redux/dist/redux.mjs 📈 +119 B (+1.39%) 8.33 kB → 8.45 kB
home/runner/work/actual/actual/packages/loot-core/src/client/actions/sync.ts 📈 +18 B (+1.21%) 1.45 kB → 1.47 kB
src/components/sidebar/Accounts.tsx 📈 +31 B (+0.66%) 4.61 kB → 4.64 kB
src/hooks/useFailedAccounts.ts 📈 +1 B (+0.46%) 218 B → 219 B
src/components/accounts/AccountSyncCheck.tsx 📈 +22 B (+0.37%) 5.85 kB → 5.87 kB
package.json 📈 +4 B (+0.13%) 2.97 kB → 2.97 kB
src/components/accounts/Account.tsx 📈 +48 B (+0.11%) 44.53 kB → 44.58 kB
src/components/transactions/TransactionsTable.jsx 📈 +41 B (+0.06%) 67.1 kB → 67.14 kB
src/components/BankSyncStatus.tsx 📈 +1 B (+0.05%) 1.85 kB → 1.85 kB
src/components/mobile/accounts/Accounts.tsx 📈 +1 B (+0.01%) 7.48 kB → 7.48 kB
src/components/mobile/accounts/AccountTransactions.tsx 📈 +1 B (+0.01%) 7.5 kB → 7.5 kB
src/components/reports/reports/Calendar.tsx 📉 -37 B (-0.14%) 26.11 kB → 26.07 kB
src/components/transactions/TransactionList.jsx 📉 -38 B (-0.71%) 5.22 kB → 5.18 kB
home/runner/work/actual/actual/packages/loot-core/src/client/constants.ts 📉 -104 B (-8.03%) 1.26 kB → 1.16 kB
home/runner/work/actual/actual/packages/loot-core/src/client/reducers/index.ts 📉 -21 B (-11.41%) 184 B → 163 B
home/runner/work/actual/actual/packages/loot-core/src/client/actions/account.ts 🔥 -5.86 kB (-100%) 5.86 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/client/reducers/account.ts 🔥 -662 B (-100%) 662 B → 0 B
src/hooks/useActions.ts 🔥 -176 B (-100%) 176 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.46 MB → 3.49 MB (+36.63 kB) +1.04%
static/js/TransactionList.js 102.79 kB → 102.79 kB (+3 B) +0.00%
static/js/narrow.js 83.38 kB → 83.38 kB (+2 B) +0.00%

Smaller

Asset File Size % Changed
static/js/wide.js 161.16 kB → 161.04 kB (-128 B) -0.08%
static/js/ReportRouter.js 1.58 MB → 1.58 MB (-37 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/useAccountPreviewTransactions.js 1.63 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%

Copy link
Contributor

github-actions bot commented Dec 19, 2024

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
1 1.32 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.32 MB 0%

@joel-jeremy joel-jeremy changed the base branch from master to redux-toolkit December 19, 2024 21:58
@joel-jeremy
Copy link
Contributor Author

/update-vrt

@@ -289,7 +300,8 @@ type AccountInternalProps = {
categoryGroups: ReturnType<typeof useCategories>['grouped'];
hideFraction: boolean;
accountsSyncing: string[];
} & ReturnType<typeof useActions>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove the useActions prop here. Instead we will pass in the dispatch function and dispatch the actions manually instead.


export function listenForSyncEvent(actions, store) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove actions from useActions here. Instead, we manually dispatch the actions through the store's dispatch property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant