From d8639a2a71158a4264e59f2fd8d9b736378814f7 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Fri, 2 Feb 2024 19:20:53 +0000 Subject: [PATCH 1/7] :bookmark: (24.2.0) cleared transaction improvements; experimental simplefin bank-sync (#2311) --- packages/api/package.json | 2 +- packages/desktop-client/package.json | 2 +- packages/desktop-electron/package.json | 2 +- upcoming-release-notes/2053.md | 6 ------ upcoming-release-notes/2056.md | 6 ------ upcoming-release-notes/2072.md | 6 ------ upcoming-release-notes/2081.md | 6 ------ upcoming-release-notes/2084.md | 6 ------ upcoming-release-notes/2102.md | 6 ------ upcoming-release-notes/2108.md | 6 ------ upcoming-release-notes/2115.md | 6 ------ upcoming-release-notes/2116.md | 6 ------ upcoming-release-notes/2117.md | 6 ------ upcoming-release-notes/2118.md | 6 ------ upcoming-release-notes/2119.md | 6 ------ upcoming-release-notes/2120.md | 6 ------ upcoming-release-notes/2124.md | 6 ------ upcoming-release-notes/2132.md | 6 ------ upcoming-release-notes/2134.md | 6 ------ upcoming-release-notes/2136.md | 6 ------ upcoming-release-notes/2138.md | 6 ------ upcoming-release-notes/2142.md | 6 ------ upcoming-release-notes/2144.md | 6 ------ upcoming-release-notes/2151.md | 6 ------ upcoming-release-notes/2153.md | 6 ------ upcoming-release-notes/2163.md | 6 ------ upcoming-release-notes/2168.md | 6 ------ upcoming-release-notes/2169.md | 6 ------ upcoming-release-notes/2170.md | 6 ------ upcoming-release-notes/2171.md | 6 ------ upcoming-release-notes/2172.md | 6 ------ upcoming-release-notes/2173.md | 6 ------ upcoming-release-notes/2174.md | 6 ------ upcoming-release-notes/2176.md | 6 ------ upcoming-release-notes/2181.md | 6 ------ upcoming-release-notes/2182.md | 6 ------ upcoming-release-notes/2184.md | 6 ------ upcoming-release-notes/2185.md | 6 ------ upcoming-release-notes/2186.md | 6 ------ upcoming-release-notes/2188.md | 6 ------ upcoming-release-notes/2190.md | 6 ------ upcoming-release-notes/2191.md | 6 ------ upcoming-release-notes/2192.md | 6 ------ upcoming-release-notes/2195.md | 6 ------ upcoming-release-notes/2196.md | 6 ------ upcoming-release-notes/2199.md | 6 ------ upcoming-release-notes/2202.md | 6 ------ upcoming-release-notes/2204.md | 6 ------ upcoming-release-notes/2206.md | 6 ------ upcoming-release-notes/2207.md | 6 ------ upcoming-release-notes/2208.md | 6 ------ upcoming-release-notes/2209.md | 6 ------ upcoming-release-notes/2212.md | 6 ------ upcoming-release-notes/2214.md | 6 ------ upcoming-release-notes/2215.md | 6 ------ upcoming-release-notes/2217.md | 6 ------ upcoming-release-notes/2224.md | 6 ------ upcoming-release-notes/2228.md | 6 ------ upcoming-release-notes/2230.md | 6 ------ upcoming-release-notes/2233.md | 6 ------ upcoming-release-notes/2238.md | 6 ------ upcoming-release-notes/2244.md | 6 ------ upcoming-release-notes/2245.md | 6 ------ upcoming-release-notes/2246.md | 6 ------ upcoming-release-notes/2247.md | 6 ------ upcoming-release-notes/2249.md | 6 ------ upcoming-release-notes/2250.md | 6 ------ upcoming-release-notes/2251.md | 6 ------ upcoming-release-notes/2252.md | 6 ------ upcoming-release-notes/2253.md | 6 ------ upcoming-release-notes/2254.md | 6 ------ upcoming-release-notes/2255.md | 6 ------ upcoming-release-notes/2256.md | 6 ------ upcoming-release-notes/2258.md | 6 ------ upcoming-release-notes/2260.md | 6 ------ upcoming-release-notes/2261.md | 6 ------ upcoming-release-notes/2263.md | 6 ------ upcoming-release-notes/2268.md | 6 ------ upcoming-release-notes/2273.md | 6 ------ upcoming-release-notes/2276.md | 6 ------ upcoming-release-notes/2277.md | 6 ------ upcoming-release-notes/2278.md | 6 ------ upcoming-release-notes/2279.md | 6 ------ upcoming-release-notes/2281.md | 6 ------ upcoming-release-notes/2282.md | 6 ------ upcoming-release-notes/2284.md | 6 ------ upcoming-release-notes/2287.md | 6 ------ upcoming-release-notes/2308.md | 6 ------ 88 files changed, 3 insertions(+), 513 deletions(-) delete mode 100644 upcoming-release-notes/2053.md delete mode 100644 upcoming-release-notes/2056.md delete mode 100644 upcoming-release-notes/2072.md delete mode 100644 upcoming-release-notes/2081.md delete mode 100644 upcoming-release-notes/2084.md delete mode 100644 upcoming-release-notes/2102.md delete mode 100644 upcoming-release-notes/2108.md delete mode 100644 upcoming-release-notes/2115.md delete mode 100644 upcoming-release-notes/2116.md delete mode 100644 upcoming-release-notes/2117.md delete mode 100644 upcoming-release-notes/2118.md delete mode 100644 upcoming-release-notes/2119.md delete mode 100644 upcoming-release-notes/2120.md delete mode 100644 upcoming-release-notes/2124.md delete mode 100644 upcoming-release-notes/2132.md delete mode 100644 upcoming-release-notes/2134.md delete mode 100644 upcoming-release-notes/2136.md delete mode 100644 upcoming-release-notes/2138.md delete mode 100644 upcoming-release-notes/2142.md delete mode 100644 upcoming-release-notes/2144.md delete mode 100644 upcoming-release-notes/2151.md delete mode 100644 upcoming-release-notes/2153.md delete mode 100644 upcoming-release-notes/2163.md delete mode 100644 upcoming-release-notes/2168.md delete mode 100644 upcoming-release-notes/2169.md delete mode 100644 upcoming-release-notes/2170.md delete mode 100644 upcoming-release-notes/2171.md delete mode 100644 upcoming-release-notes/2172.md delete mode 100644 upcoming-release-notes/2173.md delete mode 100644 upcoming-release-notes/2174.md delete mode 100644 upcoming-release-notes/2176.md delete mode 100644 upcoming-release-notes/2181.md delete mode 100644 upcoming-release-notes/2182.md delete mode 100644 upcoming-release-notes/2184.md delete mode 100644 upcoming-release-notes/2185.md delete mode 100644 upcoming-release-notes/2186.md delete mode 100644 upcoming-release-notes/2188.md delete mode 100644 upcoming-release-notes/2190.md delete mode 100644 upcoming-release-notes/2191.md delete mode 100644 upcoming-release-notes/2192.md delete mode 100644 upcoming-release-notes/2195.md delete mode 100644 upcoming-release-notes/2196.md delete mode 100644 upcoming-release-notes/2199.md delete mode 100644 upcoming-release-notes/2202.md delete mode 100644 upcoming-release-notes/2204.md delete mode 100644 upcoming-release-notes/2206.md delete mode 100644 upcoming-release-notes/2207.md delete mode 100644 upcoming-release-notes/2208.md delete mode 100644 upcoming-release-notes/2209.md delete mode 100644 upcoming-release-notes/2212.md delete mode 100644 upcoming-release-notes/2214.md delete mode 100644 upcoming-release-notes/2215.md delete mode 100644 upcoming-release-notes/2217.md delete mode 100644 upcoming-release-notes/2224.md delete mode 100644 upcoming-release-notes/2228.md delete mode 100644 upcoming-release-notes/2230.md delete mode 100644 upcoming-release-notes/2233.md delete mode 100644 upcoming-release-notes/2238.md delete mode 100644 upcoming-release-notes/2244.md delete mode 100644 upcoming-release-notes/2245.md delete mode 100644 upcoming-release-notes/2246.md delete mode 100644 upcoming-release-notes/2247.md delete mode 100644 upcoming-release-notes/2249.md delete mode 100644 upcoming-release-notes/2250.md delete mode 100644 upcoming-release-notes/2251.md delete mode 100644 upcoming-release-notes/2252.md delete mode 100644 upcoming-release-notes/2253.md delete mode 100644 upcoming-release-notes/2254.md delete mode 100644 upcoming-release-notes/2255.md delete mode 100644 upcoming-release-notes/2256.md delete mode 100644 upcoming-release-notes/2258.md delete mode 100644 upcoming-release-notes/2260.md delete mode 100644 upcoming-release-notes/2261.md delete mode 100644 upcoming-release-notes/2263.md delete mode 100644 upcoming-release-notes/2268.md delete mode 100644 upcoming-release-notes/2273.md delete mode 100644 upcoming-release-notes/2276.md delete mode 100644 upcoming-release-notes/2277.md delete mode 100644 upcoming-release-notes/2278.md delete mode 100644 upcoming-release-notes/2279.md delete mode 100644 upcoming-release-notes/2281.md delete mode 100644 upcoming-release-notes/2282.md delete mode 100644 upcoming-release-notes/2284.md delete mode 100644 upcoming-release-notes/2287.md delete mode 100644 upcoming-release-notes/2308.md diff --git a/packages/api/package.json b/packages/api/package.json index d762d366de5..a73c8f28da7 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@actual-app/api", - "version": "6.4.0", + "version": "6.5.0", "license": "MIT", "description": "An API for Actual", "engines": { diff --git a/packages/desktop-client/package.json b/packages/desktop-client/package.json index 9f6d03494b1..fab474cd8bd 100644 --- a/packages/desktop-client/package.json +++ b/packages/desktop-client/package.json @@ -1,6 +1,6 @@ { "name": "@actual-app/web", - "version": "24.1.0", + "version": "24.2.0", "license": "MIT", "files": [ "build" diff --git a/packages/desktop-electron/package.json b/packages/desktop-electron/package.json index d84225cdf22..443c637f2e4 100644 --- a/packages/desktop-electron/package.json +++ b/packages/desktop-electron/package.json @@ -3,7 +3,7 @@ "author": "Actual", "productName": "Actual", "description": "A simple and powerful personal finance system", - "version": "24.1.0", + "version": "24.2.0", "scripts": { "clean": "rm -rf dist", "update-client": "bin/update-client", diff --git a/upcoming-release-notes/2053.md b/upcoming-release-notes/2053.md deleted file mode 100644 index 1c882269dd3..00000000000 --- a/upcoming-release-notes/2053.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Bundle loot-core types into the API diff --git a/upcoming-release-notes/2056.md b/upcoming-release-notes/2056.md deleted file mode 100644 index 6ddbe6a8396..00000000000 --- a/upcoming-release-notes/2056.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [HansiWursti] ---- - -Added cleared and uncleared Balances to Account Mobile View \ No newline at end of file diff --git a/upcoming-release-notes/2072.md b/upcoming-release-notes/2072.md deleted file mode 100644 index edad616bb1f..00000000000 --- a/upcoming-release-notes/2072.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.5). diff --git a/upcoming-release-notes/2081.md b/upcoming-release-notes/2081.md deleted file mode 100644 index 7f85c275938..00000000000 --- a/upcoming-release-notes/2081.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -Refactored MobileBudget component to TypeScript diff --git a/upcoming-release-notes/2084.md b/upcoming-release-notes/2084.md deleted file mode 100644 index e008c0c482c..00000000000 --- a/upcoming-release-notes/2084.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Switch desktop-client to the Vite JS framework. diff --git a/upcoming-release-notes/2102.md b/upcoming-release-notes/2102.md deleted file mode 100644 index a632e1dd315..00000000000 --- a/upcoming-release-notes/2102.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [shall0pass] ---- - -Goals: Refactor schedules file into functions and improve the readability of the code. \ No newline at end of file diff --git a/upcoming-release-notes/2108.md b/upcoming-release-notes/2108.md deleted file mode 100644 index 6fbaec594be..00000000000 --- a/upcoming-release-notes/2108.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [davidkus] ---- - -Adding filter for reconciled transactions. diff --git a/upcoming-release-notes/2115.md b/upcoming-release-notes/2115.md deleted file mode 100644 index 6de51450c3c..00000000000 --- a/upcoming-release-notes/2115.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports diff --git a/upcoming-release-notes/2116.md b/upcoming-release-notes/2116.md deleted file mode 100644 index 56222efbc89..00000000000 --- a/upcoming-release-notes/2116.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 2 diff --git a/upcoming-release-notes/2117.md b/upcoming-release-notes/2117.md deleted file mode 100644 index d8ccbfa0d5c..00000000000 --- a/upcoming-release-notes/2117.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 3 diff --git a/upcoming-release-notes/2118.md b/upcoming-release-notes/2118.md deleted file mode 100644 index 8a5ec768c03..00000000000 --- a/upcoming-release-notes/2118.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 4 diff --git a/upcoming-release-notes/2119.md b/upcoming-release-notes/2119.md deleted file mode 100644 index ae00aaa06e5..00000000000 --- a/upcoming-release-notes/2119.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 5 diff --git a/upcoming-release-notes/2120.md b/upcoming-release-notes/2120.md deleted file mode 100644 index c2ae64aecdc..00000000000 --- a/upcoming-release-notes/2120.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 6 diff --git a/upcoming-release-notes/2124.md b/upcoming-release-notes/2124.md deleted file mode 100644 index 77a1dd19f70..00000000000 --- a/upcoming-release-notes/2124.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Enabling and formatting "viewLabels" button for custom reports page \ No newline at end of file diff --git a/upcoming-release-notes/2132.md b/upcoming-release-notes/2132.md deleted file mode 100644 index 78a90f225e0..00000000000 --- a/upcoming-release-notes/2132.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [jasonmichalski] ---- - -Fix net worth graph to show more detail in compact card view diff --git a/upcoming-release-notes/2134.md b/upcoming-release-notes/2134.md deleted file mode 100644 index de428dbadd1..00000000000 --- a/upcoming-release-notes/2134.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [Jackenmen] ---- - -Ask for confirmation when editing date of a locked transaction diff --git a/upcoming-release-notes/2136.md b/upcoming-release-notes/2136.md deleted file mode 100644 index 90a5e66c3b6..00000000000 --- a/upcoming-release-notes/2136.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -TypeScript: Add proper types to runHandler diff --git a/upcoming-release-notes/2138.md b/upcoming-release-notes/2138.md deleted file mode 100644 index 9fd1d8b80bf..00000000000 --- a/upcoming-release-notes/2138.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [kstockk] ---- - -Add cleared column in csv export diff --git a/upcoming-release-notes/2142.md b/upcoming-release-notes/2142.md deleted file mode 100644 index e443cc99adc..00000000000 --- a/upcoming-release-notes/2142.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Fixing TypeScript issues when enabling `strictFunctionTypes` (pt.4). diff --git a/upcoming-release-notes/2144.md b/upcoming-release-notes/2144.md deleted file mode 100644 index d03b7b0ce7d..00000000000 --- a/upcoming-release-notes/2144.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [jasonmichalski] ---- - -Fix when pressing Enter adds an extra split transaction when no split remains diff --git a/upcoming-release-notes/2151.md b/upcoming-release-notes/2151.md deleted file mode 100644 index d8f80fd7382..00000000000 --- a/upcoming-release-notes/2151.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Features -authors: [NikxDa] ---- - -Add "Distribute" button to distribute remaining split amount across empty splits. diff --git a/upcoming-release-notes/2153.md b/upcoming-release-notes/2153.md deleted file mode 100644 index 8fab8116d45..00000000000 --- a/upcoming-release-notes/2153.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Reorganize tableGraph files for custom reports. diff --git a/upcoming-release-notes/2163.md b/upcoming-release-notes/2163.md deleted file mode 100644 index 2d7313306ba..00000000000 --- a/upcoming-release-notes/2163.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [ScottFries, blakegearin, carkom] ---- - -Add ability to import categories from CSV \ No newline at end of file diff --git a/upcoming-release-notes/2168.md b/upcoming-release-notes/2168.md deleted file mode 100644 index 8362cc10cf6..00000000000 --- a/upcoming-release-notes/2168.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Add api tests for payees and transactions diff --git a/upcoming-release-notes/2169.md b/upcoming-release-notes/2169.md deleted file mode 100644 index 5a98cc427f9..00000000000 --- a/upcoming-release-notes/2169.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 7 diff --git a/upcoming-release-notes/2170.md b/upcoming-release-notes/2170.md deleted file mode 100644 index c601b030498..00000000000 --- a/upcoming-release-notes/2170.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 8 diff --git a/upcoming-release-notes/2171.md b/upcoming-release-notes/2171.md deleted file mode 100644 index 68e4b45b2ee..00000000000 --- a/upcoming-release-notes/2171.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 9 diff --git a/upcoming-release-notes/2172.md b/upcoming-release-notes/2172.md deleted file mode 100644 index 0214401ffd5..00000000000 --- a/upcoming-release-notes/2172.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 10 diff --git a/upcoming-release-notes/2173.md b/upcoming-release-notes/2173.md deleted file mode 100644 index 6a0d206b0bd..00000000000 --- a/upcoming-release-notes/2173.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 11 diff --git a/upcoming-release-notes/2174.md b/upcoming-release-notes/2174.md deleted file mode 100644 index de09420e2d3..00000000000 --- a/upcoming-release-notes/2174.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Hide "show ..." checkboxes within menu for custom reports page. Introduce toggle switches. diff --git a/upcoming-release-notes/2176.md b/upcoming-release-notes/2176.md deleted file mode 100644 index 78f25d4c87a..00000000000 --- a/upcoming-release-notes/2176.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [rjwonder] ---- - -Update sync.ts with additionalInformation as last resort fallback to prevent Payee being empty diff --git a/upcoming-release-notes/2181.md b/upcoming-release-notes/2181.md deleted file mode 100644 index 7d835a7ae4c..00000000000 --- a/upcoming-release-notes/2181.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -migration: rename `nordigen_*` secrets to `gocardless_*` diff --git a/upcoming-release-notes/2182.md b/upcoming-release-notes/2182.md deleted file mode 100644 index 233bd0a47c9..00000000000 --- a/upcoming-release-notes/2182.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Electron-app app store (osx) release diff --git a/upcoming-release-notes/2184.md b/upcoming-release-notes/2184.md deleted file mode 100644 index 446130490ac..00000000000 --- a/upcoming-release-notes/2184.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 12 diff --git a/upcoming-release-notes/2185.md b/upcoming-release-notes/2185.md deleted file mode 100644 index 35bf6f7203a..00000000000 --- a/upcoming-release-notes/2185.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -eslint: no default exports - part 13 diff --git a/upcoming-release-notes/2186.md b/upcoming-release-notes/2186.md deleted file mode 100644 index a9b4cdfea69..00000000000 --- a/upcoming-release-notes/2186.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Revert to fix master: Add error Page for special accounts in Mobile diff --git a/upcoming-release-notes/2188.md b/upcoming-release-notes/2188.md deleted file mode 100644 index 8029cdb4e41..00000000000 --- a/upcoming-release-notes/2188.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [zachwhelchel,duplaja,lancepick,latetedemelon] ---- - -Add option to link an account with SimpleFIN for syncing transactions. diff --git a/upcoming-release-notes/2190.md b/upcoming-release-notes/2190.md deleted file mode 100644 index 0e78c730bdf..00000000000 --- a/upcoming-release-notes/2190.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -electron: move back from WebSockets to IPC for internal communications. This should improve the stability of the desktop app. diff --git a/upcoming-release-notes/2191.md b/upcoming-release-notes/2191.md deleted file mode 100644 index 810ec372769..00000000000 --- a/upcoming-release-notes/2191.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [Marethyu1] ---- - -Allow case insensitive ynab5 import for special 'starting balance' payee diff --git a/upcoming-release-notes/2192.md b/upcoming-release-notes/2192.md deleted file mode 100644 index ff341b26d62..00000000000 --- a/upcoming-release-notes/2192.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Fix table graph rendering issue for custom reports. diff --git a/upcoming-release-notes/2195.md b/upcoming-release-notes/2195.md deleted file mode 100644 index 597a969a7a5..00000000000 --- a/upcoming-release-notes/2195.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -Add missing borders in report budget table diff --git a/upcoming-release-notes/2196.md b/upcoming-release-notes/2196.md deleted file mode 100644 index 8ef2f5e0a80..00000000000 --- a/upcoming-release-notes/2196.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -Improve report budget pie chart colors diff --git a/upcoming-release-notes/2199.md b/upcoming-release-notes/2199.md deleted file mode 100644 index 7fa7eaa4f12..00000000000 --- a/upcoming-release-notes/2199.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -rules: add 'no rules' message and always show the rules table (even if no rules exist) diff --git a/upcoming-release-notes/2202.md b/upcoming-release-notes/2202.md deleted file mode 100644 index dec7a570033..00000000000 --- a/upcoming-release-notes/2202.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [subnut] ---- - -Fix site.webmanifest to make Actual installable as a Chromium PWA diff --git a/upcoming-release-notes/2204.md b/upcoming-release-notes/2204.md deleted file mode 100644 index 34922bfefe6..00000000000 --- a/upcoming-release-notes/2204.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [HansiWursti] ---- - -Re implemented the mobile Account Error Page introduced in #2114 and reverted in #2186 \ No newline at end of file diff --git a/upcoming-release-notes/2206.md b/upcoming-release-notes/2206.md deleted file mode 100644 index 67a9ce9cdcb..00000000000 --- a/upcoming-release-notes/2206.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [shall0pass] ---- - -Add crossorigin assignment to use credentials for PWA with authentication diff --git a/upcoming-release-notes/2207.md b/upcoming-release-notes/2207.md deleted file mode 100644 index 4db717c4aed..00000000000 --- a/upcoming-release-notes/2207.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix multi-autocomplete in rules page causing crashes diff --git a/upcoming-release-notes/2208.md b/upcoming-release-notes/2208.md deleted file mode 100644 index f34ec8acf62..00000000000 --- a/upcoming-release-notes/2208.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -ESLint to enforce Actual's useNavigate hook diff --git a/upcoming-release-notes/2209.md b/upcoming-release-notes/2209.md deleted file mode 100644 index 2f7915f4ff0..00000000000 --- a/upcoming-release-notes/2209.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -electron: split the build script in 2x parts to fix it failing when no code signing cert is provided (PRs from forks). diff --git a/upcoming-release-notes/2212.md b/upcoming-release-notes/2212.md deleted file mode 100644 index f70d4f74fba..00000000000 --- a/upcoming-release-notes/2212.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -TypeScript: fix some `strictNullChecks: true` issues diff --git a/upcoming-release-notes/2214.md b/upcoming-release-notes/2214.md deleted file mode 100644 index b1ae5edaea1..00000000000 --- a/upcoming-release-notes/2214.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [HansiWursti] ---- - -Mobile - Disable Save Button while editing Transaction Fields - Fixes #2203 \ No newline at end of file diff --git a/upcoming-release-notes/2215.md b/upcoming-release-notes/2215.md deleted file mode 100644 index 72fea77c44f..00000000000 --- a/upcoming-release-notes/2215.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -removing old OFX parser code in favor of the new one diff --git a/upcoming-release-notes/2217.md b/upcoming-release-notes/2217.md deleted file mode 100644 index e9b0ec86b0c..00000000000 --- a/upcoming-release-notes/2217.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [carkom] ---- - -vite hosting regression fix. adds hosting on network back onto vite. diff --git a/upcoming-release-notes/2224.md b/upcoming-release-notes/2224.md deleted file mode 100644 index 5b2274ea93f..00000000000 --- a/upcoming-release-notes/2224.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [twk3] ---- - -Change the vite chunk filename hash to closely match our webpack syntax diff --git a/upcoming-release-notes/2228.md b/upcoming-release-notes/2228.md deleted file mode 100644 index e12eb6fb1f7..00000000000 --- a/upcoming-release-notes/2228.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -TypeScript: fix some `strictNullChecks: true` issues (pt.2) diff --git a/upcoming-release-notes/2230.md b/upcoming-release-notes/2230.md deleted file mode 100644 index d5b213e5086..00000000000 --- a/upcoming-release-notes/2230.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -typescript: enable strict mode in most files; disable it in files that still need to be fixed diff --git a/upcoming-release-notes/2233.md b/upcoming-release-notes/2233.md deleted file mode 100644 index 6886dc6603d..00000000000 --- a/upcoming-release-notes/2233.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [twk3] ---- - -Restore ability to use console.log in vite diff --git a/upcoming-release-notes/2238.md b/upcoming-release-notes/2238.md deleted file mode 100644 index a38296a0bc2..00000000000 --- a/upcoming-release-notes/2238.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -GoCardless: fix sync not working if `additionalInformation` fallback field is null diff --git a/upcoming-release-notes/2244.md b/upcoming-release-notes/2244.md deleted file mode 100644 index cd2905e18b7..00000000000 --- a/upcoming-release-notes/2244.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Moving entities and updating existing for custom reports. Also creating a new entity for the custom report data. diff --git a/upcoming-release-notes/2245.md b/upcoming-release-notes/2245.md deleted file mode 100644 index 207f5355152..00000000000 --- a/upcoming-release-notes/2245.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Adding compact identifier to all of the graphs and cleaning them up. Plus other staging bits for saving custom reports. diff --git a/upcoming-release-notes/2246.md b/upcoming-release-notes/2246.md deleted file mode 100644 index e3bf2978ef6..00000000000 --- a/upcoming-release-notes/2246.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [carkom] ---- - -Add schema and backend functionality for custom reports. This is to enable saving reports in a future PR. diff --git a/upcoming-release-notes/2247.md b/upcoming-release-notes/2247.md deleted file mode 100644 index 5aea7a9d7b2..00000000000 --- a/upcoming-release-notes/2247.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -TypeScript: making some files comply with strict TS. diff --git a/upcoming-release-notes/2249.md b/upcoming-release-notes/2249.md deleted file mode 100644 index b5607975078..00000000000 --- a/upcoming-release-notes/2249.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [carkom] ---- - -Fixing a bug where custom reports table graph crashes due to a type mismatch error. diff --git a/upcoming-release-notes/2250.md b/upcoming-release-notes/2250.md deleted file mode 100644 index fd7227e5c07..00000000000 --- a/upcoming-release-notes/2250.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Updated Github issues template to direct bug reports to the support channel (Discord) diff --git a/upcoming-release-notes/2251.md b/upcoming-release-notes/2251.md deleted file mode 100644 index 145d3e73021..00000000000 --- a/upcoming-release-notes/2251.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix 'delete file' button always deleting the cloud file. diff --git a/upcoming-release-notes/2252.md b/upcoming-release-notes/2252.md deleted file mode 100644 index 55ae4bea2bc..00000000000 --- a/upcoming-release-notes/2252.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [MatissJanis] ---- - -Allow un-reconcile (unlock) transactions by clicking on the lock icon diff --git a/upcoming-release-notes/2253.md b/upcoming-release-notes/2253.md deleted file mode 100644 index 3306f0dce4d..00000000000 --- a/upcoming-release-notes/2253.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Upgrading prettier, fixing the issues and enabling it for jsx files too diff --git a/upcoming-release-notes/2254.md b/upcoming-release-notes/2254.md deleted file mode 100644 index b4c01bb4301..00000000000 --- a/upcoming-release-notes/2254.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Making custom reports code more compact and efficient. diff --git a/upcoming-release-notes/2255.md b/upcoming-release-notes/2255.md deleted file mode 100644 index 0ab94f27b77..00000000000 --- a/upcoming-release-notes/2255.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Code clean-up: removing unused variables diff --git a/upcoming-release-notes/2256.md b/upcoming-release-notes/2256.md deleted file mode 100644 index 02d56a0c79f..00000000000 --- a/upcoming-release-notes/2256.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Code clean-up: removing unused variables (pt.2) diff --git a/upcoming-release-notes/2258.md b/upcoming-release-notes/2258.md deleted file mode 100644 index 372cadd501f..00000000000 --- a/upcoming-release-notes/2258.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [carkom] ---- - -Adding compact elements to custom reports. diff --git a/upcoming-release-notes/2260.md b/upcoming-release-notes/2260.md deleted file mode 100644 index 8f4a3b44571..00000000000 --- a/upcoming-release-notes/2260.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [MatissJanis] ---- - -Refactored cash flow report from `victory` to `recharts` diff --git a/upcoming-release-notes/2261.md b/upcoming-release-notes/2261.md deleted file mode 100644 index df088a48bc0..00000000000 --- a/upcoming-release-notes/2261.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -Fix color in schedule before/after weekend selection diff --git a/upcoming-release-notes/2263.md b/upcoming-release-notes/2263.md deleted file mode 100644 index 0241b5010eb..00000000000 --- a/upcoming-release-notes/2263.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -Use useSingleActiveEditForm hook in mobile budget table diff --git a/upcoming-release-notes/2268.md b/upcoming-release-notes/2268.md deleted file mode 100644 index ab28971febb..00000000000 --- a/upcoming-release-notes/2268.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [joel-jeremy] ---- - -Update vite / swc / ts versions. diff --git a/upcoming-release-notes/2273.md b/upcoming-release-notes/2273.md deleted file mode 100644 index 598e376db58..00000000000 --- a/upcoming-release-notes/2273.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix 'uncategorized transactions' flashing in the header on page load diff --git a/upcoming-release-notes/2276.md b/upcoming-release-notes/2276.md deleted file mode 100644 index 23f2f53735d..00000000000 --- a/upcoming-release-notes/2276.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [edleeman17] ---- - -Fix link for registering with GoCardless diff --git a/upcoming-release-notes/2277.md b/upcoming-release-notes/2277.md deleted file mode 100644 index 9cd912ce52f..00000000000 --- a/upcoming-release-notes/2277.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [twk3] ---- - -Fix a missing ref param warning for forwardRef diff --git a/upcoming-release-notes/2278.md b/upcoming-release-notes/2278.md deleted file mode 100644 index 5d98621d10e..00000000000 --- a/upcoming-release-notes/2278.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [twk3] ---- - -Fix 'false' passed as title in import transactions modal diff --git a/upcoming-release-notes/2279.md b/upcoming-release-notes/2279.md deleted file mode 100644 index 7ff921b8537..00000000000 --- a/upcoming-release-notes/2279.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [youngcw] ---- - -Fix same account sort_order when creating a demo budget diff --git a/upcoming-release-notes/2281.md b/upcoming-release-notes/2281.md deleted file mode 100644 index fa8bd708e89..00000000000 --- a/upcoming-release-notes/2281.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [shall0pass] ---- - -Fix database entry when applying goal templates diff --git a/upcoming-release-notes/2282.md b/upcoming-release-notes/2282.md deleted file mode 100644 index e7283528a11..00000000000 --- a/upcoming-release-notes/2282.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [shall0pass] ---- - -Cleanup utility: Update goal target after end of month cleanup tool is activated for 'source' categories diff --git a/upcoming-release-notes/2284.md b/upcoming-release-notes/2284.md deleted file mode 100644 index 7b946dee481..00000000000 --- a/upcoming-release-notes/2284.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [joel-jeremy] ---- - -Add Off Budget category label to mobile transactions page diff --git a/upcoming-release-notes/2287.md b/upcoming-release-notes/2287.md deleted file mode 100644 index 5c4954092ea..00000000000 --- a/upcoming-release-notes/2287.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [youngcw] ---- - -Update vrt instructions diff --git a/upcoming-release-notes/2308.md b/upcoming-release-notes/2308.md deleted file mode 100644 index bba8f394711..00000000000 --- a/upcoming-release-notes/2308.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [MatissJanis] ---- - -Fix GoCardless bank sync breaking after a flaky SimpleFin db migration. From c8d326d24b653bb8a9485808bc351a797fb43289 Mon Sep 17 00:00:00 2001 From: Neil <55785687+carkom@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:09:27 -0800 Subject: [PATCH 2/7] Custom Reports - split out hidden categories from offbudget (#2302) * Add Toggles * budget table * testing * updates * updates * fixes * updates * fix Menu * lint fixes * fix keybindings * revert budget menu changes * notes * remove default exports * fixes * disabled fix * add style option * lint fix * remove css * lint fixes * color updates * merge menu with togglemenu * host * menu fixes * fix regression * remove host * adjustments * work * fix hidden filters * merge fixes * adjustments * updates * fix uncat table values * fixes * notes * title change * Adjust showHide selector --- .../components/reports/CategorySelector.tsx | 42 ++++++++------ .../src/components/reports/ReportOptions.ts | 46 ++++++--------- .../src/components/reports/ReportSidebar.jsx | 39 ++++++++----- .../reports/reports/CategorySpending.jsx | 1 - .../reports/reports/CustomReport.jsx | 23 +++++--- .../reports/reports/CustomReportCard.jsx | 4 ++ .../spreadsheets/custom-spreadsheet.ts | 57 +++++++++++++------ .../reports/spreadsheets/filterEmptyRows.ts | 19 +++++++ .../reports/spreadsheets/filterHiddenItems.ts | 39 +++++++++++-- .../spreadsheets/grouped-spreadsheet.ts | 47 +++++++++------ .../reports/spreadsheets/makeQuery.ts | 25 +------- .../reports/spreadsheets/recalculate.ts | 31 ++++++++-- .../loot-core/src/types/models/reports.d.ts | 13 +++-- upcoming-release-notes/2302.md | 6 ++ 14 files changed, 250 insertions(+), 142 deletions(-) create mode 100644 packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts create mode 100644 upcoming-release-notes/2302.md diff --git a/packages/desktop-client/src/components/reports/CategorySelector.tsx b/packages/desktop-client/src/components/reports/CategorySelector.tsx index ef096bd8e7c..e7574a0f62e 100644 --- a/packages/desktop-client/src/components/reports/CategorySelector.tsx +++ b/packages/desktop-client/src/components/reports/CategorySelector.tsx @@ -22,36 +22,41 @@ import { GraphButton } from './GraphButton'; type CategorySelectorProps = { categoryGroups: Array; - categories: Array; selectedCategories: CategoryListProps['items']; setSelectedCategories: (selectedCategories: CategoryEntity[]) => null; + showHiddenCategories?: boolean; }; export function CategorySelector({ categoryGroups, - categories, selectedCategories, setSelectedCategories, + showHiddenCategories = true, }: CategorySelectorProps) { const [uncheckedHidden, setUncheckedHidden] = useState(false); + const filteredGroup = (categoryGroup: CategoryGroupEntity) => { + return categoryGroup.categories.filter(f => { + return showHiddenCategories || !f.hidden ? true : false; + }); + }; + + const selectAll: CategoryEntity[] = []; + categoryGroups.map(categoryGroup => + filteredGroup(categoryGroup).map(category => selectAll.push(category)), + ); const selectedCategoryMap = useMemo( () => selectedCategories.map(selected => selected.id), [selectedCategories], ); - const allCategoriesSelected = categories.every(category => + const allCategoriesSelected = selectAll.every(category => selectedCategoryMap.includes(category.id), ); - const allCategoriesUnselected = !categories.some(category => + const allCategoriesUnselected = !selectAll.some(category => selectedCategoryMap.includes(category.id), ); - const selectAll: CategoryEntity[] = []; - categoryGroups.map(categoryGroup => - categoryGroup.categories.map(category => selectAll.push(category)), - ); - return ( {categoryGroups && categoryGroups.map(categoryGroup => { - const allCategoriesInGroupSelected = categoryGroup.categories.every( - category => - selectedCategories.some( - selectedCategory => selectedCategory.id === category.id, - ), + const allCategoriesInGroupSelected = filteredGroup( + categoryGroup, + ).every(category => + selectedCategories.some( + selectedCategory => selectedCategory.id === category.id, + ), ); - const noCategorySelected = categoryGroup.categories.every( + const noCategorySelected = filteredGroup(categoryGroup).every( category => !selectedCategories.some( selectedCategory => selectedCategory.id === category.id, @@ -155,7 +161,7 @@ export function CategorySelector({ const selectedCategoriesExcludingGroupCategories = selectedCategories.filter( selectedCategory => - !categoryGroup.categories.some( + !filteredGroup(categoryGroup).some( groupCategory => groupCategory.id === selectedCategory.id, ), @@ -167,7 +173,7 @@ export function CategorySelector({ } else { setSelectedCategories( selectedCategoriesExcludingGroupCategories.concat( - categoryGroup.categories, + filteredGroup(categoryGroup), ), ); } @@ -189,7 +195,7 @@ export function CategorySelector({ paddingLeft: 10, }} > - {categoryGroup.categories.map(category => { + {filteredGroup(categoryGroup).map(category => { const isChecked = selectedCategories.some( selectedCategory => selectedCategory.id === category.id, ); diff --git a/packages/desktop-client/src/components/reports/ReportOptions.ts b/packages/desktop-client/src/components/reports/ReportOptions.ts index 7cc13b86e27..3a0c1fe6911 100644 --- a/packages/desktop-client/src/components/reports/ReportOptions.ts +++ b/packages/desktop-client/src/components/reports/ReportOptions.ts @@ -16,7 +16,8 @@ export const defaultState: CustomReportEntity = { groupBy: 'Category', balanceType: 'Payment', showEmpty: false, - showOffBudgetHidden: false, + showOffBudget: false, + showHiddenCategories: false, showUncategorized: false, graphType: 'BarGraph', startDate, @@ -77,7 +78,9 @@ const intervalOptions = [ export type QueryDataEntity = { date: string; category: string; + categoryHidden: boolean; categoryGroup: string; + categoryGroupHidden: boolean; account: string; accountOffBudget: boolean; payee: string; @@ -85,10 +88,7 @@ export type QueryDataEntity = { amount: number; }; -export type UncategorizedEntity = Pick< - CategoryEntity, - 'name' | 'id' | 'hidden' -> & { +export type UncategorizedEntity = Pick & { /* When looking at uncategorized and hidden transactions we need a way to group them. To do this we give them a unique @@ -104,7 +104,6 @@ export type UncategorizedEntity = Pick< const uncategorizedCategory: UncategorizedEntity = { name: 'Uncategorized', - id: undefined, uncategorized_id: '1', hidden: false, is_off_budget: false, @@ -113,7 +112,6 @@ const uncategorizedCategory: UncategorizedEntity = { }; const transferCategory: UncategorizedEntity = { name: 'Transfers', - id: undefined, uncategorized_id: '2', hidden: false, is_off_budget: false, @@ -122,7 +120,6 @@ const transferCategory: UncategorizedEntity = { }; const offBudgetCategory: UncategorizedEntity = { name: 'Off Budget', - id: undefined, uncategorized_id: '3', hidden: false, is_off_budget: true, @@ -144,26 +141,19 @@ const uncategorizedGroup: UncategorizedGroupEntity = { categories: [uncategorizedCategory, transferCategory, offBudgetCategory], }; -export const categoryLists = ( - showOffBudgetHidden: boolean, - showUncategorized: boolean, - categories: { list: CategoryEntity[]; grouped: CategoryGroupEntity[] }, -) => { - const categoryList = showUncategorized - ? [ - ...categories.list.filter(f => showOffBudgetHidden || !f.hidden), - uncategorizedCategory, - transferCategory, - offBudgetCategory, - ] - : categories.list; - const categoryGroup = showUncategorized - ? [ - ...categories.grouped.filter(f => showOffBudgetHidden || !f.hidden), - uncategorizedGroup, - ] - : categories.grouped; - return [categoryList, categoryGroup] as const; +export const categoryLists = (categories: { + list: CategoryEntity[]; + grouped: CategoryGroupEntity[]; +}) => { + const categoryList = [ + ...categories.list, + uncategorizedCategory, + offBudgetCategory, + transferCategory, + ]; + + const categoryGroup = [...categories.grouped, uncategorizedGroup]; + return [categoryList, categoryGroup.filter(group => group !== null)] as const; }; export const groupBySelections = ( diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.jsx b/packages/desktop-client/src/components/reports/ReportSidebar.jsx index 9d0fffd3582..4fba2b21781 100644 --- a/packages/desktop-client/src/components/reports/ReportSidebar.jsx +++ b/packages/desktop-client/src/components/reports/ReportSidebar.jsx @@ -35,7 +35,8 @@ export function ReportSidebar({ setMode, setIsDateStatic, setShowEmpty, - setShowOffBudgetHidden, + setShowOffBudget, + setShowHiddenCategories, setShowUncategorized, setSelectedCategories, onChangeDates, @@ -266,10 +267,12 @@ export function ReportSidebar({ { if (type === 'show-hidden-categories') { - setShowOffBudgetHidden( - !customReportItems.showOffBudgetHidden, + setShowHiddenCategories( + !customReportItems.showHiddenCategories, ); - } else if (type === 'show-empty-rows') { + } else if (type === 'show-off-budget') { + setShowOffBudget(!customReportItems.showOffBudget); + } else if (type === 'show-empty-items') { setShowEmpty(!customReportItems.showEmpty); } else if (type === 'show-uncategorized') { setShowUncategorized( @@ -279,20 +282,26 @@ export function ReportSidebar({ }} items={[ { - name: 'show-empty-rows', - text: 'Show Empty Rows', + name: 'show-hidden-categories', + text: 'Show hidden categories', + tooltip: 'Show hidden categories', + toggle: customReportItems.showHiddenCategories, + }, + { + name: 'show-empty-items', + text: 'Show empty rows', tooltip: 'Show rows that are zero or blank', toggle: customReportItems.showEmpty, }, { - name: 'show-hidden-categories', - text: 'Show Off Budget', - tooltip: 'Show off budget accounts and hidden categories', - toggle: customReportItems.showOffBudgetHidden, + name: 'show-off-budget', + text: 'Show off budget', + tooltip: 'Show off budget accounts', + toggle: customReportItems.showOffBudget, }, { name: 'show-uncategorized', - text: 'Show Uncategorized', + text: 'Show uncategorized', tooltip: 'Show uncategorized transactions', toggle: customReportItems.showUncategorized, }, @@ -440,10 +449,14 @@ export function ReportSidebar({ }} > { + return customReportItems.showHiddenCategories || !f.hidden + ? true + : false; + })} selectedCategories={customReportItems.selectedCategories} setSelectedCategories={setSelectedCategories} + showHiddenCategories={customReportItems.showHiddenCategories} /> )} diff --git a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx index a8e7cf79a25..13e195e525d 100644 --- a/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx +++ b/packages/desktop-client/src/components/reports/reports/CategorySpending.jsx @@ -144,7 +144,6 @@ export function CategorySpending() { > !categoryGroup.is_income, )} diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx index c182ec38479..ff49e56cb4c 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx @@ -69,8 +69,9 @@ export function CustomReport() { const [groupBy, setGroupBy] = useState(loadReport.groupBy); const [balanceType, setBalanceType] = useState(loadReport.balanceType); const [showEmpty, setShowEmpty] = useState(loadReport.showEmpty); - const [showOffBudgetHidden, setShowOffBudgetHidden] = useState( - loadReport.showOffBudgetHidden, + const [showOffBudget, setShowOffBudget] = useState(loadReport.showOffBudget); + const [showHiddenCategories, setShowHiddenCategories] = useState( + loadReport.showHiddenCategories, ); const [showUncategorized, setShowUncategorized] = useState( loadReport.showUncategorized, @@ -131,7 +132,8 @@ export function CustomReport() { conditions: filters, conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, balanceTypeOp, }); @@ -147,7 +149,8 @@ export function CustomReport() { filters, conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, graphType, ]); @@ -162,7 +165,8 @@ export function CustomReport() { conditions: filters, conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, groupBy, balanceTypeOp, @@ -183,7 +187,8 @@ export function CustomReport() { filters, conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, graphType, ]); @@ -198,7 +203,8 @@ export function CustomReport() { groupBy, balanceType, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, graphType, startDate, @@ -259,7 +265,8 @@ export function CustomReport() { setMode={setMode} setIsDateStatic={setIsDateStatic} setShowEmpty={setShowEmpty} - setShowOffBudgetHidden={setShowOffBudgetHidden} + setShowOffBudget={setShowOffBudget} + setShowHiddenCategories={setShowHiddenCategories} setShowUncategorized={setShowUncategorized} setSelectedCategories={setSelectedCategories} onChangeDates={onChangeDates} diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx index 6a1e6457262..09f73d3ead9 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReportCard.jsx @@ -27,6 +27,10 @@ export function CustomReportCard(reports) { groupBy, balanceTypeOp: 'totalDebts', categories, + showEmpty: false, + showOffBudget: false, + showHiddenCategories: false, + showUncategorized: false, }); }, [startDate, endDate, categories]); const data = useReport('default', getGraphData); diff --git a/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts index 5c7c848f351..e0dc578a58a 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts @@ -16,6 +16,7 @@ import { import { categoryLists, groupBySelections } from '../ReportOptions'; import { calculateLegend } from './calculateLegend'; +import { filterEmptyRows } from './filterEmptyRows'; import { filterHiddenItems } from './filterHiddenItems'; import { makeQuery } from './makeQuery'; import { recalculate } from './recalculate'; @@ -28,14 +29,15 @@ export type createCustomSpreadsheetProps = { conditions: RuleConditionEntity[]; conditionsOp: string; showEmpty: boolean; - showOffBudgetHidden: boolean; + showOffBudget: boolean; + showHiddenCategories: boolean; showUncategorized: boolean; groupBy?: string; balanceTypeOp?: string; payees?: PayeeEntity[]; accounts?: AccountEntity[]; setDataCheck?: (value: boolean) => void; - graphType: string; + graphType?: string; }; export function createCustomSpreadsheet({ @@ -46,7 +48,8 @@ export function createCustomSpreadsheet({ conditions = [], conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, groupBy, balanceTypeOp, @@ -55,15 +58,10 @@ export function createCustomSpreadsheet({ setDataCheck, graphType, }: createCustomSpreadsheetProps) { - const [categoryList, categoryGroup] = categoryLists( - showOffBudgetHidden, - showUncategorized, - categories, - ); + const [categoryList, categoryGroup] = categoryLists(categories); - const categoryFilter = (categoryList || []).filter( + const categoryFilter = (categories.list || []).filter( category => - !category.hidden && selectedCategories && selectedCategories.some( selectedCategory => selectedCategory.id === category.id, @@ -94,7 +92,6 @@ export function createCustomSpreadsheet({ 'assets', startDate, endDate, - showOffBudgetHidden, selectedCategories, categoryFilter, conditionsOpKey, @@ -106,7 +103,6 @@ export function createCustomSpreadsheet({ 'debts', startDate, endDate, - showOffBudgetHidden, selectedCategories, categoryFilter, conditionsOpKey, @@ -128,15 +124,31 @@ export function createCustomSpreadsheet({ groupByList.map(item => { let stackAmounts = 0; - const monthAssets = filterHiddenItems(item, assets) + const monthAssets = filterHiddenItems( + item, + assets, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) .filter( - asset => asset.date === month && asset[groupByLabel] === item.id, + asset => + asset.date === month && asset[groupByLabel] === (item.id ?? null), ) .reduce((a, v) => (a = a + v.amount), 0); perMonthAssets += monthAssets; - const monthDebts = filterHiddenItems(item, debts) - .filter(debt => debt.date === month && debt[groupByLabel] === item.id) + const monthDebts = filterHiddenItems( + item, + debts, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) + .filter( + debt => + debt.date === month && debt[groupByLabel] === (item.id ?? null), + ) .reduce((a, v) => (a = a + v.amount), 0); perMonthDebts += monthDebts; @@ -168,11 +180,20 @@ export function createCustomSpreadsheet({ }, []); const calcData = groupByList.map(item => { - const calc = recalculate({ item, months, assets, debts, groupByLabel }); + const calc = recalculate({ + item, + months, + assets, + debts, + groupByLabel, + showOffBudget, + showHiddenCategories, + showUncategorized, + }); return { ...calc }; }); const calcDataFiltered = calcData.filter(i => - !showEmpty ? i[balanceTypeOp] !== 0 : true, + filterEmptyRows(showEmpty, i, balanceTypeOp), ); const legend = calculateLegend( diff --git a/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts b/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts new file mode 100644 index 00000000000..45efef476f4 --- /dev/null +++ b/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts @@ -0,0 +1,19 @@ +// @ts-strict-ignore +import { type GroupedEntity } from 'loot-core/types/models/reports'; + +export function filterEmptyRows( + showEmpty: boolean, + data: GroupedEntity, + balanceTypeOp: string, +): boolean { + let showHide; + if (balanceTypeOp === 'totalTotals') { + showHide = + data['totalDebts'] !== 0 || + data['totalAssets'] !== 0 || + data['totalTotals'] !== 0; + } else { + showHide = data[balanceTypeOp] !== 0; + } + return !showEmpty ? showHide : true; +} diff --git a/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts b/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts index 3b7d2dee3d8..f3e76a95824 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/filterHiddenItems.ts @@ -6,19 +6,46 @@ import { export function filterHiddenItems( item: UncategorizedEntity, data: QueryDataEntity[], + showOffBudget?: boolean, + showHiddenCategories?: boolean, + showUncategorized?: boolean, ) { - return data.filter(asset => { + const showHide = data + .filter(e => + !showHiddenCategories + ? e.categoryHidden === false && e.categoryGroupHidden === false + : true, + ) + .filter(f => + showOffBudget + ? showUncategorized + ? //true,true + true + : //true,false + f.category !== null || + f.accountOffBudget !== false || + f.transferAccount !== null + : showUncategorized + ? //false, true + f.accountOffBudget === false && f.transferAccount === null + : //false false + f.category !== null && + f.accountOffBudget === false && + f.transferAccount === null, + ); + + return showHide.filter(query => { if (!item.uncategorized_id) { return true; } const isTransfer = item.is_transfer - ? asset.transferAccount - : !asset.transferAccount; - const isHidden = item.has_category ? true : !asset.category; + ? query.transferAccount + : !query.transferAccount; + const isHidden = item.has_category ? true : !query.category; const isOffBudget = item.is_off_budget - ? asset.accountOffBudget - : !asset.accountOffBudget; + ? query.accountOffBudget + : !query.accountOffBudget; return isTransfer && isHidden && isOffBudget; }); diff --git a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts index 93883b21788..0adc9b11936 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts @@ -3,10 +3,12 @@ import { runQuery } from 'loot-core/src/client/query-helpers'; import { send } from 'loot-core/src/platform/client/fetch'; import * as monthUtils from 'loot-core/src/shared/months'; import { integerToAmount } from 'loot-core/src/shared/util'; +import { type GroupedEntity } from 'loot-core/types/models/reports'; import { categoryLists } from '../ReportOptions'; import { type createCustomSpreadsheetProps } from './custom-spreadsheet'; +import { filterEmptyRows } from './filterEmptyRows'; import { filterHiddenItems } from './filterHiddenItems'; import { makeQuery } from './makeQuery'; import { recalculate } from './recalculate'; @@ -19,19 +21,15 @@ export function createGroupedSpreadsheet({ conditions = [], conditionsOp, showEmpty, - showOffBudgetHidden, + showOffBudget, + showHiddenCategories, showUncategorized, balanceTypeOp, }: createCustomSpreadsheetProps) { - const [categoryList, categoryGroup] = categoryLists( - showOffBudgetHidden, - showUncategorized, - categories, - ); + const [categoryList, categoryGroup] = categoryLists(categories); - const categoryFilter = (categoryList || []).filter( + const categoryFilter = (categories.list || []).filter( category => - !category.hidden && selectedCategories && selectedCategories.some( selectedCategory => selectedCategory.id === category.id, @@ -54,7 +52,6 @@ export function createGroupedSpreadsheet({ 'assets', startDate, endDate, - showOffBudgetHidden, selectedCategories, categoryFilter, conditionsOpKey, @@ -66,7 +63,6 @@ export function createGroupedSpreadsheet({ 'debts', startDate, endDate, - showOffBudgetHidden, selectedCategories, categoryFilter, conditionsOpKey, @@ -77,7 +73,7 @@ export function createGroupedSpreadsheet({ const months = monthUtils.rangeInclusive(startDate, endDate); - const groupedData = categoryGroup.map( + const groupedData: GroupedEntity[] = categoryGroup.map( group => { let totalAssets = 0; let totalDebts = 0; @@ -87,16 +83,30 @@ export function createGroupedSpreadsheet({ let groupedDebts = 0; group.categories.forEach(item => { - const monthAssets = filterHiddenItems(item, assets) + const monthAssets = filterHiddenItems( + item, + assets, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) .filter( - asset => asset.date === month && asset.category === item.id, + asset => + asset.date === month && asset.category === (item.id ?? null), ) .reduce((a, v) => (a = a + v.amount), 0); groupedAssets += monthAssets; - const monthDebts = filterHiddenItems(item, debts) + const monthDebts = filterHiddenItems( + item, + debts, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) .filter( - debts => debts.date === month && debts.category === item.id, + debts => + debts.date === month && debts.category === (item.id ?? null), ) .reduce((a, v) => (a = a + v.amount), 0); groupedDebts += monthDebts; @@ -122,6 +132,9 @@ export function createGroupedSpreadsheet({ assets, debts, groupByLabel: 'category', + showOffBudget, + showHiddenCategories, + showUncategorized, }); return { ...calc }; }); @@ -134,14 +147,14 @@ export function createGroupedSpreadsheet({ totalTotals: integerToAmount(totalAssets + totalDebts), monthData, categories: stackedCategories.filter(i => - !showEmpty ? i[balanceTypeOp] !== 0 : true, + filterEmptyRows(showEmpty, i, balanceTypeOp), ), }; }, [startDate, endDate], ); setData( - groupedData.filter(i => (!showEmpty ? i[balanceTypeOp] !== 0 : true)), + groupedData.filter(i => filterEmptyRows(showEmpty, i, balanceTypeOp)), ); }; } diff --git a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts index 02e748f6d28..9598aac0294 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts @@ -5,35 +5,12 @@ export function makeQuery( name: string, startDate: string, endDate: string, - showOffBudgetHidden: boolean, selectedCategories: CategoryEntity[], categoryFilter: CategoryEntity[], conditionsOpKey: string, filters: unknown[], ) { const query = q('transactions') - .filter( - //Show Offbudget and hidden categories - !showOffBudgetHidden && { - $and: [ - { - 'account.offbudget': false, - $or: [ - { - 'category.hidden': false, - category: null, - }, - ], - }, - ], - $or: [ - { - 'payee.transfer_acct.offbudget': true, - 'payee.transfer_acct': null, - }, - ], - }, - ) //Apply Category_Selector .filter( selectedCategories && { @@ -74,7 +51,9 @@ export function makeQuery( .select([ { date: { $month: '$date' } }, { category: { $id: '$category.id' } }, + { categoryHidden: { $id: '$category.hidden' } }, { categoryGroup: { $id: '$category.group.id' } }, + { categoryGroupHidden: { $id: '$category.group.hidden' } }, { account: { $id: '$account.id' } }, { accountOffBudget: { $id: '$account.offbudget' } }, { payee: { $id: '$payee.id' } }, diff --git a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts index a8486d5b3c3..ee914401c8e 100644 --- a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts +++ b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts @@ -13,6 +13,9 @@ type recalculateProps = { assets: QueryDataEntity[]; debts: QueryDataEntity[]; groupByLabel: string; + showOffBudget?: boolean; + showHiddenCategories?: boolean; + showUncategorized?: boolean; }; export function recalculate({ @@ -21,19 +24,39 @@ export function recalculate({ assets, debts, groupByLabel, + showOffBudget, + showHiddenCategories, + showUncategorized, }: recalculateProps) { let totalAssets = 0; let totalDebts = 0; const monthData = months.reduce((arr, month) => { const last = arr.length === 0 ? null : arr[arr.length - 1]; - const monthAssets = filterHiddenItems(item, assets) - .filter(asset => asset.date === month && asset[groupByLabel] === item.id) + const monthAssets = filterHiddenItems( + item, + assets, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) + .filter( + asset => + asset.date === month && asset[groupByLabel] === (item.id ?? null), + ) .reduce((a, v) => (a = a + v.amount), 0); totalAssets += monthAssets; - const monthDebts = filterHiddenItems(item, debts) - .filter(debt => debt.date === month && debt[groupByLabel] === item.id) + const monthDebts = filterHiddenItems( + item, + debts, + showOffBudget, + showHiddenCategories, + showUncategorized, + ) + .filter( + debt => debt.date === month && debt[groupByLabel] === (item.id ?? null), + ) .reduce((a, v) => (a = a + v.amount), 0); totalDebts += monthDebts; diff --git a/packages/loot-core/src/types/models/reports.d.ts b/packages/loot-core/src/types/models/reports.d.ts index 588b475a35d..6ca225631b8 100644 --- a/packages/loot-core/src/types/models/reports.d.ts +++ b/packages/loot-core/src/types/models/reports.d.ts @@ -6,7 +6,8 @@ export interface CustomReportEntity { groupBy: string; balanceType: string; showEmpty: boolean; - showOffBudgetHidden: boolean; + showOffBudget: boolean; + showHiddenCategories: boolean; showUncategorized: boolean; graphType: string; selectedCategories; @@ -21,12 +22,12 @@ export interface CustomReportEntity { } export interface GroupedEntity { - data: DataEntity[]; + data?: DataEntity[]; monthData: DataEntity[]; - groupedData: DataEntity[]; - legend: LegendEntity[]; - startDate: string; - endDate: string; + groupedData?: DataEntity[]; + legend?: LegendEntity[]; + startDate?: string; + endDate?: string; totalDebts: number; totalAssets: number; totalTotals: number; diff --git a/upcoming-release-notes/2302.md b/upcoming-release-notes/2302.md new file mode 100644 index 00000000000..d1b92da11a4 --- /dev/null +++ b/upcoming-release-notes/2302.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [carkom] +--- + +In custom reports: separating "show offbudget" filter to split out hidden categories from offbudget. \ No newline at end of file From 39e7f2598b0f531eedbe5cb90e0f5ac6e722e621 Mon Sep 17 00:00:00 2001 From: youngcw Date: Fri, 2 Feb 2024 13:09:53 -0700 Subject: [PATCH 3/7] fix budget header collapsed colors (#2313) * fix budget header collapsed colors * note --- .../budget/rollover/budgetsummary/BudgetSummary.tsx | 2 +- upcoming-release-notes/2313.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/2313.md diff --git a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx index 209ab5e31be..d612fe8ed82 100644 --- a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx @@ -191,7 +191,7 @@ export function BudgetSummary({ alignItems: 'center', padding: '10px 20px', justifyContent: 'space-between', - backgroundColor: theme.tableHeaderBackground, + backgroundColor: theme.tableBackground, borderTop: '1px solid ' + theme.tableBorder, }} > diff --git a/upcoming-release-notes/2313.md b/upcoming-release-notes/2313.md new file mode 100644 index 00000000000..54aebf7f187 --- /dev/null +++ b/upcoming-release-notes/2313.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [youngcw] +--- + +Fix collapsed budget header colors From 5914469b116faf1ab164251f449eb633f03ce74b Mon Sep 17 00:00:00 2001 From: Neil <55785687+carkom@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:10:24 -0800 Subject: [PATCH 4/7] Convert FiltersMenu to Typescript (part 1) (#2231) * migration work * notes * typecheck * typecheck fixes * fixes * merge fixes * typecheck updates * review fixes --- .../src/components/filters/AppliedFilters.tsx | 55 +++++ .../filters/CompactFiltersButton.tsx | 7 +- .../components/filters/FilterExpression.tsx | 108 +++++++++ .../src/components/filters/FiltersButton.tsx | 7 +- .../src/components/filters/FiltersMenu.jsx | 223 +----------------- .../src/components/filters/OpButton.tsx | 36 +++ .../src/components/filters/SavedFilters.jsx | 32 +-- .../components/filters/subfieldFromFilter.ts | 27 +++ .../components/filters/subfieldToOptions.ts | 34 +++ .../components/filters/updateFilterReducer.ts | 34 +++ .../src/components/reports/Header.jsx | 3 +- .../reports/reports/CustomReport.jsx | 2 +- packages/loot-core/src/types/models/rule.d.ts | 41 ++-- upcoming-release-notes/2231.md | 6 + 14 files changed, 351 insertions(+), 264 deletions(-) create mode 100644 packages/desktop-client/src/components/filters/AppliedFilters.tsx create mode 100644 packages/desktop-client/src/components/filters/FilterExpression.tsx create mode 100644 packages/desktop-client/src/components/filters/OpButton.tsx create mode 100644 packages/desktop-client/src/components/filters/subfieldFromFilter.ts create mode 100644 packages/desktop-client/src/components/filters/subfieldToOptions.ts create mode 100644 packages/desktop-client/src/components/filters/updateFilterReducer.ts create mode 100644 upcoming-release-notes/2231.md diff --git a/packages/desktop-client/src/components/filters/AppliedFilters.tsx b/packages/desktop-client/src/components/filters/AppliedFilters.tsx new file mode 100644 index 00000000000..1f5ead431ea --- /dev/null +++ b/packages/desktop-client/src/components/filters/AppliedFilters.tsx @@ -0,0 +1,55 @@ +import React from 'react'; + +import { type RuleConditionEntity } from 'loot-core/types/models'; + +import { View } from '../common/View'; + +import { FilterExpression } from './FilterExpression'; +import { CondOpMenu } from './SavedFilters'; + +type AppliedFiltersProps = { + filters: RuleConditionEntity[]; + onUpdate: ( + filter: RuleConditionEntity, + newFilter: RuleConditionEntity, + ) => RuleConditionEntity; + onDelete: (filter: RuleConditionEntity) => void; + conditionsOp: string; + onCondOpChange: () => void; +}; + +export function AppliedFilters({ + filters, + onUpdate, + onDelete, + conditionsOp, + onCondOpChange, +}: AppliedFiltersProps) { + return ( + + + {filters.map((filter: RuleConditionEntity, i: number) => ( + onUpdate(filter, newFilter)} + onDelete={() => onDelete(filter)} + /> + ))} + + ); +} diff --git a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx index 8848ce8bd04..7da1dc8fa7d 100644 --- a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx @@ -1,14 +1,9 @@ -// @ts-strict-ignore import React from 'react'; import { SvgFilter } from '../../icons/v1'; import { Button } from '../common/Button'; -type CompactFiltersButtonProps = { - onClick: (newValue) => void; -}; - -export function CompactFiltersButton({ onClick }: CompactFiltersButtonProps) { +export function CompactFiltersButton({ onClick }: { onClick: () => void }) { return ( + + {editing && ( + setEditing(false)} + /> + )} + + ); +} diff --git a/packages/desktop-client/src/components/filters/FiltersButton.tsx b/packages/desktop-client/src/components/filters/FiltersButton.tsx index f6f420f4889..c2491b95132 100644 --- a/packages/desktop-client/src/components/filters/FiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/FiltersButton.tsx @@ -1,14 +1,9 @@ -// @ts-strict-ignore import React from 'react'; import { SvgSettingsSliderAlternate } from '../../icons/v2'; import { Button } from '../common/Button'; -type FiltersButtonProps = { - onClick: (newValue) => void; -}; - -export function FiltersButton({ onClick }: FiltersButtonProps) { +export function FiltersButton({ onClick }: { onClick: () => void }) { return ( - ); -} - -function updateFilterReducer(state, action) { - switch (action.type) { - case 'set-op': { - const type = FIELD_TYPES.get(state.field); - let value = state.value; - if ( - (type === 'id' || type === 'string') && - (action.op === 'contains' || - action.op === 'is' || - action.op === 'doesNotContain' || - action.op === 'isNot') - ) { - // Clear out the value if switching between contains or - // is/oneof for the id or string type - value = null; - } - return { ...state, op: action.op, value }; - } - case 'set-value': { - const { value } = makeValue(action.value, { - type: FIELD_TYPES.get(state.field), - }); - return { ...state, value }; - } - default: - throw new Error(`Unhandled action type: ${action.type}`); - } -} - function ConfigureField({ field, initialSubfield = field, @@ -478,7 +383,7 @@ export function FilterButton({ onApply, compact, hover }) { ); } -function FilterEditor({ field, op, value, options, onSave, onClose }) { +export function FilterEditor({ field, op, value, options, onSave, onClose }) { const [state, dispatch] = useReducer( (state, action) => { switch (action.type) { @@ -508,119 +413,3 @@ function FilterEditor({ field, op, value, options, onSave, onClose }) { /> ); } - -function FilterExpression({ - field: originalField, - customName, - op, - value, - options, - stage, - style, - onChange, - onDelete, -}) { - const [editing, setEditing] = useState(false); - - const field = subfieldFromFilter({ field: originalField, value }); - - return ( - - - - {editing && ( - setEditing(false)} - /> - )} - - ); -} - -export function AppliedFilters({ - filters, - editingFilter, - onUpdate, - onDelete, - conditionsOp, - onCondOpChange, -}) { - return ( - - - {filters.map((filter, i) => ( - onUpdate(filter, newFilter)} - onDelete={() => onDelete(filter)} - /> - ))} - - ); -} diff --git a/packages/desktop-client/src/components/filters/OpButton.tsx b/packages/desktop-client/src/components/filters/OpButton.tsx new file mode 100644 index 00000000000..f061cb0c81a --- /dev/null +++ b/packages/desktop-client/src/components/filters/OpButton.tsx @@ -0,0 +1,36 @@ +import React from 'react'; + +import { friendlyOp } from 'loot-core/src/shared/rules'; + +import { type CSSProperties, theme } from '../../style'; +import { Button } from '../common/Button'; + +type OpButtonProps = { + op: string; + selected: boolean; + onClick: () => void; + style?: CSSProperties; +}; + +export function OpButton({ op, selected, style, onClick }: OpButtonProps) { + return ( + + ); +} diff --git a/packages/desktop-client/src/components/filters/SavedFilters.jsx b/packages/desktop-client/src/components/filters/SavedFilters.jsx index 497ccd14ef6..1fd0be01155 100644 --- a/packages/desktop-client/src/components/filters/SavedFilters.jsx +++ b/packages/desktop-client/src/components/filters/SavedFilters.jsx @@ -14,7 +14,7 @@ import { FormField, FormLabel } from '../forms'; import { FieldSelect } from '../modals/EditRule'; import { GenericInput } from '../util/GenericInput'; -import { AppliedFilters } from './FiltersMenu'; +import { AppliedFilters } from './AppliedFilters'; function FilterMenu({ onClose, filterId, onFilterMenuSelect }) { return ( @@ -285,21 +285,21 @@ function SavedFilterMenuButton({ } export function CondOpMenu({ conditionsOp, onCondOpChange, filters }) { - return ( - filters.length > 1 && ( - - onCondOpChange(value, filters)} - /> - of: - - ) + return filters.length > 1 ? ( + + onCondOpChange(value, filters)} + /> + of: + + ) : ( + ); } diff --git a/packages/desktop-client/src/components/filters/subfieldFromFilter.ts b/packages/desktop-client/src/components/filters/subfieldFromFilter.ts new file mode 100644 index 00000000000..d4f60dfe202 --- /dev/null +++ b/packages/desktop-client/src/components/filters/subfieldFromFilter.ts @@ -0,0 +1,27 @@ +import { type RuleConditionEntity } from 'loot-core/src/types/models'; + +export function subfieldFromFilter({ + field, + options, + value, +}: RuleConditionEntity) { + if (field === 'date') { + if (typeof value === 'string') { + if (value.length === 7) { + return 'month'; + } else if (value.length === 4) { + return 'year'; + } + } + } + + if (field === 'amount') { + if (options && options.inflow) { + return 'amount-inflow'; + } else if (options && options.outflow) { + return 'amount-outflow'; + } + } + + return field; +} diff --git a/packages/desktop-client/src/components/filters/subfieldToOptions.ts b/packages/desktop-client/src/components/filters/subfieldToOptions.ts new file mode 100644 index 00000000000..60ac78746e8 --- /dev/null +++ b/packages/desktop-client/src/components/filters/subfieldToOptions.ts @@ -0,0 +1,34 @@ +import { type RuleConditionEntity } from 'loot-core/src/types/models'; + +export function subfieldToOptions(field: string, subfield: string) { + let setOptions: RuleConditionEntity['options']; + switch (field) { + case 'amount': + switch (subfield) { + case 'amount-inflow': + setOptions = { inflow: true }; + break; + case 'amount-outflow': + setOptions = { outflow: true }; + break; + default: + break; + } + break; + case 'date': + switch (subfield) { + case 'month': + setOptions = { month: true }; + break; + case 'year': + setOptions = { year: true }; + break; + default: + break; + } + break; + default: + break; + } + return setOptions; +} diff --git a/packages/desktop-client/src/components/filters/updateFilterReducer.ts b/packages/desktop-client/src/components/filters/updateFilterReducer.ts new file mode 100644 index 00000000000..8bbca3ce850 --- /dev/null +++ b/packages/desktop-client/src/components/filters/updateFilterReducer.ts @@ -0,0 +1,34 @@ +import { makeValue, FIELD_TYPES } from 'loot-core/src/shared/rules'; +import { type RuleConditionEntity } from 'loot-core/src/types/models'; + +export function updateFilterReducer( + state: { field: string; value: string | string[] | number | boolean | null }, + action: RuleConditionEntity, +) { + switch (action.type) { + case 'set-op': { + const type = FIELD_TYPES.get(state.field); + let value = state.value; + if ( + (type === 'id' || type === 'string') && + (action.op === 'contains' || + action.op === 'is' || + action.op === 'doesNotContain' || + action.op === 'isNot') + ) { + // Clear out the value if switching between contains or + // is/oneof for the id or string type + value = null; + } + return { ...state, op: action.op, value }; + } + case 'set-value': { + const { value } = makeValue(action.value, { + type: FIELD_TYPES.get(state.field), + }); + return { ...state, value }; + } + default: + throw new Error(`Unhandled action type: ${action.type}`); + } +} diff --git a/packages/desktop-client/src/components/reports/Header.jsx b/packages/desktop-client/src/components/reports/Header.jsx index e3231f8d696..aaad46b7d05 100644 --- a/packages/desktop-client/src/components/reports/Header.jsx +++ b/packages/desktop-client/src/components/reports/Header.jsx @@ -8,7 +8,8 @@ import { Button } from '../common/Button'; import { ButtonLink } from '../common/ButtonLink'; import { Select } from '../common/Select'; import { View } from '../common/View'; -import { FilterButton, AppliedFilters } from '../filters/FiltersMenu'; +import { AppliedFilters } from '../filters/AppliedFilters'; +import { FilterButton } from '../filters/FiltersMenu'; export function validateStart(allMonths, start, end) { const earliest = allMonths[allMonths.length - 1].name; diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx index ff49e56cb4c..a9bf769cb0b 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReport.jsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReport.jsx @@ -18,7 +18,7 @@ import { AlignedText } from '../../common/AlignedText'; import { Block } from '../../common/Block'; import { Text } from '../../common/Text'; import { View } from '../../common/View'; -import { AppliedFilters } from '../../filters/FiltersMenu'; +import { AppliedFilters } from '../../filters/AppliedFilters'; import { PrivacyFilter } from '../../PrivacyFilter'; import { ChooseGraph } from '../ChooseGraph'; import { Header } from '../Header'; diff --git a/packages/loot-core/src/types/models/rule.d.ts b/packages/loot-core/src/types/models/rule.d.ts index 6b9eb147f55..ce2b384f665 100644 --- a/packages/loot-core/src/types/models/rule.d.ts +++ b/packages/loot-core/src/types/models/rule.d.ts @@ -9,24 +9,31 @@ export interface RuleEntity { tombstone?: boolean; } +export type RuleConditionOp = + | 'is' + | 'isNot' + | 'oneOf' + | 'notOneOf' + | 'isapprox' + | 'isbetween' + | 'gt' + | 'gte' + | 'lt' + | 'lte' + | 'contains' + | 'doesNotContain'; + export interface RuleConditionEntity { - field: unknown; - op: - | 'is' - | 'isNot' - | 'oneOf' - | 'notOneOf' - | 'isapprox' - | 'isbetween' - | 'gt' - | 'gte' - | 'lt' - | 'lte' - | 'contains' - | 'doesNotContain'; - value: unknown; - options?: unknown; - conditionsOp?: unknown; + field?: string; + op?: RuleConditionOp; + value?: string | string[] | number | boolean; + options?: { + inflow?: boolean; + outflow?: boolean; + month?: boolean; + year?: boolean; + }; + conditionsOp?: string; type?: string; customName?: string; } diff --git a/upcoming-release-notes/2231.md b/upcoming-release-notes/2231.md new file mode 100644 index 00000000000..fd198f7f20a --- /dev/null +++ b/upcoming-release-notes/2231.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [carkom] +--- + +Split out mega-file FiltersMenu.jsx into separate elements and converted them all to Typescript. From 3daff4381f2e78fd97d54aa7f93c8bff3b354b4c Mon Sep 17 00:00:00 2001 From: DHRUV RAMDEV Date: Sat, 3 Feb 2024 01:40:36 +0530 Subject: [PATCH 5/7] feat: Don't allow duplicate cat-groups in budget (#2262) * feat: Don't allow duplicate cat-groups in budget * Add release notes * fix: error message * pass group instead of name for accurate error message * improve error message --- .../src/components/budget/index.tsx | 17 +++++++++++++++++ packages/loot-core/src/server/db/index.ts | 11 +++++++++++ upcoming-release-notes/2262.md | 6 ++++++ 3 files changed, 34 insertions(+) create mode 100644 upcoming-release-notes/2262.md diff --git a/packages/desktop-client/src/components/budget/index.tsx b/packages/desktop-client/src/components/budget/index.tsx index 3363140e6f7..f22090b1f76 100644 --- a/packages/desktop-client/src/components/budget/index.tsx +++ b/packages/desktop-client/src/components/budget/index.tsx @@ -313,7 +313,24 @@ function BudgetInner(props: BudgetProps) { } }; + const groupNameAlreadyExistsNotification = group => { + props.addNotification({ + type: 'error', + message: `A ${group.hidden ? 'hidden ' : ''}’${group.name}’ category group already exists.`, + }); + }; + const onSaveGroup = async group => { + const categories = await props.getCategories(); + const matchingGroups = categories.grouped + .filter(g => g.name.toUpperCase() === group.name.toUpperCase()) + .filter(g => group.id === 'new' || group.id !== g.id); + + if (matchingGroups.length > 0) { + groupNameAlreadyExistsNotification(matchingGroups[0]); + return; + } + if (group.id === 'new') { const id = await props.createGroup(group.name); setIsAddingGroup(false); diff --git a/packages/loot-core/src/server/db/index.ts b/packages/loot-core/src/server/db/index.ts index 3a359f06590..65cae417ca7 100644 --- a/packages/loot-core/src/server/db/index.ts +++ b/packages/loot-core/src/server/db/index.ts @@ -304,6 +304,17 @@ export async function getCategoriesGrouped(): Promise< } export async function insertCategoryGroup(group) { + // Don't allow duplicate group + const existingGroup = await first( + `SELECT id, name, hidden FROM category_groups WHERE UPPER(name) = ? and tombstone = 0 LIMIT 1`, + [group.name.toUpperCase()], + ); + if (existingGroup) { + throw new Error( + `A ${existingGroup.hidden ? 'hidden ' : ''}’${existingGroup.name}’ category group already exists.`, + ); + } + const lastGroup = await first(` SELECT sort_order FROM category_groups WHERE tombstone = 0 ORDER BY sort_order DESC, id DESC LIMIT 1 `); diff --git a/upcoming-release-notes/2262.md b/upcoming-release-notes/2262.md new file mode 100644 index 00000000000..e9bdf249069 --- /dev/null +++ b/upcoming-release-notes/2262.md @@ -0,0 +1,6 @@ +--- +category: Features +authors: [dhruvramdev] +--- + +Don't allow duplicate category groups \ No newline at end of file From 9fdffcc8e961ea09326243c42f824ca3555c1eaf Mon Sep 17 00:00:00 2001 From: Pedro Primor <32823033+pprimor@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:11:16 +0100 Subject: [PATCH 6/7] Change month picker hover background color (#2121) * Change month picker hover background color * Add release notes * Add updated screenshots from visual regression tests * Revert "Add updated screenshots from visual regression tests" This reverts commit d9d83b47898d2627c2c837ced79f70f7c71cef1f. * Update failing visual regression tests screenshots * Revert "Update failing visual regression tests screenshots" This reverts commit aaef0191910ec06d7d198127b2266ad90e50ac2b. --- .../desktop-client/src/components/budget/MonthPicker.tsx | 2 +- upcoming-release-notes/2121.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/2121.md diff --git a/packages/desktop-client/src/components/budget/MonthPicker.tsx b/packages/desktop-client/src/components/budget/MonthPicker.tsx index ca8b8adc090..0d1a108a713 100644 --- a/packages/desktop-client/src/components/budget/MonthPicker.tsx +++ b/packages/desktop-client/src/components/budget/MonthPicker.tsx @@ -126,7 +126,7 @@ export const MonthPicker = ({ }), ...(hovered && !selected && { - backgroundColor: 'rgba(100, 100, 100, .15)', + backgroundColor: theme.buttonBareBackgroundHover, }), ...(hovered && selected && { diff --git a/upcoming-release-notes/2121.md b/upcoming-release-notes/2121.md new file mode 100644 index 00000000000..02f5214b869 --- /dev/null +++ b/upcoming-release-notes/2121.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [pprimor] +--- + +Change the hover background color of the month picker range to match other buttons in the UI. From 6ae2047ab82f7175438735e4548d944d6a92ba7a Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Fri, 2 Feb 2024 20:38:57 +0000 Subject: [PATCH 7/7] :wrench: upgrade deprecated github actions (#2319) --- .github/actions/setup/action.yml | 4 ++-- .github/workflows/build.yml | 14 +++++++------- .github/workflows/check.yml | 10 +++++----- .github/workflows/codeql.yml | 6 +++--- .github/workflows/e2e-test.yml | 12 +++++++----- .github/workflows/electron-master.yml | 4 ++-- .github/workflows/electron-pr.yml | 4 ++-- .github/workflows/issues-feature-implemented.yml | 4 ++-- .github/workflows/release-notes.yml | 2 +- .github/workflows/size-compare.yml | 4 ++-- upcoming-release-notes/2319.md | 6 ++++++ 11 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 upcoming-release-notes/2319.md diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index fbf55830d6a..78e0bd4c4fc 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,11 +4,11 @@ runs: using: composite steps: - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18.16.0 - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: '**/node_modules' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6636d56d741..ea0ba68a4e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: api: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Build API @@ -29,7 +29,7 @@ jobs: - name: Create package tgz run: cd packages/api && yarn pack && mv package.tgz actual-api.tgz - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: actual-api path: packages/api/actual-api.tgz @@ -37,7 +37,7 @@ jobs: crdt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Build CRDT @@ -45,7 +45,7 @@ jobs: - name: Create package tgz run: cd packages/crdt && yarn pack && mv package.tgz actual-crdt.tgz - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: actual-crdt path: packages/crdt/actual-crdt.tgz @@ -53,18 +53,18 @@ jobs: web: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Build Web run: ./bin/package-browser - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: actual-web path: packages/desktop-client/build - name: Upload Build Stats - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build-stats path: packages/desktop-client/build-stats diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f10284c1d8e..d2cee1445af 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,7 +14,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Lint @@ -22,7 +22,7 @@ jobs: typecheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Typecheck @@ -30,7 +30,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Test @@ -40,8 +40,8 @@ jobs: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '19' - name: Check migrations diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index efb3ea85c2e..20780a56257 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,14 +22,14 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: javascript - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: '/language:javascript' diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index c55cd17adf9..9c5127795d0 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -16,7 +16,7 @@ jobs: outputs: netlify_url: ${{ steps.netlify.outputs.url }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Wait for Netlify build to finish @@ -33,19 +33,20 @@ jobs: container: image: mcr.microsoft.com/playwright:v1.41.1-jammy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Run E2E Tests on Netlify URL run: yarn e2e env: E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: desktop-client-test-results path: packages/desktop-client/test-results/ retention-days: 30 + overwrite: true vrt: name: Visual regression needs: netlify @@ -53,16 +54,17 @@ jobs: container: image: mcr.microsoft.com/playwright:v1.41.1-jammy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup - name: Run VRT Tests on Netlify URL run: yarn vrt env: E2E_START_URL: ${{ needs.netlify.outputs.netlify_url }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: desktop-client-test-results path: packages/desktop-client/test-results/ retention-days: 30 + overwrite: true diff --git a/.github/workflows/electron-master.yml b/.github/workflows/electron-master.yml index 0fe0dd17025..fc0a57f3a6f 100644 --- a/.github/workflows/electron-master.yml +++ b/.github/workflows/electron-master.yml @@ -26,7 +26,7 @@ jobs: - macos-latest runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - if: ${{ startsWith(matrix.os, 'windows') }} run: pip.exe install setuptools - if: ${{ ! startsWith(matrix.os, 'windows') }} @@ -41,7 +41,7 @@ jobs: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: actual-electron-${{ matrix.os }} path: | diff --git a/.github/workflows/electron-pr.yml b/.github/workflows/electron-pr.yml index 8a5f2a98682..58e1eda7c4f 100644 --- a/.github/workflows/electron-pr.yml +++ b/.github/workflows/electron-pr.yml @@ -24,7 +24,7 @@ jobs: - macos-latest runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - if: ${{ startsWith(matrix.os, 'windows') }} run: pip.exe install setuptools - if: ${{ ! startsWith(matrix.os, 'windows') }} @@ -34,7 +34,7 @@ jobs: - name: Build Electron run: ./bin/package-electron - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: actual-electron-${{ matrix.os }} path: | diff --git a/.github/workflows/issues-feature-implemented.yml b/.github/workflows/issues-feature-implemented.yml index 4c8bf1ea7f2..a7ab00ade48 100644 --- a/.github/workflows/issues-feature-implemented.yml +++ b/.github/workflows/issues-feature-implemented.yml @@ -24,8 +24,8 @@ jobs: runs-on: ubuntu-latest steps: # This is not a security concern because we have approved & merged the PR - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '19' - name: Handle feature requests diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 4a5bd4c22c1..53d744265a8 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check release notes if: startsWith(github.head_ref, 'release/') == false uses: actualbudget/actions/release-notes/check@main diff --git a/.github/workflows/size-compare.yml b/.github/workflows/size-compare.yml index 2db0cd588b7..eeec796c1a8 100644 --- a/.github/workflows/size-compare.yml +++ b/.github/workflows/size-compare.yml @@ -46,7 +46,7 @@ jobs: echo "Build failed on PR branch or ${{github.base_ref}}" exit 1 - name: Download build artifact from ${{github.base_ref}} - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 id: pr-build with: branch: ${{github.base_ref}} @@ -55,7 +55,7 @@ jobs: path: base - name: Download build artifact from PR - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: pr: ${{github.event.pull_request.number}} workflow: build.yml diff --git a/upcoming-release-notes/2319.md b/upcoming-release-notes/2319.md new file mode 100644 index 00000000000..1b33fc3848f --- /dev/null +++ b/upcoming-release-notes/2319.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MatissJanis] +--- + +Upgrade deprecated github CI actions