Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actualbudget/actual
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 110f0f7ce06b57ab0ebcb88c53a638643ebf2e4b
Choose a base ref
..
head repository: actualbudget/actual
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f9295b7bac79b635df74144c3d26182e7d42d047
Choose a head ref
Showing with 32 additions and 5 deletions.
  1. BIN ...top-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-1-chromium-linux.png
  2. BIN ...top-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-2-chromium-linux.png
  3. BIN ...top-client/e2e/schedules.test.js-snapshots/Schedules-checks-the-page-visuals-3-chromium-linux.png
  4. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-1-chromium-linux.png
  5. BIN ...hedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-10-chromium-linux.png
  6. BIN ...hedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-11-chromium-linux.png
  7. BIN ...hedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-12-chromium-linux.png
  8. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-2-chromium-linux.png
  9. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-3-chromium-linux.png
  10. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-4-chromium-linux.png
  11. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-5-chromium-linux.png
  12. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-6-chromium-linux.png
  13. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-7-chromium-linux.png
  14. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-8-chromium-linux.png
  15. BIN ...chedules-creates-a-new-schedule-posts-the-transaction-and-later-completes-it-9-chromium-linux.png
  16. +6 −0 packages/desktop-client/src/components/settings/Experimental.tsx
  17. +5 −0 packages/desktop-client/src/components/settings/Upcoming.tsx
  18. +1 −0 packages/desktop-client/src/hooks/useFeatureFlag.ts
  19. +4 −2 packages/loot-core/src/shared/util.test.ts
  20. +2 −2 packages/loot-core/src/shared/util.ts
  21. +2 −1 packages/loot-core/src/types/prefs.d.ts
  22. +6 −0 upcoming-release-notes/3651.md
  23. +6 −0 upcoming-release-notes/3676.md
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -116,6 +116,12 @@ export function ExperimentalFeatures() {
>
<Trans>Rule action templating</Trans>
</FeatureToggle>
<FeatureToggle
flag="upcomingLengthAdjustment"
feedbackLink="https://github.com/actualbudget/actual/issues/3660"
>
<Trans>Scheduled transaction upcoming length adjustment</Trans>
</FeatureToggle>
</View>
) : (
<Link
5 changes: 5 additions & 0 deletions packages/desktop-client/src/components/settings/Upcoming.tsx
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import { useLocation } from 'react-router-dom';

import { type SyncedPrefs } from 'loot-core/types/prefs';

import { useFeatureFlag } from '../../hooks/useFeatureFlag';
import { useSyncedPref } from '../../hooks/useSyncedPref';
import { Button } from '../common/Button2';
import { InfoBubble } from '../common/InfoBubble';
@@ -29,9 +30,13 @@ export function UpcomingLengthSettings() {
);
const upcomingLength = _upcomingLength || '7';

const enabled = useFeatureFlag('upcomingLengthAdjustment');

const location = useLocation();
const [expanded, setExpanded] = useState(location.hash === '#upcomingLength');

if (!enabled) return null;

return expanded ? (
<Setting
primaryAction={
1 change: 1 addition & 0 deletions packages/desktop-client/src/hooks/useFeatureFlag.ts
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ const DEFAULT_FEATURE_FLAG_STATE: Record<FeatureFlag, boolean> = {
spendingReport: false,
dashboards: false,
actionTemplating: false,
upcomingLengthAdjustment: false,
};

export function useFeatureFlag(name: FeatureFlag): boolean {
6 changes: 4 additions & 2 deletions packages/loot-core/src/shared/util.test.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,8 @@ describe('utility functions', () => {
expect(looselyParseAmount('3.45')).toBe(3.45);
// cant tell if this next case should be decimal or different format
// so we set as full numbers
expect(looselyParseAmount('3.456')).toBe(3456);
expect(looselyParseAmount('3.456')).toBe(3456); // the expected failing case
expect(looselyParseAmount('3.4500')).toBe(3.45);
expect(looselyParseAmount('3.45000')).toBe(3.45);
expect(looselyParseAmount('3.450000')).toBe(3.45);
expect(looselyParseAmount('3.4500000')).toBe(3.45);
@@ -20,7 +21,8 @@ describe('utility functions', () => {

test('looseParseAmount works with alternate formats', () => {
expect(looselyParseAmount('3,45')).toBe(3.45);
expect(looselyParseAmount('3,456')).toBe(3456);
expect(looselyParseAmount('3,456')).toBe(3456); //expected failing case
expect(looselyParseAmount('3,4500')).toBe(3.45);
expect(looselyParseAmount('3,45000')).toBe(3.45);
expect(looselyParseAmount('3,450000')).toBe(3.45);
expect(looselyParseAmount('3,4500000')).toBe(3.45);
4 changes: 2 additions & 2 deletions packages/loot-core/src/shared/util.ts
Original file line number Diff line number Diff line change
@@ -427,9 +427,9 @@ export function looselyParseAmount(amount: string) {
amount = amount.replace('(', '-').replace(')', '');
}

// Look for a decimal marker, then look for either 1-2 or 5-9 decimal places.
// Look for a decimal marker, then look for either 1-2 or 4-9 decimal places.
// This avoids matching against 3 places which may not actually be decimal
const m = amount.match(/[.,]([^.,]{5,9}|[^.,]{1,2})$/);
const m = amount.match(/[.,]([^.,]{4,9}|[^.,]{1,2})$/);
if (!m || m.index === undefined) {
return safeNumber(parseFloat(extractNumbers(amount)));
}
3 changes: 2 additions & 1 deletion packages/loot-core/src/types/prefs.d.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ export type FeatureFlag =
| 'reportBudget'
| 'goalTemplatesEnabled'
| 'spendingReport'
| 'actionTemplating';
| 'actionTemplating'
| 'upcomingLengthAdjustment';

/**
* Cross-device preferences. These sync across devices when they are changed.
6 changes: 6 additions & 0 deletions upcoming-release-notes/3651.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [ SamBobBarnes ]
---

Add feature flag for upcoming length adjustment setting.
6 changes: 6 additions & 0 deletions upcoming-release-notes/3676.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [youngcw]
---

Allow 4 decimal places in file import.