Skip to content

A local-first personal finance app

[Mobile] Drag and drop expense categories to re-order (#4484)

Joel Jeremy Marquezb9e7d7e9c25f
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-1-chromium-linux.png
index f7f77b2485..81b69ee4c5 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-2-chromium-linux.png
index cf4dcfc159..a7cb8ed4db 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-3-chromium-linux.png
index ceef61f362..da7f9fb5a0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-applies-budget-template-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--14404-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--14404-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png
index acdcae7808..40dbb57f15 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--14404-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--14404-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--321fd-ed-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--321fd-ed-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png
index 0c57e22142..a2f97ccc88 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--321fd-ed-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--321fd-ed-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--4bb70-ed-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--4bb70-ed-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png
index 286b9b1361..ca455643f9 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--4bb70-ed-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--4bb70-ed-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--589a6-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--589a6-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png
index 675cb1564c..4caa6fdb22 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--589a6-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--589a6-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6ab37-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6ab37-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png
index 33cf677dff..7f1ff07a15 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6ab37-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6ab37-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6dbdb-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6dbdb-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png
index 1685ff8d92..c4a2c5a9c8 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6dbdb-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--6dbdb-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--7bd8f-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--7bd8f-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png
index 816d67edd3..6232b2bfb6 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--7bd8f-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--7bd8f-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--884ac-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--884ac-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png
index 2e5a16fb6b..85170818ea 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--884ac-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--884ac-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a79-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a79-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png
index fa0ba961ee..e7be777d4c 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a79-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a79-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a85-ed-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a85-ed-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png
index d1dee02eca..3fd89d889f 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a85-ed-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--94a85-ed-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--96ebb-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--96ebb-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png
index 4ec816345b..d622605514 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--96ebb-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--96ebb-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--9e6aa-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--9e6aa-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png
index 721bdd3dbf..0596afe4a5 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--9e6aa-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--9e6aa-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bbde3-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bbde3-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png
index 1bf7e098c7..848f7099e3 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bbde3-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bbde3-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bed18-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bed18-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png
index ceaa8d806d..e27a90eac0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bed18-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--bed18-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--ceb3a-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--ceb3a-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png
index 3a35699bf9..6edc46c2d0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--ceb3a-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--ceb3a-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d270d-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d270d-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png
index b61c27f2d1..9718d962f5 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d270d-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d270d-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d7184-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d7184-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png
index 1a50c68208..981696a2aa 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d7184-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--d7184-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--fdd57-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--fdd57-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png
index e428a1d046..a0ad922ebc 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--fdd57-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking--fdd57-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png
index 53e1c90b8e..904d1f6f2f 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png
index cc495f391a..297da857b3 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png
index bb6cf585cd..7256721f3c 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png
index bb686439d8..d0db01e17c 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png
index 989f7622b4..dbba980ed0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png
index cab79eb848..952a1424b6 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png
index 0c473535a9..b60a908b6c 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png
index 8f72a6d9ec..4f37a404dd 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png
index 702a2a40ec..570786c3e3 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-1-chromium-linux.png
index c30be37cfd..5e02787722 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-2-chromium-linux.png
index e150ba2eec..3d7a5404ea 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-3-chromium-linux.png
index e65bd4b2a7..ef92fba154 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-copies-last-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png
index ca3ea25730..67fca05925 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png
index bba5e6a9c9..563830f5f8 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png
index ee0e27cdde..4141792b17 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-1-chromium-linux.png
index 0326aa94b4..a9c356b057 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-2-chromium-linux.png
index c3f83333fa..5c47431835 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-3-chromium-linux.png
index 2122c201e4..bb3a9e9ebc 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-12-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-1-chromium-linux.png
index ad0914e52c..d726f8802a 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-2-chromium-linux.png
index 53da4a8c42..4e47c4a312 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-3-chromium-linux.png
index 7785631327..845bedda04 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-3-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-1-chromium-linux.png
index 23eda565bc..800f40a594 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-2-chromium-linux.png
index 80bb73abd5..7e56739733 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-3-chromium-linux.png
index 518d2418ef..a9a06ccad9 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-set-budget-to-6-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-1-chromium-linux.png
index 25e3446206..ba10fda723 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-2-chromium-linux.png
index c0481d76d4..9e3f748997 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-3-chromium-linux.png
index 3738b8aba5..f9d0a3e2d3 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Envelope-updates-the-budgeted-amount-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-1-chromium-linux.png
index 2c6ff6e931..904cbde075 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-2-chromium-linux.png
index e6188ecba8..0518acbac0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-3-chromium-linux.png
index c597ebd2f8..b0837a5792 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-applies-budget-template-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0ba04-nt-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0ba04-nt-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png
index 035e185a2f..892fe3cccc 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0ba04-nt-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0ba04-nt-amount-opens-the-budget-summary-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0dfe7-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0dfe7-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png
index 87ed001db0..daee2e4188 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0dfe7-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--0dfe7-page-header-shows-the-previous-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--1ce6d-nt-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--1ce6d-nt-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png
index 5a748dfd7e..9125dc5afe 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--1ce6d-nt-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--1ce6d-nt-amount-opens-the-budget-summary-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--42062-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--42062-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png
index 8771e50c51..1221d843c6 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--42062-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--42062-in-the-page-header-opens-the-month-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--49fb6-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--49fb6-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png
index 2235b3d157..24e8e0c783 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--49fb6-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--49fb6-in-the-page-header-opens-the-month-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--5f098-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--5f098-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png
index 4aa9b5e57f..c5ee486ddc 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--5f098-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--5f098-roup-name-opens-the-category-group-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--7c353-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--7c353-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png
index ba7824c6b1..6f0a85c091 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--7c353-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--7c353-the-page-header-shows-the-next-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--929be-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--929be-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png
index da48925b5a..74bfcccac6 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--929be-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--929be-roup-name-opens-the-category-group-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a3783-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a3783-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png
index 9a088ae986..f3f99ca3f1 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a3783-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a3783-in-the-page-header-opens-the-budget-page-menu-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a8b5e-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a8b5e-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png
index 66e399f6db..64bd9da52a 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a8b5e-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--a8b5e-in-the-page-header-opens-the-budget-page-menu-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--b1562-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--b1562-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png
index 2a99ccb16f..fa1322fa9d 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--b1562-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--b1562-in-the-page-header-opens-the-month-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--cfb69-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--cfb69-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png
index c87ff653ff..6ddb3b7bcd 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--cfb69-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--cfb69-page-header-shows-the-previous-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--d5af6-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--d5af6-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png
index 5b84f05cb9..ec7a14daa8 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--d5af6-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--d5af6-the-page-header-shows-the-next-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--dc927-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--dc927-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png
index 2aeeadb651..a1c7de920e 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--dc927-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--dc927-roup-name-opens-the-category-group-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f2198-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f2198-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png
index 263650c628..ff22e54330 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f2198-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f2198-the-page-header-shows-the-next-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f224f-nt-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f224f-nt-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png
index 846da763f2..e344ba1d8e 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f224f-nt-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f224f-nt-amount-opens-the-budget-summary-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f7fa3-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f7fa3-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png
index 1bad3b5eff..a6345003cb 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f7fa3-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f7fa3-page-header-shows-the-previous-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f8a19-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f8a19-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png
index ac5fb95ee8..e94020182c 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f8a19-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking--f8a19-in-the-page-header-opens-the-budget-page-menu-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png
index a560df56a1..6d63a8fcef 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png
index b58968edc9..0df9a75893 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png
index 850a1b6897..9dcf2e981f 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-balance-cell-opens-the-balance-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png
index efe57c4164..5b7b1f1459 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png
index 0fedc45eb0..af71ecbe23 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png
index 803bc0b39c..9141a72bd8 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-budgeted-cell-opens-the-budget-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png
index ba95a2c8aa..45866960d4 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png
index 89b5a6cd2c..adf5e5dd87 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png
index 24e31a6583..2ecbd3eaa9 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-checks-that-clicking-the-category-name-opens-the-category-menu-modal-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-1-chromium-linux.png
index a564ad8fc9..d7f0c11b93 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-2-chromium-linux.png
index dd8e84117d..534a71d1c0 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-3-chromium-linux.png
index 19f80c9509..8b2357acdb 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-copies-last-month-s-budget-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png
index 2ceeea94ac..8dcbdc2e77 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png
index 0ed4936a89..3b6e14fefa 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png
index c0c8fc97d1..fcd19beb21 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-loads-the-budget-page-with-budgeted-amounts-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-1-chromium-linux.png
index fc85fbe2e8..255fd13a47 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-2-chromium-linux.png
index 7df1e2d1af..80b4148a9f 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-3-chromium-linux.png
index d2f359c6c4..2e892a80ec 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-12-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-1-chromium-linux.png
index 07ab20b20a..85af0c21e2 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-2-chromium-linux.png
index 862aef7f3b..371170f6aa 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-3-chromium-linux.png
index f16139bd84..5bc872b8a8 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-3-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-1-chromium-linux.png
index 717300fe23..156e2761ca 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-2-chromium-linux.png
index dd65516b31..b7db118f9d 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-3-chromium-linux.png
index 0490929718..8c7ff83281 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-set-budget-to-6-month-average-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-1-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-1-chromium-linux.png
index e57c9dd105..67d571f1d5 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-1-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-1-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-2-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-2-chromium-linux.png
index f46acb319d..ae2d9b53f5 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-2-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-2-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-3-chromium-linux.png b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-3-chromium-linux.png
index e0863d5e6f..582dba7897 100644
Binary files a/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-3-chromium-linux.png and b/packages/desktop-client/e2e/budget.mobile.test.ts-snapshots/Mobile-Budget-Tracking-updates-the-budgeted-amount-3-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-7-chromium-linux.png b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-7-chromium-linux.png
index 864f5b9f38..a2d65c07f7 100644
Binary files a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-7-chromium-linux.png and b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-7-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-8-chromium-linux.png b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-8-chromium-linux.png
index 8777b9e7ca..00a14a06ec 100644
Binary files a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-8-chromium-linux.png and b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-8-chromium-linux.png differ
diff --git a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-9-chromium-linux.png b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-9-chromium-linux.png
index f8f342a257..782f384151 100644
Binary files a/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-9-chromium-linux.png and b/packages/desktop-client/e2e/transactions.mobile.test.ts-snapshots/Mobile-Transactions-creates-a-transaction-via-footer-button-9-chromium-linux.png differ
diff --git a/packages/desktop-client/src/components/budget/util.ts b/packages/desktop-client/src/components/budget/util.ts
index 50447d4f93..deb6d54ed1 100644
--- a/packages/desktop-client/src/components/budget/util.ts
+++ b/packages/desktop-client/src/components/budget/util.ts
@@ -68,8 +68,8 @@ export function makeAmountGrey(value: number | string): CSSProperties {
export function makeBalanceAmountStyle(
value: number,
- goalValue?: number,
- budgetedValue?: number,
+ goalValue?: number | null,
+ budgetedValue?: number | null,
) {
if (value < 0) {
return { color: theme.errorText };
diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx
index c52bf06d8c..dc90725b6d 100644
--- a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx
+++ b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx
@@ -1,10 +1,8 @@
import React, {
- memo,
useCallback,
useContext,
useEffect,
useMemo,
- useRef,
useState,
} from 'react';
import { GridList, GridListItem } from 'react-aria-components';
@@ -14,11 +12,9 @@ import { Button } from '@actual-app/components/button';
import { Card } from '@actual-app/components/card';
import { useResponsive } from '@actual-app/components/hooks/useResponsive';
import { SvgLogo } from '@actual-app/components/icons/logo';
-import { SvgExpandArrow } from '@actual-app/components/icons/v0';
import {
SvgArrowThinLeft,
SvgArrowThinRight,
- SvgArrowThickRight,
SvgCheveronRight,
} from '@actual-app/components/icons/v1';
import {
@@ -31,7 +27,6 @@ import { styles } from '@actual-app/components/styles';
import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { css } from '@emotion/css';
import { AutoTextSize } from 'auto-text-size';
import memoizeOne from 'memoize-one';
@@ -43,10 +38,9 @@ import {
} from 'loot-core/client/queries';
import { useSpreadsheet } from 'loot-core/client/SpreadsheetProvider';
import * as monthUtils from 'loot-core/shared/months';
-import { groupById, integerToCurrency } from 'loot-core/shared/util';
+import { groupById } from 'loot-core/shared/util';
import { useCategories } from '../../../hooks/useCategories';
-import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
import { useLocale } from '../../../hooks/useLocale';
import { useLocalPref } from '../../../hooks/useLocalPref';
import { useNavigate } from '../../../hooks/useNavigate';
@@ -54,8 +48,6 @@ import { usePrevious } from '../../../hooks/usePrevious';
import { useSyncedPref } from '../../../hooks/useSyncedPref';
import { useUndo } from '../../../hooks/useUndo';
import { useDispatch } from '../../../redux';
-import { BalanceWithCarryover } from '../../budget/BalanceWithCarryover';
-import { makeAmountGrey, makeBalanceAmountStyle } from '../../budget/util';
import { MobilePageHeader, Page } from '../../Page';
import { PrivacyFilter } from '../../PrivacyFilter';
import { CellValue } from '../../spreadsheet/CellValue';
@@ -65,9 +57,10 @@ import { useSheetValue } from '../../spreadsheet/useSheetValue';
import { MOBILE_NAV_HEIGHT } from '../MobileNavTabs';
import { PullToRefresh } from '../PullToRefresh';
-import { BudgetCell } from './BudgetCell';
+import { ExpenseGroup } from './ExpenseGroup';
import { IncomeGroup } from './IncomeGroup';
-import { ListItem } from './ListItem';
+
+export const ROW_HEIGHT = 50;
export const PILL_STYLE = {
borderRadius: 16,
@@ -76,23 +69,23 @@ export const PILL_STYLE = {
};
export function getColumnWidth({
- show3Cols = false,
+ show3Columns = false,
isSidebar = false,
offset = 0,
} = {}) {
- // If show3Cols = 35vw | 20vw | 20vw | 20vw,
+ // If show3Columns = 35vw | 20vw | 20vw | 20vw,
// Else = 45vw | 25vw | 25vw,
if (!isSidebar) {
- return show3Cols ? `${20 + offset}vw` : `${25 + offset}vw`;
+ return show3Columns ? `${20 + offset}vw` : `${25 + offset}vw`;
}
- return show3Cols ? `${35 + offset}vw` : `${45 + offset}vw`;
+ return show3Columns ? `${35 + offset}vw` : `${45 + offset}vw`;
}
-function ToBudget({ toBudget, onPress, show3Cols }) {
+function ToBudget({ toBudget, onPress, show3Columns }) {
const { t } = useTranslation();
const amount = useSheetValue(toBudget);
const format = useFormat();
- const sidebarColumnWidth = getColumnWidth({ show3Cols, isSidebar: true });
+ const sidebarColumnWidth = getColumnWidth({ show3Columns, isSidebar: true });
return (
<View
@@ -156,7 +149,7 @@ function ToBudget({ toBudget, onPress, show3Cols }) {
);
}
-function Saved({ projected, onPress, show3Cols }) {
+function Saved({ projected, onPress, show3Columns }) {
const { t } = useTranslation();
const binding = projected
? trackingBudget.totalBudgetedSaved
@@ -165,7 +158,7 @@ function Saved({ projected, onPress, show3Cols }) {
const saved = useSheetValue(binding) || 0;
const format = useFormat();
const isNegative = saved < 0;
- const sidebarColumnWidth = getColumnWidth({ show3Cols, isSidebar: true });
+ const sidebarColumnWidth = getColumnWidth({ show3Columns, isSidebar: true });
return (
<View
@@ -245,840 +238,14 @@ function Saved({ projected, onPress, show3Cols }) {
);
}
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-function ExpenseGroupPreview({ group, pending, style }) {
- return (
- <Card
- style={{
- marginTop: 7,
- marginBottom: 7,
- opacity: pending ? 1 : 0.4,
- }}
- >
- <ExpenseGroupHeader group={group} blank={true} />
-
- {group.categories.map((cat, index) => (
- <ExpenseCategory
- key={cat.id}
- category={cat}
- blank={true}
- index={index}
- />
- ))}
- </Card>
- );
-}
-
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-function ExpenseCategoryPreview({ name, pending, style }) {
- return (
- <ListItem
- style={{
- flex: 1,
- borderColor: 'transparent',
- borderRadius: 4,
- }}
- >
- <Text style={styles.smallText}>{name}</Text>
- </ListItem>
- );
-}
-
-const ExpenseCategory = memo(function ExpenseCategory({
- type,
- category,
- isHidden,
- goal,
- longGoal,
- budgeted,
- spent,
- balance,
- carryover,
- index,
- // gestures,
- blank,
- style,
- month,
- onEdit,
- onBudgetAction,
- show3Cols,
- showBudgetedCol,
-}) {
- const opacity = blank ? 0 : 1;
-
- const { t } = useTranslation();
- const isGoalTemplatesEnabled = useFeatureFlag('goalTemplatesEnabled');
- const goalTemp = useSheetValue(goal);
- const goalValue = isGoalTemplatesEnabled ? goalTemp : null;
-
- const [budgetType = 'rollover'] = useSyncedPref('budgetType');
- const modalBudgetType = budgetType === 'rollover' ? 'envelope' : 'tracking';
- const dispatch = useDispatch();
- const { showUndoNotification } = useUndo();
- const { list: categories } = useCategories();
- const categoriesById = groupById(categories);
-
- const onCarryover = useCallback(
- carryover => {
- onBudgetAction(month, 'carryover', {
- category: category.id,
- flag: carryover,
- });
- dispatch(
- collapseModals({ rootModalName: `${modalBudgetType}-balance-menu` }),
- );
- },
- [modalBudgetType, category.id, dispatch, month, onBudgetAction],
- );
-
- const catBalance = useSheetValue(
- type === 'rollover'
- ? envelopeBudget.catBalance(category.id)
- : trackingBudget.catBalance(category.id),
- );
- const budgetedtmp = useSheetValue(budgeted);
- const balancetmp = useSheetValue(balance);
- const isLongGoal = useSheetValue(longGoal) === 1;
- const budgetedValue = isGoalTemplatesEnabled
- ? isLongGoal
- ? balancetmp
- : budgetedtmp
- : null;
-
- const onTransfer = useCallback(() => {
- dispatch(
- pushModal({
- modal: {
- name: 'transfer',
- options: {
- title: category.name,
- categoryId: category.id,
- month,
- amount: catBalance,
- onSubmit: (amount, toCategoryId) => {
- onBudgetAction(month, 'transfer-category', {
- amount,
- from: category.id,
- to: toCategoryId,
- });
- dispatch(
- collapseModals({
- rootModalName: `${modalBudgetType}-balance-menu`,
- }),
- );
- showUndoNotification({
- message: `Transferred ${integerToCurrency(amount)} from ${category.name} to ${categoriesById[toCategoryId].name}.`,
- });
- },
- showToBeBudgeted: true,
- },
- },
- }),
- );
- }, [
- modalBudgetType,
- catBalance,
- categoriesById,
- category.id,
- category.name,
- dispatch,
- month,
- onBudgetAction,
- showUndoNotification,
- ]);
-
- const onCover = useCallback(() => {
- dispatch(
- pushModal({
- modal: {
- name: 'cover',
- options: {
- title: category.name,
- month,
- categoryId: category.id,
- onSubmit: fromCategoryId => {
- onBudgetAction(month, 'cover-overspending', {
- to: category.id,
- from: fromCategoryId,
- });
- dispatch(
- collapseModals({
- rootModalName: `${modalBudgetType}-balance-menu`,
- }),
- );
- showUndoNotification({
- message: t(
- `Covered {{toCategoryName}} overspending from {{fromCategoryName}}.`,
- {
- toCategoryName: category.name,
- fromCategoryName: categoriesById[fromCategoryId].name,
- },
- ),
- });
- },
- },
- },
- }),
- );
- }, [
- modalBudgetType,
- categoriesById,
- category.id,
- category.name,
- dispatch,
- month,
- onBudgetAction,
- showUndoNotification,
- t,
- ]);
-
- const onOpenBalanceMenu = useCallback(() => {
- dispatch(
- pushModal({
- modal: {
- name: `${modalBudgetType}-balance-menu`,
- options: {
- categoryId: category.id,
- month,
- onCarryover,
- ...(budgetType === 'rollover' && { onTransfer, onCover }),
- },
- },
- }),
- );
- }, [
- modalBudgetType,
- budgetType,
- category.id,
- dispatch,
- month,
- onCarryover,
- onCover,
- onTransfer,
- ]);
-
- const listItemRef = useRef();
- const format = useFormat();
- const navigate = useNavigate();
- const onShowActivity = useCallback(() => {
- navigate(`/categories/${category.id}?month=${month}`);
- }, [category.id, month, navigate]);
-
- const sidebarColumnWidth = getColumnWidth({ show3Cols, isSidebar: true });
- const columnWidth = getColumnWidth({ show3Cols });
-
- const content = (
- <ListItem
- style={{
- backgroundColor: 'transparent',
- borderBottomWidth: 0,
- borderTopWidth: index > 0 ? 1 : 0,
- opacity: isHidden ? 0.5 : undefined,
- ...style,
- }}
- data-testid="category-row"
- innerRef={listItemRef}
- >
- <View
- style={{
- flex: 1,
- justifyContent: 'center',
- alignItems: 'flex-start',
- }}
- >
- <Button
- variant="bare"
- style={{
- maxWidth: sidebarColumnWidth,
- }}
- onPress={() => onEdit?.(category.id)}
- >
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'flex-start',
- }}
- >
- <Text
- style={{
- ...styles.lineClamp(2),
- width: sidebarColumnWidth,
- textAlign: 'left',
- ...styles.smallText,
- }}
- data-testid="category-name"
- >
- {category.name}
- </Text>
- <SvgCheveronRight
- style={{ flexShrink: 0, color: theme.tableTextSubdued }}
- width={14}
- height={14}
- />
- </View>
- </Button>
- </View>
- <View
- style={{
- justifyContent: 'center',
- alignItems: 'center',
- flexDirection: 'row',
- opacity,
- }}
- >
- <View
- style={{
- ...(!show3Cols && !showBudgetedCol && { display: 'none' }),
- width: columnWidth,
- justifyContent: 'center',
- alignItems: 'flex-end',
- }}
- >
- <BudgetCell
- key={`${show3Cols}|${showBudgetedCol}`}
- binding={budgeted}
- type="financial"
- category={category}
- month={month}
- onBudgetAction={onBudgetAction}
- />
- </View>
- <View
- style={{
- ...(!show3Cols && showBudgetedCol && { display: 'none' }),
- width: columnWidth,
- justifyContent: 'center',
- alignItems: 'flex-end',
- }}
- >
- <CellValue
- binding={spent}
- type="financial"
- aria-label={t('Spent amount for {{categoryName}} category', {
- categoryName: category.name,
- })} // Translated aria-label
- >
- {({ type, value }) => (
- <Button
- variant="bare"
- style={{
- ...PILL_STYLE,
- }}
- onPress={onShowActivity}
- aria-label={t(
- 'Show transactions for {{categoryName}} category',
- { categoryName: category.name },
- )} // Translated aria-label
- >
- <PrivacyFilter>
- <AutoTextSize
- key={`${value}|${show3Cols}|${showBudgetedCol}`}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={{
- ...makeAmountGrey(value),
- maxWidth: columnWidth,
- textAlign: 'right',
- fontSize: 12,
- }}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </Button>
- )}
- </CellValue>
- </View>
- <View
- style={{
- width: columnWidth,
- justifyContent: 'center',
- alignItems: 'flex-end',
- }}
- >
- <BalanceWithCarryover
- aria-label={t('Balance for {{categoryName}} category', {
- categoryName: category.name,
- })} // Translated aria-label
- type="financial"
- carryover={carryover}
- balance={balance}
- goal={goal}
- budgeted={budgeted}
- longGoal={longGoal}
- CarryoverIndicator={({ style }) => (
- <View
- style={{
- position: 'absolute',
- right: '-3px',
- top: '-5px',
- borderRadius: '50%',
- backgroundColor: style?.color ?? theme.pillText,
- }}
- >
- <SvgArrowThickRight
- width={11}
- height={11}
- style={{ color: theme.pillBackgroundLight }}
- />
- </View>
- )}
- >
- {({ type, value }) => (
- <Button
- variant="bare"
- style={{
- ...PILL_STYLE,
- maxWidth: columnWidth,
- }}
- onPress={onOpenBalanceMenu}
- aria-label={t(
- 'Open balance menu for {{categoryName}} category',
- { categoryName: category.name },
- )} // Translated aria-label
- >
- <PrivacyFilter>
- <AutoTextSize
- key={value}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={{
- maxWidth: columnWidth,
- ...makeBalanceAmountStyle(
- value,
- goalValue,
- budgetedValue,
- ),
- textAlign: 'right',
- fontSize: 12,
- }}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </Button>
- )}
- </BalanceWithCarryover>
- </View>
- </View>
- </ListItem>
- );
-
- return <View>{content}</View>;
-
- // <Draggable
- // id={category.id}
- // type="category"
- // preview={({ pending, style }) => (
- // <BudgetCategoryPreview
- // name={category.name}
- // pending={pending}
- // style={style}
- // />
- // )}
- // gestures={gestures}
- // >
- // <Droppable
- // type="category"
- // getActiveStatus={(x, y, { layout }, { id }) => {
- // let pos = (y - layout.y) / layout.height;
- // return pos < 0.5 ? 'top' : 'bottom';
- // }}
- // onDrop={(id, type, droppable, status) =>
- // props.onReorder(id.replace('category:', ''), {
- // aroundCategory: {
- // id: category.id,
- // position: status
- // }
- // })
- // }
- // >
- // {() => content}
- // </Droppable>
- // </Draggable>
-});
-
-const ExpenseGroupHeader = memo(function ExpenseGroupHeader({
- group,
- budgeted,
- spent,
- balance,
- editMode,
- onEdit,
- blank,
- show3Cols,
- showBudgetedCol,
- collapsed,
- onToggleCollapse,
- style,
-}) {
- const opacity = blank ? 0 : 1;
- const listItemRef = useRef();
- const format = useFormat();
- const sidebarColumnWidth = getColumnWidth({
- show3Cols,
- isSidebar: true,
- offset: -3.5,
- });
- const columnWidth = getColumnWidth({ show3Cols });
-
- const amountStyle = {
- width: columnWidth,
- fontSize: 12,
- fontWeight: '500',
- paddingLeft: 5,
- textAlign: 'right',
- };
-
- const content = (
- <ListItem
- style={{
- flexDirection: 'row',
- justifyContent: 'space-between',
- alignItems: 'center',
- opacity: !!group.hidden ? 0.5 : undefined,
- paddingLeft: 0,
- ...style,
- }}
- data-testid="category-group-row"
- innerRef={listItemRef}
- >
- <View
- style={{
- flex: 1,
- flexDirection: 'row',
- justifyContent: 'flex-start',
- width: sidebarColumnWidth,
- }}
- >
- <Button
- variant="bare"
- className={css({
- flexShrink: 0,
- color: theme.pageTextSubdued,
- '&[data-pressed]': {
- backgroundColor: 'transparent',
- },
- })}
- onPress={() => onToggleCollapse?.(group.id)}
- >
- <SvgExpandArrow
- width={8}
- height={8}
- style={{
- flexShrink: 0,
- transition: 'transform .1s',
- transform: collapsed ? 'rotate(-90deg)' : '',
- }}
- />
- </Button>
- <Button
- variant="bare"
- style={{
- maxWidth: sidebarColumnWidth,
- }}
- onPress={() => onEdit?.(group.id)}
- >
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'flex-start',
- }}
- >
- <Text
- style={{
- ...styles.lineClamp(2),
- width: sidebarColumnWidth,
- textAlign: 'left',
- ...styles.smallText,
- fontWeight: '500',
- }}
- data-testid="category-group-name"
- >
- {group.name}
- </Text>
- <SvgCheveronRight
- style={{ flexShrink: 0, color: theme.tableTextSubdued }}
- width={14}
- height={14}
- />
- </View>
- </Button>
- </View>
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'flex-end',
- alignItems: 'center',
- opacity,
- paddingRight: 5,
- }}
- >
- <View
- style={{ ...(!show3Cols && !showBudgetedCol && { display: 'none' }) }}
- >
- <CellValue binding={budgeted} type="financial">
- {({ type, value }) => (
- <View>
- <PrivacyFilter>
- <AutoTextSize
- key={value}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={amountStyle}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </View>
- )}
- </CellValue>
- </View>
- <View
- style={{ ...(!show3Cols && showBudgetedCol && { display: 'none' }) }}
- >
- <CellValue binding={spent} type="financial">
- {({ type, value }) => (
- <View>
- <PrivacyFilter>
- <AutoTextSize
- key={value}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={amountStyle}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </View>
- )}
- </CellValue>
- </View>
- <CellValue binding={balance} type="financial">
- {({ type, value }) => (
- <View>
- <PrivacyFilter>
- <AutoTextSize
- key={value}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={amountStyle}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </View>
- )}
- </CellValue>
- </View>
-
- {/* {editMode && (
- <View>
- <Button
- onPointerUp={() => onAddCategory(group.id, group.is_income)}
- style={{ padding: 10 }}
- >
- <Add width={15} height={15} />
- </Button>
- </View>
- )} */}
- </ListItem>
- );
-
- if (!editMode) {
- return content;
- }
-
- return content;
- // <Droppable
- // type="category"
- // getActiveStatus={(x, y, { layout }, { id }) => {
- // return 'bottom';
- // }}
- // onDrop={(id, type, droppable, status) =>
- // props.onReorderCategory(id, { inGroup: group.id })
- // }
- // >
- // {() => content}
- // </Droppable>
-});
-
-const ExpenseGroup = memo(function ExpenseGroup({
- type,
- group,
- editMode,
- onEditGroup,
- onEditCategory,
- // gestures,
- month,
- // onReorderCategory,
- // onReorderGroup,
- onAddCategory,
- onBudgetAction,
- showBudgetedCol,
- show3Cols,
- showHiddenCategories,
- collapsed,
- onToggleCollapse,
-}) {
- function editable(content) {
- if (!editMode) {
- return content;
- }
-
- return content;
- // <Draggable
- // id={group.id}
- // type="group"
- // preview={({ pending, style }) => (
- // <BudgetGroupPreview group={group} pending={pending} style={style} />
- // )}
- // gestures={gestures}
- // >
- // <Droppable
- // type="group"
- // getActiveStatus={(x, y, { layout }, { id }) => {
- // let pos = (y - layout.y) / layout.height;
- // return pos < 0.5 ? 'top' : 'bottom';
- // }}
- // onDrop={(id, type, droppable, status) => {
- // onReorderGroup(id, group.id, status);
- // }}
- // >
- // {() => content}
- // </Droppable>
- // </Draggable>
- }
-
- return editable(
- <Card
- style={{
- marginTop: 4,
- marginBottom: 4,
- }}
- >
- <ExpenseGroupHeader
- group={group}
- showBudgetedCol={showBudgetedCol}
- budgeted={
- type === 'report'
- ? trackingBudget.groupBudgeted(group.id)
- : envelopeBudget.groupBudgeted(group.id)
- }
- spent={
- type === 'report'
- ? trackingBudget.groupSumAmount(group.id)
- : envelopeBudget.groupSumAmount(group.id)
- }
- balance={
- type === 'report'
- ? trackingBudget.groupBalance(group.id)
- : envelopeBudget.groupBalance(group.id)
- }
- show3Cols={show3Cols}
- editMode={editMode}
- onAddCategory={onAddCategory}
- onEdit={onEditGroup}
- collapsed={collapsed}
- onToggleCollapse={onToggleCollapse}
- // onReorderCategory={onReorderCategory}
- style={{
- backgroundColor: monthUtils.isCurrentMonth(month)
- ? theme.budgetHeaderCurrentMonth
- : theme.budgetHeaderOtherMonth,
- }}
- />
-
- {group.categories
- .filter(
- category => !collapsed && (!category.hidden || showHiddenCategories),
- )
- .map((category, index) => {
- return (
- <ExpenseCategory
- key={category.id}
- index={index}
- show3Cols={show3Cols}
- type={type}
- category={category}
- isHidden={!!category.hidden || group.hidden}
- goal={
- type === 'report'
- ? trackingBudget.catGoal(category.id)
- : envelopeBudget.catGoal(category.id)
- }
- longGoal={
- type === 'report'
- ? trackingBudget.catLongGoal(category.id)
- : envelopeBudget.catLongGoal(category.id)
- }
- budgeted={
- type === 'report'
- ? trackingBudget.catBudgeted(category.id)
- : envelopeBudget.catBudgeted(category.id)
- }
- spent={
- type === 'report'
- ? trackingBudget.catSumAmount(category.id)
- : envelopeBudget.catSumAmount(category.id)
- }
- balance={
- type === 'report'
- ? trackingBudget.catBalance(category.id)
- : envelopeBudget.catBalance(category.id)
- }
- carryover={
- type === 'report'
- ? trackingBudget.catCarryover(category.id)
- : envelopeBudget.catCarryover(category.id)
- }
- style={{
- backgroundColor: monthUtils.isCurrentMonth(month)
- ? theme.budgetCurrentMonth
- : theme.budgetOtherMonth,
- }}
- showBudgetedCol={showBudgetedCol}
- editMode={editMode}
- onEdit={onEditCategory}
- // gestures={gestures}
- month={month}
- // onReorder={onReorderCategory}
- onBudgetAction={onBudgetAction}
- />
- );
- })}
- </Card>,
- );
-});
-
function BudgetGroups({
- type,
categoryGroups,
onEditGroup,
onEditCategory,
- editMode,
- gestures,
month,
- onSaveCategory,
- onDeleteCategory,
- onAddCategory,
- onReorderCategory,
- onReorderGroup,
onBudgetAction,
- showBudgetedCol,
- show3Cols,
+ showBudgetedColumn,
+ show3Columns,
showHiddenCategories,
}) {
const separateGroups = memoizeOne(groups => {
@@ -1092,13 +259,23 @@ function BudgetGroups({
const [collapsedGroupIds = [], setCollapsedGroupIdsPref] =
useLocalPref('budget.collapsed');
- const onToggleCollapse = id => {
- setCollapsedGroupIdsPref(
- collapsedGroupIds.includes(id)
- ? collapsedGroupIds.filter(collapsedId => collapsedId !== id)
- : [...collapsedGroupIds, id],
- );
- };
+ const onToggleCollapse = useCallback(
+ id => {
+ setCollapsedGroupIdsPref(
+ collapsedGroupIds.includes(id)
+ ? collapsedGroupIds.filter(collapsedId => collapsedId !== id)
+ : [...collapsedGroupIds, id],
+ );
+ },
+ [collapsedGroupIds, setCollapsedGroupIdsPref],
+ );
+
+ const isCollapsed = useCallback(
+ id => {
+ return collapsedGroupIds.includes(id);
+ },
+ [collapsedGroupIds],
+ );
return (
<View
@@ -1110,24 +287,17 @@ function BudgetGroups({
.map(group => {
return (
<ExpenseGroup
- key={group.id}
- type={type}
+ // Re-render when columns are toggled.
+ key={`${group.id}|${show3Columns}|${showBudgetedColumn}`}
group={group}
- showBudgetedCol={showBudgetedCol}
- gestures={gestures}
+ showBudgetedColumn={showBudgetedColumn}
month={month}
- editMode={editMode}
onEditGroup={onEditGroup}
onEditCategory={onEditCategory}
- onSaveCategory={onSaveCategory}
- onDeleteCategory={onDeleteCategory}
- onAddCategory={onAddCategory}
- onReorderCategory={onReorderCategory}
- onReorderGroup={onReorderGroup}
onBudgetAction={onBudgetAction}
- show3Cols={show3Cols}
+ show3Columns={show3Columns}
showHiddenCategories={showHiddenCategories}
- collapsed={collapsedGroupIds.includes(group.id)}
+ isCollapsed={isCollapsed}
onToggleCollapse={onToggleCollapse}
/>
);
@@ -1141,7 +311,7 @@ function BudgetGroups({
onEditGroup={onEditGroup}
onEditCategory={onEditCategory}
onBudgetAction={onBudgetAction}
- isCollapsed={collapsedGroupIds.includes(incomeGroup.id)}
+ isCollapsed={isCollapsed}
onToggleCollapse={onToggleCollapse}
/>
)}
@@ -1150,21 +320,12 @@ function BudgetGroups({
}
export function BudgetTable({
- type,
categoryGroups,
month,
monthBounds,
- // editMode,
onPrevMonth,
onNextMonth,
onCurrentMonth,
- onSaveGroup,
- onDeleteGroup,
- onAddCategory,
- onSaveCategory,
- onDeleteCategory,
- onReorderCategory,
- onReorderGroup,
onShowBudgetSummary,
onBudgetAction,
onRefresh,
@@ -1175,7 +336,7 @@ export function BudgetTable({
}) {
const { t } = useTranslation();
const { width } = useResponsive();
- const show3Cols = width >= 360;
+ const show3Columns = width >= 360;
// let editMode = false; // neuter editMode -- sorry, not rewriting drag-n-drop right now
@@ -1191,6 +352,8 @@ export function BudgetTable({
'budget.showHiddenCategories',
);
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
+
return (
<Page
padding={0}
@@ -1241,9 +404,8 @@ export function BudgetTable({
>
<Banners month={month} onBudgetAction={onBudgetAction} />
<BudgetTableHeader
- type={type}
month={month}
- show3Cols={show3Cols}
+ show3Columns={show3Columns}
showSpentColumn={showSpentColumn}
toggleSpentColumn={toggleSpentColumn}
onShowBudgetSummary={onShowBudgetSummary}
@@ -1257,23 +419,14 @@ export function BudgetTable({
}}
>
<BudgetGroups
- type={type}
+ type={budgetType}
categoryGroups={categoryGroups}
- showBudgetedCol={!showSpentColumn}
- show3Cols={show3Cols}
+ showBudgetedColumn={!showSpentColumn}
+ show3Columns={show3Columns}
showHiddenCategories={showHiddenCategories}
month={month}
- // gestures={gestures}
- // editMode={editMode}
onEditGroup={onEditGroup}
onEditCategory={onEditCategory}
- onSaveCategory={onSaveCategory}
- onDeleteCategory={onDeleteCategory}
- onAddCategory={onAddCategory}
- onSaveGroup={onSaveGroup}
- onDeleteGroup={onDeleteGroup}
- onReorderCategory={onReorderCategory}
- onReorderGroup={onReorderGroup}
onBudgetAction={onBudgetAction}
/>
</View>
@@ -1665,8 +818,7 @@ function Banners({ month, onBudgetAction }) {
}
function BudgetTableHeader({
- show3Cols,
- type,
+ show3Columns,
month,
onShowBudgetSummary,
showSpentColumn,
@@ -1674,13 +826,14 @@ function BudgetTableHeader({
}) {
const { t } = useTranslation();
const format = useFormat();
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
const buttonStyle = {
padding: 0,
backgroundColor: 'transparent',
borderRadius: 'unset',
};
- const sidebarColumnWidth = getColumnWidth({ show3Cols, isSidebar: true });
- const columnWidth = getColumnWidth({ show3Cols });
+ const sidebarColumnWidth = getColumnWidth({ show3Columns, isSidebar: true });
+ const columnWidth = getColumnWidth({ show3Columns });
const amountStyle = {
color: theme.formInputText,
@@ -1714,17 +867,17 @@ function BudgetTableHeader({
alignItems: 'center',
}}
>
- {type === 'report' ? (
+ {budgetType === 'report' ? (
<Saved
projected={month >= monthUtils.currentMonth()}
onPress={onShowBudgetSummary}
- show3Cols={show3Cols}
+ show3Columns={show3Columns}
/>
) : (
<ToBudget
toBudget={envelopeBudget.toBudget}
onPress={onShowBudgetSummary}
- show3Cols={show3Cols}
+ show3Columns={show3Columns}
/>
)}
</View>
@@ -1735,10 +888,10 @@ function BudgetTableHeader({
alignItems: 'center',
}}
>
- {(show3Cols || !showSpentColumn) && (
+ {(show3Columns || !showSpentColumn) && (
<CellValue
binding={
- type === 'report'
+ budgetType === 'report'
? trackingBudget.totalBudgetedExpense
: envelopeBudget.totalBudgeted
}
@@ -1747,7 +900,7 @@ function BudgetTableHeader({
{({ type: formatType, value }) => (
<Button
variant="bare"
- isDisabled={show3Cols}
+ isDisabled={show3Columns}
onPress={toggleSpentColumn}
style={{
...buttonStyle,
@@ -1756,7 +909,7 @@ function BudgetTableHeader({
>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
- {!show3Cols && (
+ {!show3Columns && (
<SvgViewShow
width={12}
height={12}
@@ -1785,7 +938,10 @@ function BudgetTableHeader({
paddingRight: 4,
}}
>
- {format(type === 'report' ? value : -value, formatType)}
+ {format(
+ budgetType === 'report' ? value : -value,
+ formatType,
+ )}
</AutoTextSize>
</PrivacyFilter>
</View>
@@ -1794,10 +950,10 @@ function BudgetTableHeader({
)}
</CellValue>
)}
- {(show3Cols || showSpentColumn) && (
+ {(show3Columns || showSpentColumn) && (
<CellValue
binding={
- type === 'report'
+ budgetType === 'report'
? trackingBudget.totalSpent
: envelopeBudget.totalSpent
}
@@ -1806,7 +962,7 @@ function BudgetTableHeader({
{({ type, value }) => (
<Button
variant="bare"
- isDisabled={show3Cols}
+ isDisabled={show3Columns}
onPress={toggleSpentColumn}
style={{
...buttonStyle,
@@ -1815,7 +971,7 @@ function BudgetTableHeader({
>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
- {!show3Cols && (
+ {!show3Columns && (
<SvgViewShow
width={12}
height={12}
@@ -1855,7 +1011,7 @@ function BudgetTableHeader({
)}
<CellValue
binding={
- type === 'report'
+ budgetType === 'report'
? trackingBudget.totalLeftover
: envelopeBudget.totalBalance
}
diff --git a/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryList.tsx b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryList.tsx
new file mode 100644
index 0000000000..1a3e1cf11e
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryList.tsx
@@ -0,0 +1,144 @@
+import { type DragItem } from 'react-aria';
+import { DropIndicator, GridList, useDragAndDrop } from 'react-aria-components';
+import { useTranslation } from 'react-i18next';
+
+import { theme } from '@actual-app/components/theme';
+import { css } from '@emotion/css';
+
+import { moveCategory } from 'loot-core/client/queries/queriesSlice';
+import { type CategoryEntity } from 'loot-core/types/models';
+
+import { useDispatch } from '../../../redux';
+
+import { ExpenseCategoryListItem } from './ExpenseCategoryListItem';
+
+type ExpenseCategoryListProps = {
+ categories: CategoryEntity[];
+ shouldHideCategory: (category: CategoryEntity) => boolean;
+ month: string;
+ onEditCategory: (id: string) => void;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+ show3Columns: boolean;
+ showBudgetedColumn: boolean;
+};
+
+export function ExpenseCategoryList({
+ categories,
+ month,
+ onEditCategory,
+ onBudgetAction,
+ show3Columns,
+ showBudgetedColumn,
+ shouldHideCategory,
+}: ExpenseCategoryListProps) {
+ const { t } = useTranslation();
+ const dispatch = useDispatch();
+
+ const { dragAndDropHooks } = useDragAndDrop({
+ getItems: keys =>
+ [...keys].map(
+ key =>
+ ({
+ 'text/plain': key as CategoryEntity['id'],
+ }) as DragItem,
+ ),
+ renderDropIndicator: target => {
+ return (
+ <DropIndicator
+ target={target}
+ className={css({
+ '&[data-drop-target]': {
+ height: 4,
+ backgroundColor: theme.tableBorderSeparator,
+ opacity: 1,
+ borderRadius: 4,
+ },
+ })}
+ />
+ );
+ },
+ onReorder: e => {
+ const [key] = e.keys;
+ const categoryIdToMove = key as CategoryEntity['id'];
+ const categoryToMove = categories.find(c => c.id === categoryIdToMove);
+
+ if (!categoryToMove) {
+ throw new Error(
+ `Internal error: category with ID ${categoryIdToMove} not found.`,
+ );
+ }
+
+ if (!categoryToMove.group) {
+ throw new Error(
+ `Internal error: category ${categoryIdToMove} is not in a group and cannot be moved.`,
+ );
+ }
+
+ const targetCategoryId = e.target.key as CategoryEntity['id'];
+
+ if (e.target.dropPosition === 'before') {
+ dispatch(
+ moveCategory({
+ id: categoryToMove.id,
+ groupId: categoryToMove.group,
+ targetId: targetCategoryId,
+ }),
+ );
+ } else if (e.target.dropPosition === 'after') {
+ const targetCategoryIndex = categories.findIndex(
+ c => c.id === targetCategoryId,
+ );
+
+ if (targetCategoryIndex === -1) {
+ throw new Error(
+ `Internal error: category with ID ${targetCategoryId} not found.`,
+ );
+ }
+
+ const nextToTargetCategory = categories[targetCategoryIndex + 1];
+
+ dispatch(
+ moveCategory({
+ id: categoryToMove.id,
+ groupId: categoryToMove.group,
+ // Due to the way `moveCategory` works, we use the category next to the
+ // actual target category here because `moveCategory` always shoves the
+ // category *before* the target category.
+ // On the other hand, using `null` as `targetId` moves the category
+ // to the end of the list.
+ targetId: nextToTargetCategory?.id || null,
+ }),
+ );
+ }
+ },
+ });
+
+ return (
+ <GridList
+ aria-label={t('Expense categories')}
+ items={categories}
+ dragAndDropHooks={dragAndDropHooks}
+ dependencies={[
+ month,
+ onEditCategory,
+ onBudgetAction,
+ shouldHideCategory,
+ show3Columns,
+ showBudgetedColumn,
+ ]}
+ >
+ {category => (
+ <ExpenseCategoryListItem
+ key={category.id}
+ value={category}
+ month={month}
+ onEdit={onEditCategory}
+ onBudgetAction={onBudgetAction}
+ isHidden={shouldHideCategory(category)}
+ show3Columns={show3Columns}
+ showBudgetedColumn={showBudgetedColumn}
+ />
+ )}
+ </GridList>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx
new file mode 100644
index 0000000000..6a04b6d4a9
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx
@@ -0,0 +1,565 @@
+import { type ComponentPropsWithoutRef, useCallback } from 'react';
+import { GridListItem } from 'react-aria-components';
+import { useTranslation } from 'react-i18next';
+
+import { Button } from '@actual-app/components/button';
+import {
+ SvgArrowThickRight,
+ SvgCheveronRight,
+} from '@actual-app/components/icons/v1';
+import { styles, type CSSProperties } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+import { AutoTextSize } from 'auto-text-size';
+
+import { collapseModals, pushModal } from 'loot-core/client/modals/modalsSlice';
+import { envelopeBudget, trackingBudget } from 'loot-core/client/queries';
+import * as monthUtils from 'loot-core/shared/months';
+import { groupById, integerToCurrency } from 'loot-core/shared/util';
+import { type CategoryEntity } from 'loot-core/types/models';
+
+import { useCategories } from '../../../hooks/useCategories';
+import { useFeatureFlag } from '../../../hooks/useFeatureFlag';
+import { useNavigate } from '../../../hooks/useNavigate';
+import { useSyncedPref } from '../../../hooks/useSyncedPref';
+import { useUndo } from '../../../hooks/useUndo';
+import { useDispatch } from '../../../redux';
+import { BalanceWithCarryover } from '../../budget/BalanceWithCarryover';
+import { makeAmountGrey, makeBalanceAmountStyle } from '../../budget/util';
+import { PrivacyFilter } from '../../PrivacyFilter';
+import { CellValue } from '../../spreadsheet/CellValue';
+import { useFormat } from '../../spreadsheet/useFormat';
+import { useSheetValue } from '../../spreadsheet/useSheetValue';
+
+import { BudgetCell } from './BudgetCell';
+import { getColumnWidth, PILL_STYLE, ROW_HEIGHT } from './BudgetTable';
+
+type ExpenseCategoryNameProps = {
+ category: CategoryEntity;
+ onEdit: (id: CategoryEntity['id']) => void;
+ show3Columns: boolean;
+};
+
+function ExpenseCategoryName({
+ category,
+ onEdit,
+ show3Columns,
+}: ExpenseCategoryNameProps) {
+ const sidebarColumnWidth = getColumnWidth({
+ show3Columns,
+ isSidebar: true,
+ });
+ return (
+ <View
+ style={{
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'flex-start',
+ }}
+ >
+ {/* Hidden drag button */}
+ <Button
+ slot="drag"
+ style={{
+ opacity: 0,
+ width: 1,
+ height: 1,
+ position: 'absolute',
+ overflow: 'hidden',
+ }}
+ />
+ <Button
+ variant="bare"
+ style={{
+ maxWidth: sidebarColumnWidth,
+ }}
+ onPress={() => onEdit?.(category.id)}
+ >
+ <View
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'flex-start',
+ }}
+ >
+ <Text
+ style={{
+ ...styles.lineClamp(2),
+ width: sidebarColumnWidth,
+ textAlign: 'left',
+ ...styles.smallText,
+ }}
+ data-testid="category-name"
+ >
+ {category.name}
+ </Text>
+ <SvgCheveronRight
+ style={{ flexShrink: 0, color: theme.tableTextSubdued }}
+ width={14}
+ height={14}
+ />
+ </View>
+ </Button>
+ </View>
+ );
+}
+
+type ExpenseCategoryCellsProps = {
+ category: CategoryEntity;
+ month: string;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+ show3Columns: boolean;
+ showBudgetedColumn: boolean;
+ onOpenBalanceMenu: () => void;
+ onShowActivity: () => void;
+};
+
+function ExpenseCategoryCells({
+ category,
+ month,
+ onBudgetAction,
+ show3Columns,
+ showBudgetedColumn,
+ onOpenBalanceMenu,
+ onShowActivity,
+}: ExpenseCategoryCellsProps) {
+ const { t } = useTranslation();
+ const format = useFormat();
+ const columnWidth = getColumnWidth({
+ show3Columns,
+ isSidebar: false,
+ });
+ const isGoalTemplatesEnabled = useFeatureFlag('goalTemplatesEnabled');
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
+
+ const goal =
+ budgetType === 'report'
+ ? trackingBudget.catGoal(category.id)
+ : envelopeBudget.catGoal(category.id);
+
+ const longGoal =
+ budgetType === 'report'
+ ? trackingBudget.catLongGoal(category.id)
+ : envelopeBudget.catLongGoal(category.id);
+
+ const budgeted =
+ budgetType === 'report'
+ ? trackingBudget.catBudgeted(category.id)
+ : envelopeBudget.catBudgeted(category.id);
+
+ const spent =
+ budgetType === 'report'
+ ? trackingBudget.catSumAmount(category.id)
+ : envelopeBudget.catSumAmount(category.id);
+
+ const balance =
+ budgetType === 'report'
+ ? trackingBudget.catBalance(category.id)
+ : envelopeBudget.catBalance(category.id);
+
+ const carryover =
+ budgetType === 'report'
+ ? trackingBudget.catCarryover(category.id)
+ : envelopeBudget.catCarryover(category.id);
+
+ const goalTemp = useSheetValue<'envelope-budget' | 'tracking-budget', 'goal'>(
+ goal,
+ );
+ const goalValue = isGoalTemplatesEnabled ? goalTemp : null;
+
+ const budgetedtmp = useSheetValue<
+ 'envelope-budget' | 'tracking-budget',
+ 'budget'
+ >(budgeted);
+ const balancetmp = useSheetValue<
+ 'envelope-budget' | 'tracking-budget',
+ 'leftover'
+ >(balance);
+ const isLongGoal =
+ useSheetValue<'envelope-budget' | 'tracking-budget', 'long-goal'>(
+ longGoal,
+ ) === 1;
+ const budgetedValue = isGoalTemplatesEnabled
+ ? isLongGoal
+ ? balancetmp
+ : budgetedtmp
+ : null;
+
+ return (
+ <View
+ style={{
+ justifyContent: 'flex-end',
+ alignItems: 'center',
+ flexDirection: 'row',
+ }}
+ >
+ <View
+ style={{
+ ...(!show3Columns && !showBudgetedColumn && { display: 'none' }),
+ width: columnWidth,
+ justifyContent: 'center',
+ alignItems: 'flex-end',
+ }}
+ >
+ <BudgetCell
+ binding={budgeted}
+ type="financial"
+ category={category}
+ month={month}
+ onBudgetAction={onBudgetAction}
+ />
+ </View>
+ <View
+ style={{
+ ...(!show3Columns && showBudgetedColumn && { display: 'none' }),
+ width: columnWidth,
+ justifyContent: 'center',
+ alignItems: 'flex-end',
+ }}
+ >
+ <CellValue<'envelope-budget' | 'tracking-budget', 'sum-amount'>
+ binding={spent}
+ type="financial"
+ aria-label={t('Spent amount for {{categoryName}} category', {
+ categoryName: category.name,
+ })} // Translated aria-label
+ >
+ {({ type, value }) => (
+ <Button
+ variant="bare"
+ style={{
+ ...PILL_STYLE,
+ }}
+ onPress={onShowActivity}
+ aria-label={t('Show transactions for {{categoryName}} category', {
+ categoryName: category.name,
+ })} // Translated aria-label
+ >
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={{
+ ...makeAmountGrey(value),
+ maxWidth: columnWidth,
+ textAlign: 'right',
+ fontSize: 12,
+ }}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </Button>
+ )}
+ </CellValue>
+ </View>
+ <View
+ style={{
+ width: columnWidth,
+ justifyContent: 'center',
+ alignItems: 'flex-end',
+ }}
+ >
+ <BalanceWithCarryover
+ aria-label={t('Balance for {{categoryName}} category', {
+ categoryName: category.name,
+ })} // Translated aria-label
+ type="financial"
+ carryover={carryover}
+ balance={balance}
+ goal={goal}
+ budgeted={budgeted}
+ longGoal={longGoal}
+ CarryoverIndicator={({ style }) => (
+ <View
+ style={{
+ position: 'absolute',
+ right: '-3px',
+ top: '-5px',
+ borderRadius: '50%',
+ backgroundColor: style?.color ?? theme.pillText,
+ }}
+ >
+ <SvgArrowThickRight
+ width={11}
+ height={11}
+ style={{ color: theme.pillBackgroundLight }}
+ />
+ </View>
+ )}
+ >
+ {({ type, value }) => (
+ <Button
+ variant="bare"
+ style={{
+ ...PILL_STYLE,
+ maxWidth: columnWidth,
+ }}
+ onPress={onOpenBalanceMenu}
+ aria-label={t('Open balance menu for {{categoryName}} category', {
+ categoryName: category.name,
+ })} // Translated aria-label
+ >
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={{
+ maxWidth: columnWidth,
+ ...makeBalanceAmountStyle(value, goalValue, budgetedValue),
+ textAlign: 'right',
+ fontSize: 12,
+ }}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </Button>
+ )}
+ </BalanceWithCarryover>
+ </View>
+ </View>
+ );
+}
+
+type ExpenseCategoryListItemProps = ComponentPropsWithoutRef<
+ typeof GridListItem<CategoryEntity>
+> & {
+ month: string;
+ isHidden: boolean;
+ style?: CSSProperties;
+ show3Columns: boolean;
+ showBudgetedColumn: boolean;
+ onEdit: (id: CategoryEntity['id']) => void;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+};
+
+export function ExpenseCategoryListItem({
+ month,
+ isHidden,
+ onEdit,
+ onBudgetAction,
+ show3Columns,
+ showBudgetedColumn,
+ ...props
+}: ExpenseCategoryListItemProps) {
+ const { value: category } = props;
+
+ const { t } = useTranslation();
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
+
+ const modalBudgetType = budgetType === 'rollover' ? 'envelope' : 'tracking';
+ const balanceMenuModalName = `${modalBudgetType}-balance-menu` as const;
+ const dispatch = useDispatch();
+ const { showUndoNotification } = useUndo();
+ const { list: categories } = useCategories();
+ const categoriesById = groupById(categories);
+
+ const onCarryover = useCallback(
+ (carryover: boolean) => {
+ if (!category) {
+ return;
+ }
+ onBudgetAction(month, 'carryover', {
+ category: category.id,
+ flag: carryover,
+ });
+ dispatch(collapseModals({ rootModalName: balanceMenuModalName }));
+ },
+ [category, onBudgetAction, month, dispatch, balanceMenuModalName],
+ );
+
+ const catBalance = useSheetValue<
+ 'envelope-budget' | 'tracking-budget',
+ 'leftover'
+ >(
+ budgetType === 'rollover'
+ ? envelopeBudget.catBalance(category?.id)
+ : trackingBudget.catBalance(category?.id),
+ );
+
+ const onTransfer = useCallback(() => {
+ if (!category) {
+ return;
+ }
+ dispatch(
+ pushModal({
+ modal: {
+ name: 'transfer',
+ options: {
+ title: category.name,
+ categoryId: category.id,
+ month,
+ amount: catBalance || 0,
+ onSubmit: (amount, toCategoryId) => {
+ onBudgetAction(month, 'transfer-category', {
+ amount,
+ from: category.id,
+ to: toCategoryId,
+ });
+ dispatch(collapseModals({ rootModalName: balanceMenuModalName }));
+ showUndoNotification({
+ message: `Transferred ${integerToCurrency(amount)} from ${category.name} to ${categoriesById[toCategoryId].name}.`,
+ });
+ },
+ showToBeBudgeted: true,
+ },
+ },
+ }),
+ );
+ }, [
+ category,
+ dispatch,
+ month,
+ catBalance,
+ onBudgetAction,
+ balanceMenuModalName,
+ showUndoNotification,
+ categoriesById,
+ ]);
+
+ const onCover = useCallback(() => {
+ if (!category) {
+ return;
+ }
+ dispatch(
+ pushModal({
+ modal: {
+ name: 'cover',
+ options: {
+ title: category.name,
+ month,
+ categoryId: category.id,
+ onSubmit: fromCategoryId => {
+ onBudgetAction(month, 'cover-overspending', {
+ to: category.id,
+ from: fromCategoryId,
+ });
+ dispatch(collapseModals({ rootModalName: balanceMenuModalName }));
+ showUndoNotification({
+ message: t(
+ `Covered {{toCategoryName}} overspending from {{fromCategoryName}}.`,
+ {
+ toCategoryName: category.name,
+ fromCategoryName: categoriesById[fromCategoryId].name,
+ },
+ ),
+ });
+ },
+ },
+ },
+ }),
+ );
+ }, [
+ category,
+ dispatch,
+ month,
+ onBudgetAction,
+ balanceMenuModalName,
+ showUndoNotification,
+ t,
+ categoriesById,
+ ]);
+
+ const onOpenBalanceMenu = useCallback(() => {
+ if (!category) {
+ return;
+ }
+ if (balanceMenuModalName === 'envelope-balance-menu') {
+ dispatch(
+ pushModal({
+ modal: {
+ name: balanceMenuModalName,
+ options: {
+ month,
+ categoryId: category.id,
+ onCarryover,
+ onTransfer,
+ onCover,
+ },
+ },
+ }),
+ );
+ } else {
+ dispatch(
+ pushModal({
+ modal: {
+ name: balanceMenuModalName,
+ options: {
+ month,
+ categoryId: category.id,
+ onCarryover,
+ },
+ },
+ }),
+ );
+ }
+ }, [
+ category,
+ balanceMenuModalName,
+ dispatch,
+ month,
+ onCarryover,
+ onTransfer,
+ onCover,
+ ]);
+
+ const navigate = useNavigate();
+ const onShowActivity = useCallback(() => {
+ if (!category) {
+ return;
+ }
+ navigate(`/categories/${category.id}?month=${month}`);
+ }, [category, month, navigate]);
+
+ if (!category) {
+ return null;
+ }
+
+ return (
+ <GridListItem
+ textValue={category.name}
+ data-testid="category-row"
+ {...props}
+ >
+ <View
+ style={{
+ height: ROW_HEIGHT,
+ borderColor: theme.tableBorder,
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ paddingLeft: 5,
+ paddingRight: 5,
+ borderBottomWidth: 1,
+ opacity: isHidden ? 0.5 : undefined,
+ backgroundColor: monthUtils.isCurrentMonth(month)
+ ? theme.budgetCurrentMonth
+ : theme.budgetOtherMonth,
+ }}
+ >
+ <ExpenseCategoryName
+ category={category}
+ onEdit={onEdit}
+ show3Columns={show3Columns}
+ />
+ <ExpenseCategoryCells
+ category={category}
+ month={month}
+ onBudgetAction={onBudgetAction}
+ show3Columns={show3Columns}
+ showBudgetedColumn={showBudgetedColumn}
+ onOpenBalanceMenu={onOpenBalanceMenu}
+ onShowActivity={onShowActivity}
+ />
+ </View>
+ </GridListItem>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/budget/ExpenseGroup.tsx b/packages/desktop-client/src/components/mobile/budget/ExpenseGroup.tsx
new file mode 100644
index 0000000000..988df91a80
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/budget/ExpenseGroup.tsx
@@ -0,0 +1,363 @@
+import { useCallback, useMemo } from 'react';
+
+import { Button } from '@actual-app/components/button';
+import { Card } from '@actual-app/components/card';
+import { SvgExpandArrow } from '@actual-app/components/icons/v0';
+import { SvgCheveronRight } from '@actual-app/components/icons/v1';
+import { type CSSProperties, styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+import { css } from '@emotion/css';
+import { AutoTextSize } from 'auto-text-size';
+
+import { envelopeBudget, trackingBudget } from 'loot-core/client/queries';
+import * as monthUtils from 'loot-core/shared/months';
+import {
+ type CategoryEntity,
+ type CategoryGroupEntity,
+} from 'loot-core/types/models';
+
+import { useSyncedPref } from '../../../hooks/useSyncedPref';
+import { PrivacyFilter } from '../../PrivacyFilter';
+import { CellValue } from '../../spreadsheet/CellValue';
+import { useFormat } from '../../spreadsheet/useFormat';
+
+import { getColumnWidth } from './BudgetTable';
+import { ExpenseCategoryList } from './ExpenseCategoryList';
+import { ListItem } from './ListItem';
+
+type ExpenseGroupProps = {
+ group: CategoryGroupEntity;
+ month: string;
+ showHiddenCategories: boolean;
+ onEditGroup: (id: CategoryGroupEntity['id']) => void;
+ onEditCategory: (id: string) => void;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+ isCollapsed: (id: CategoryGroupEntity['id']) => boolean;
+ onToggleCollapse: (id: CategoryGroupEntity['id']) => void;
+ showBudgetedColumn: boolean;
+ show3Columns: boolean;
+};
+
+export function ExpenseGroup({
+ group,
+ onEditGroup,
+ onEditCategory,
+ month,
+ onBudgetAction,
+ showBudgetedColumn,
+ show3Columns,
+ showHiddenCategories,
+ isCollapsed,
+ onToggleCollapse,
+}: ExpenseGroupProps) {
+ const categories = useMemo(
+ () =>
+ isCollapsed(group.id)
+ ? []
+ : (group.categories?.filter(
+ category => !category.hidden || showHiddenCategories,
+ ) ?? []),
+ [group.categories, group.id, isCollapsed, showHiddenCategories],
+ );
+
+ const shouldHideCategory = useCallback(
+ (category: CategoryEntity) => {
+ return !!(category.hidden || group.hidden);
+ },
+ [group.hidden],
+ );
+
+ return (
+ <Card
+ style={{
+ marginTop: 4,
+ marginBottom: 4,
+ }}
+ >
+ <ExpenseGroupHeader
+ group={group}
+ month={month}
+ showBudgetedColumn={showBudgetedColumn}
+ show3Columns={show3Columns}
+ onEdit={onEditGroup}
+ isCollapsed={isCollapsed(group.id)}
+ onToggleCollapse={onToggleCollapse}
+ />
+
+ <ExpenseCategoryList
+ categories={categories}
+ month={month}
+ onEditCategory={onEditCategory}
+ onBudgetAction={onBudgetAction}
+ shouldHideCategory={shouldHideCategory}
+ show3Columns={show3Columns}
+ showBudgetedColumn={showBudgetedColumn}
+ />
+ </Card>
+ );
+}
+
+type ExpenseGroupHeaderProps = {
+ group: CategoryGroupEntity;
+ month: string;
+ onEdit: (id: CategoryGroupEntity['id']) => void;
+ isCollapsed: boolean;
+ onToggleCollapse: (id: CategoryGroupEntity['id']) => void;
+ show3Columns: boolean;
+ showBudgetedColumn: boolean;
+};
+
+function ExpenseGroupHeader({
+ group,
+ month,
+ onEdit,
+ show3Columns,
+ showBudgetedColumn,
+ isCollapsed,
+ onToggleCollapse,
+}: ExpenseGroupHeaderProps) {
+ return (
+ <ListItem
+ style={{
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ opacity: !!group.hidden ? 0.5 : undefined,
+ paddingLeft: 0,
+ backgroundColor: monthUtils.isCurrentMonth(month)
+ ? theme.budgetHeaderCurrentMonth
+ : theme.budgetHeaderOtherMonth,
+ }}
+ data-testid="category-group-row"
+ >
+ <ExpenseGroupName
+ group={group}
+ onEdit={onEdit}
+ isCollapsed={isCollapsed}
+ onToggleCollapse={onToggleCollapse}
+ show3Columns={show3Columns}
+ />
+ <ExpenseGroupCells
+ group={group}
+ show3Columns={show3Columns}
+ showBudgetedColumn={showBudgetedColumn}
+ />
+ </ListItem>
+ );
+}
+
+type ExpenseGroupNameProps = {
+ group: CategoryGroupEntity;
+ onEdit: (id: CategoryGroupEntity['id']) => void;
+ isCollapsed: boolean;
+ onToggleCollapse: (id: CategoryGroupEntity['id']) => void;
+ show3Columns: boolean;
+};
+
+function ExpenseGroupName({
+ group,
+ onEdit,
+ isCollapsed,
+ onToggleCollapse,
+ show3Columns,
+}: ExpenseGroupNameProps) {
+ const sidebarColumnWidth = getColumnWidth({
+ show3Columns,
+ isSidebar: true,
+ offset: -3.5,
+ });
+ return (
+ <View
+ style={{
+ flex: 1,
+ flexDirection: 'row',
+ justifyContent: 'flex-start',
+ width: sidebarColumnWidth,
+ }}
+ >
+ <Button
+ variant="bare"
+ className={css({
+ flexShrink: 0,
+ color: theme.pageTextSubdued,
+ '&[data-pressed]': {
+ backgroundColor: 'transparent',
+ },
+ })}
+ onPress={() => onToggleCollapse(group.id)}
+ >
+ <SvgExpandArrow
+ width={8}
+ height={8}
+ style={{
+ flexShrink: 0,
+ transition: 'transform .1s',
+ transform: isCollapsed ? 'rotate(-90deg)' : '',
+ }}
+ />
+ </Button>
+ <Button
+ variant="bare"
+ style={{
+ maxWidth: sidebarColumnWidth,
+ }}
+ onPress={() => onEdit(group.id)}
+ >
+ <View
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'flex-start',
+ }}
+ >
+ <Text
+ style={{
+ ...styles.lineClamp(2),
+ width: sidebarColumnWidth,
+ textAlign: 'left',
+ ...styles.smallText,
+ fontWeight: '500',
+ }}
+ data-testid="category-group-name"
+ >
+ {group.name}
+ </Text>
+ <SvgCheveronRight
+ style={{ flexShrink: 0, color: theme.tableTextSubdued }}
+ width={14}
+ height={14}
+ />
+ </View>
+ </Button>
+ </View>
+ );
+}
+
+type ExpenseGroupCellsProps = {
+ group: CategoryGroupEntity;
+ show3Columns: boolean;
+ showBudgetedColumn: boolean;
+};
+
+function ExpenseGroupCells({
+ group,
+ show3Columns,
+ showBudgetedColumn,
+}: ExpenseGroupCellsProps) {
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
+ const format = useFormat();
+
+ const columnWidth = getColumnWidth({ show3Columns });
+
+ const amountStyle: CSSProperties = {
+ width: columnWidth,
+ fontSize: 12,
+ fontWeight: '500',
+ paddingLeft: 5,
+ textAlign: 'right',
+ };
+
+ const budgeted =
+ budgetType === 'report'
+ ? trackingBudget.groupBudgeted(group.id)
+ : envelopeBudget.groupBudgeted(group.id);
+
+ const spent =
+ budgetType === 'report'
+ ? trackingBudget.groupSumAmount(group.id)
+ : envelopeBudget.groupSumAmount(group.id);
+
+ const balance =
+ budgetType === 'report'
+ ? trackingBudget.groupBalance(group.id)
+ : envelopeBudget.groupBalance(group.id);
+
+ return (
+ <View
+ style={{
+ flexDirection: 'row',
+ justifyContent: 'flex-end',
+ alignItems: 'center',
+ paddingRight: 5,
+ }}
+ >
+ <View
+ style={{
+ ...(!show3Columns && !showBudgetedColumn && { display: 'none' }),
+ }}
+ >
+ <CellValue<'envelope-budget' | 'tracking-budget', 'group-budget'>
+ binding={budgeted}
+ type="financial"
+ >
+ {({ type, value }) => (
+ <View>
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={amountStyle}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </View>
+ )}
+ </CellValue>
+ </View>
+ <View
+ style={{
+ ...(!show3Columns && showBudgetedColumn && { display: 'none' }),
+ }}
+ >
+ <CellValue<'envelope-budget' | 'tracking-budget', 'group-sum-amount'>
+ binding={spent}
+ type="financial"
+ >
+ {({ type, value }) => (
+ <View>
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={amountStyle}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </View>
+ )}
+ </CellValue>
+ </View>
+ <CellValue<'envelope-budget' | 'tracking-budget', 'group-leftover'>
+ binding={balance}
+ type="financial"
+ >
+ {({ type, value }) => (
+ <View>
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={amountStyle}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </View>
+ )}
+ </CellValue>
+ </View>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/budget/IncomeCategoryList.tsx b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryList.tsx
index 5697ab068a..955cdc9e28 100644
--- a/packages/desktop-client/src/components/mobile/budget/IncomeCategoryList.tsx
+++ b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryList.tsx
@@ -1,37 +1,16 @@
-import { type ComponentPropsWithoutRef, useCallback, useRef } from 'react';
import { type DragItem } from 'react-aria';
-import {
- DropIndicator,
- ListBox,
- ListBoxItem,
- useDragAndDrop,
-} from 'react-aria-components';
+import { DropIndicator, GridList, useDragAndDrop } from 'react-aria-components';
import { useTranslation } from 'react-i18next';
-import { Button } from '@actual-app/components/button';
-import { SvgCheveronRight } from '@actual-app/components/icons/v1';
-import { styles } from '@actual-app/components/styles';
-import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
-import { View } from '@actual-app/components/view';
import { css } from '@emotion/css';
-import { AutoTextSize } from 'auto-text-size';
-import { envelopeBudget, trackingBudget } from 'loot-core/client/queries';
import { moveCategory } from 'loot-core/client/queries/queriesSlice';
-import * as monthUtils from 'loot-core/shared/months';
import { type CategoryEntity } from 'loot-core/types/models';
-import { useNavigate } from '../../../hooks/useNavigate';
-import { useSyncedPref } from '../../../hooks/useSyncedPref';
import { useDispatch } from '../../../redux';
-import { makeAmountGrey } from '../../budget/util';
-import { PrivacyFilter } from '../../PrivacyFilter';
-import { CellValue } from '../../spreadsheet/CellValue';
-import { useFormat } from '../../spreadsheet/useFormat';
-import { BudgetCell } from './BudgetCell';
-import { getColumnWidth, PILL_STYLE } from './BudgetTable';
+import { IncomeCategoryListItem } from './IncomeCategoryListItem';
type IncomeCategoryListProps = {
categories: CategoryEntity[];
@@ -129,7 +108,7 @@ export function IncomeCategoryList({
});
return (
- <ListBox
+ <GridList
aria-label={t('Income categories')}
items={categories}
dragAndDropHooks={dragAndDropHooks}
@@ -144,223 +123,6 @@ export function IncomeCategoryList({
onBudgetAction={onBudgetAction}
/>
)}
- </ListBox>
- );
-}
-
-type IncomeCategoryNameProps = {
- category: CategoryEntity;
- onEdit: (id: CategoryEntity['id']) => void;
-};
-
-function IncomeCategoryName({ category, onEdit }: IncomeCategoryNameProps) {
- const sidebarColumnWidth = getColumnWidth({
- show3Cols: false,
- isSidebar: true,
- offset: -10,
- });
- return (
- <View
- style={{
- flex: 1,
- justifyContent: 'center',
- alignItems: 'flex-start',
- width: sidebarColumnWidth,
- }}
- >
- <Button
- variant="bare"
- style={{
- maxWidth: sidebarColumnWidth,
- }}
- onPress={() => onEdit?.(category.id)}
- >
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'flex-start',
- }}
- >
- <Text
- style={{
- ...styles.lineClamp(2),
- width: sidebarColumnWidth,
- textAlign: 'left',
- ...styles.smallText,
- }}
- data-testid="category-name"
- >
- {category.name}
- </Text>
- <SvgCheveronRight
- style={{ flexShrink: 0, color: theme.tableTextSubdued }}
- width={14}
- height={14}
- />
- </View>
- </Button>
- </View>
- );
-}
-
-type IncomeCategoryCellsProps = {
- category: CategoryEntity;
- month: string;
- onBudgetAction: (month: string, action: string, args: unknown) => void;
-};
-
-function IncomeCategoryCells({
- category,
- month,
- onBudgetAction,
-}: IncomeCategoryCellsProps) {
- const { t } = useTranslation();
- const format = useFormat();
- const columnWidth = getColumnWidth();
- const [budgetType = 'rollover'] = useSyncedPref('budgetType');
-
- const budgeted =
- budgetType === 'report' ? trackingBudget.catBudgeted(category.id) : null;
-
- const balance =
- budgetType === 'report'
- ? trackingBudget.catSumAmount(category.id)
- : envelopeBudget.catSumAmount(category.id);
-
- const navigate = useNavigate();
- const onShowActivity = useCallback(() => {
- navigate(`/categories/${category.id}?month=${month}`);
- }, [category.id, month, navigate]);
-
- return (
- <View
- style={{
- flexDirection: 'row',
- justifyContent: 'flex-end',
- alignItems: 'center',
- }}
- >
- {budgeted && (
- <View
- style={{
- width: columnWidth,
- justifyContent: 'center',
- alignItems: 'flex-end',
- }}
- >
- <BudgetCell
- binding={budgeted}
- type="financial"
- category={category}
- month={month}
- onBudgetAction={onBudgetAction}
- />
- </View>
- )}
- <View
- style={{
- width: columnWidth,
- justifyContent: 'center',
- alignItems: 'flex-end',
- }}
- >
- <CellValue<'envelope-budget' | 'tracking-budget', 'sum-amount'>
- binding={balance}
- type="financial"
- aria-label={t('Balance for {{categoryName}} category', {
- categoryName: category.name,
- })} // Translated aria-label
- >
- {({ type, value }) => (
- <Button
- variant="bare"
- style={{
- ...PILL_STYLE,
- }}
- onPress={onShowActivity}
- aria-label={t('Show transactions for {{categoryName}} category', {
- categoryName: category.name,
- })} // Translated aria-label
- >
- <PrivacyFilter>
- <AutoTextSize
- key={value}
- as={Text}
- minFontSizePx={6}
- maxFontSizePx={12}
- mode="oneline"
- style={{
- ...makeAmountGrey(value),
- maxWidth: columnWidth,
- textAlign: 'right',
- fontSize: 12,
- }}
- >
- {format(value, type)}
- </AutoTextSize>
- </PrivacyFilter>
- </Button>
- )}
- </CellValue>
- </View>
- </View>
- );
-}
-
-type IncomeCategoryListItemProps = ComponentPropsWithoutRef<
- typeof ListBoxItem<CategoryEntity>
-> & {
- month: string;
- onEdit: (id: CategoryEntity['id']) => void;
- onBudgetAction: (month: string, action: string, args: unknown) => void;
-};
-
-function IncomeCategoryListItem({
- month,
- onEdit,
- onBudgetAction,
- ...props
-}: IncomeCategoryListItemProps) {
- const listItemRef = useRef<HTMLDivElement | null>(null);
- const { value: category } = props;
-
- if (!category) {
- return null;
- }
-
- return (
- <ListBoxItem
- textValue={category.name}
- data-testid="category-row"
- {...props}
- >
- <View
- style={{
- height: 50,
- borderColor: theme.tableBorder,
- flexDirection: 'row',
- alignItems: 'center',
- paddingLeft: 5,
- paddingRight: 5,
- zIndex: 1,
- justifyContent: 'space-between',
- borderBottomWidth: 0.5,
- borderTopWidth: 0.5,
- opacity: !!category.hidden ? 0.5 : undefined,
- backgroundColor: monthUtils.isCurrentMonth(month)
- ? theme.budgetCurrentMonth
- : theme.budgetOtherMonth,
- }}
- innerRef={listItemRef}
- >
- <IncomeCategoryName category={category} onEdit={onEdit} />
- <IncomeCategoryCells
- category={category}
- month={month}
- onBudgetAction={onBudgetAction}
- />
- </View>
- </ListBoxItem>
+ </GridList>
);
}
diff --git a/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx
new file mode 100644
index 0000000000..5f42c0e649
--- /dev/null
+++ b/packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx
@@ -0,0 +1,226 @@
+import { type ComponentPropsWithoutRef } from 'react';
+import { GridListItem } from 'react-aria-components';
+import { useTranslation } from 'react-i18next';
+
+import { Button } from '@actual-app/components/button';
+import { SvgCheveronRight } from '@actual-app/components/icons/v1';
+import { styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+import { AutoTextSize } from 'auto-text-size';
+
+import { envelopeBudget, trackingBudget } from 'loot-core/client/queries';
+import * as monthUtils from 'loot-core/shared/months';
+import { type CategoryEntity } from 'loot-core/types/models';
+
+import { useSyncedPref } from '../../../hooks/useSyncedPref';
+import { PrivacyFilter } from '../../PrivacyFilter';
+import { CellValue } from '../../spreadsheet/CellValue';
+import { useFormat } from '../../spreadsheet/useFormat';
+
+import { BudgetCell } from './BudgetCell';
+import { getColumnWidth, ROW_HEIGHT } from './BudgetTable';
+
+type IncomeCategoryNameProps = {
+ category: CategoryEntity;
+ onEdit: (id: CategoryEntity['id']) => void;
+};
+
+function IncomeCategoryName({ category, onEdit }: IncomeCategoryNameProps) {
+ const sidebarColumnWidth = getColumnWidth({
+ isSidebar: true,
+ offset: -10,
+ });
+ return (
+ <View
+ style={{
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'flex-start',
+ width: sidebarColumnWidth,
+ }}
+ >
+ {/* Hidden drag button */}
+ <Button
+ slot="drag"
+ style={{
+ opacity: 0,
+ width: 1,
+ height: 1,
+ position: 'absolute',
+ overflow: 'hidden',
+ }}
+ />
+ <Button
+ variant="bare"
+ style={{
+ maxWidth: sidebarColumnWidth,
+ }}
+ onPress={() => onEdit?.(category.id)}
+ >
+ <View
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'flex-start',
+ }}
+ >
+ <Text
+ style={{
+ ...styles.lineClamp(2),
+ width: sidebarColumnWidth,
+ textAlign: 'left',
+ ...styles.smallText,
+ }}
+ data-testid="category-name"
+ >
+ {category.name}
+ </Text>
+ <SvgCheveronRight
+ style={{ flexShrink: 0, color: theme.tableTextSubdued }}
+ width={14}
+ height={14}
+ />
+ </View>
+ </Button>
+ </View>
+ );
+}
+
+type IncomeCategoryCellsProps = {
+ category: CategoryEntity;
+ month: string;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+};
+
+function IncomeCategoryCells({
+ category,
+ month,
+ onBudgetAction,
+}: IncomeCategoryCellsProps) {
+ const { t } = useTranslation();
+ const format = useFormat();
+ const columnWidth = getColumnWidth();
+ const [budgetType = 'rollover'] = useSyncedPref('budgetType');
+
+ const budgeted =
+ budgetType === 'report' ? trackingBudget.catBudgeted(category.id) : null;
+
+ const balance =
+ budgetType === 'report'
+ ? trackingBudget.catSumAmount(category.id)
+ : envelopeBudget.catSumAmount(category.id);
+
+ return (
+ <View
+ style={{
+ flexDirection: 'row',
+ justifyContent: 'flex-end',
+ alignItems: 'center',
+ }}
+ >
+ {budgeted && (
+ <View
+ style={{
+ width: columnWidth,
+ justifyContent: 'center',
+ alignItems: 'flex-end',
+ }}
+ >
+ <BudgetCell
+ binding={budgeted}
+ type="financial"
+ category={category}
+ month={month}
+ onBudgetAction={onBudgetAction}
+ />
+ </View>
+ )}
+ <CellValue<'envelope-budget' | 'tracking-budget', 'sum-amount'>
+ binding={balance}
+ type="financial"
+ aria-label={t('Balance for {{categoryName}} category', {
+ categoryName: category.name,
+ })} // Translated aria-label
+ >
+ {({ type, value }) => (
+ <View>
+ <PrivacyFilter>
+ <AutoTextSize
+ key={value}
+ as={Text}
+ minFontSizePx={6}
+ maxFontSizePx={12}
+ mode="oneline"
+ style={{
+ width: columnWidth,
+ justifyContent: 'center',
+ alignItems: 'flex-end',
+ textAlign: 'right',
+ fontSize: 12,
+ paddingRight: 5,
+ }}
+ >
+ {format(value, type)}
+ </AutoTextSize>
+ </PrivacyFilter>
+ </View>
+ )}
+ </CellValue>
+ </View>
+ );
+}
+
+type IncomeCategoryListItemProps = ComponentPropsWithoutRef<
+ typeof GridListItem<CategoryEntity>
+> & {
+ month: string;
+ onEdit: (id: CategoryEntity['id']) => void;
+ onBudgetAction: (month: string, action: string, args: unknown) => void;
+};
+
+export function IncomeCategoryListItem({
+ month,
+ onEdit,
+ onBudgetAction,
+ ...props
+}: IncomeCategoryListItemProps) {
+ const { value: category } = props;
+
+ if (!category) {
+ return null;
+ }
+
+ return (
+ <GridListItem
+ textValue={category.name}
+ data-testid="category-row"
+ {...props}
+ >
+ <View
+ style={{
+ height: ROW_HEIGHT,
+ borderColor: theme.tableBorder,
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ paddingLeft: 5,
+ paddingRight: 5,
+ borderBottomWidth: 1,
+ opacity: !!category.hidden ? 0.5 : undefined,
+ backgroundColor: monthUtils.isCurrentMonth(month)
+ ? theme.budgetCurrentMonth
+ : theme.budgetOtherMonth,
+ }}
+ >
+ <IncomeCategoryName category={category} onEdit={onEdit} />
+ <IncomeCategoryCells
+ category={category}
+ month={month}
+ onBudgetAction={onBudgetAction}
+ />
+ </View>
+ </GridListItem>
+ );
+}
diff --git a/packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx b/packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx
index ec62f4f466..73784a8a83 100644
--- a/packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx
+++ b/packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx
@@ -1,4 +1,4 @@
-import { useMemo, useRef } from 'react';
+import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Button } from '@actual-app/components/button';
@@ -33,7 +33,7 @@ type IncomeGroupProps = {
onEditGroup: (id: CategoryGroupEntity['id']) => void;
onEditCategory: (id: string) => void;
onBudgetAction: (month: string, action: string, args: unknown) => void;
- isCollapsed: boolean;
+ isCollapsed: (id: CategoryGroupEntity['id']) => boolean;
onToggleCollapse: (id: CategoryGroupEntity['id']) => void;
};
@@ -53,12 +53,12 @@ export function IncomeGroup({
const categories = useMemo(
() =>
- isCollapsed
+ isCollapsed(group.id)
? []
: (group.categories?.filter(
category => !category.hidden || showHiddenCategories,
) ?? []),
- [group.categories, isCollapsed, showHiddenCategories],
+ [group.categories, group.id, isCollapsed, showHiddenCategories],
);
return (
@@ -84,7 +84,7 @@ export function IncomeGroup({
group={group}
month={month}
onEdit={onEditGroup}
- isCollapsed={isCollapsed}
+ isCollapsed={isCollapsed(group.id)}
onToggleCollapse={onToggleCollapse}
/>
<IncomeCategoryList
@@ -115,8 +115,6 @@ function IncomeGroupHeader({
onToggleCollapse,
style,
}: IncomeGroupHeaderProps) {
- const listItemRef = useRef<HTMLDivElement | null>(null);
-
return (
<ListItem
style={{
@@ -130,7 +128,6 @@ function IncomeGroupHeader({
: theme.budgetHeaderOtherMonth,
...style,
}}
- innerRef={listItemRef}
data-testid="category-group-row"
>
<IncomeGroupName
@@ -146,9 +143,9 @@ function IncomeGroupHeader({
type IncomeGroupNameProps = {
group: CategoryGroupEntity;
- onEdit?: (id: CategoryGroupEntity['id']) => void;
+ onEdit: (id: CategoryGroupEntity['id']) => void;
isCollapsed: boolean;
- onToggleCollapse?: (id: CategoryGroupEntity['id']) => void;
+ onToggleCollapse: (id: CategoryGroupEntity['id']) => void;
};
function IncomeGroupName({
@@ -158,7 +155,6 @@ function IncomeGroupName({
onToggleCollapse,
}: IncomeGroupNameProps) {
const sidebarColumnWidth = getColumnWidth({
- show3Cols: false,
isSidebar: true,
offset: -13.5,
});
@@ -180,7 +176,7 @@ function IncomeGroupName({
backgroundColor: 'transparent',
},
})}
- onPress={() => onToggleCollapse?.(group.id)}
+ onPress={() => onToggleCollapse(group.id)}
>
<SvgExpandArrow
width={8}
@@ -197,7 +193,7 @@ function IncomeGroupName({
style={{
maxWidth: sidebarColumnWidth,
}}
- onPress={() => onEdit?.(group.id)}
+ onPress={() => onEdit(group.id)}
>
<View
style={{
diff --git a/packages/desktop-client/src/components/mobile/budget/index.tsx b/packages/desktop-client/src/components/mobile/budget/index.tsx
index 9b08012080..a1b630fd97 100644
--- a/packages/desktop-client/src/components/mobile/budget/index.tsx
+++ b/packages/desktop-client/src/components/mobile/budget/index.tsx
@@ -13,8 +13,6 @@ import {
createGroup,
deleteCategory,
deleteGroup,
- moveCategory,
- moveCategoryGroup,
updateCategory,
updateGroup,
} from 'loot-core/client/queries/queriesSlice';
@@ -265,52 +263,6 @@ export function Budget() {
[categories, dispatch, onSaveCategory],
);
- const onReorderCategory = useCallback(
- (id, { inGroup, aroundCategory }) => {
- let groupId, targetId;
-
- if (inGroup) {
- groupId = inGroup;
- } else if (aroundCategory) {
- const { id: originalCatId, position } = aroundCategory;
-
- let catId = originalCatId;
- const group = categoryGroups.find(group =>
- group.categories?.find(cat => cat.id === catId),
- );
-
- if (position === 'bottom') {
- const idx =
- group?.categories?.findIndex(cat => cat.id === catId) ?? -1;
- catId = group?.categories
- ? idx < group.categories.length - 1
- ? group.categories[idx + 1].id
- : null
- : null;
- }
-
- groupId = group?.id;
- targetId = catId;
- }
-
- dispatch(moveCategory({ id, groupId, targetId }));
- },
- [categoryGroups, dispatch],
- );
-
- const onReorderGroup = useCallback(
- (id, targetId, position) => {
- if (position === 'bottom') {
- const idx = categoryGroups.findIndex(group => group.id === targetId);
- targetId =
- idx < categoryGroups.length - 1 ? categoryGroups[idx + 1].id : null;
- }
-
- dispatch(moveCategoryGroup({ id, targetId }));
- },
- [categoryGroups, dispatch],
- );
-
const onPrevMonth = useCallback(async () => {
const month = monthUtils.subMonths(startMonth, 1);
await prewarmMonth(budgetType, spreadsheet, month);
@@ -568,21 +520,12 @@ export function Budget() {
// format changes
key={`${numberFormat}${hideFraction}`}
categoryGroups={categoryGroups}
- type={budgetType}
month={startMonth}
monthBounds={bounds}
- // editMode={editMode}
onShowBudgetSummary={onShowBudgetSummary}
onPrevMonth={onPrevMonth}
onNextMonth={onNextMonth}
onCurrentMonth={onCurrentMonth}
- onSaveGroup={onSaveGroup}
- onDeleteGroup={onDeleteGroup}
- onAddCategory={onOpenNewCategoryModal}
- onSaveCategory={onSaveCategory}
- onDeleteCategory={onDeleteCategory}
- onReorderCategory={onReorderCategory}
- onReorderGroup={onReorderGroup}
onBudgetAction={onBudgetAction}
onRefresh={onRefresh}
onEditGroup={onOpenCategoryGroupMenuModal}
diff --git a/upcoming-release-notes/4484.md b/upcoming-release-notes/4484.md
new file mode 100644
index 0000000000..8717423391
--- /dev/null
+++ b/upcoming-release-notes/4484.md
@@ -0,0 +1,6 @@
+---
+category: Enhancements
+authors: [joel-jeremy]
+---
+
+[Mobile] Drag and drop to reorder expense categories in budget page (only supports for Chromium-based browsers for now)