Skip to content

A local-first personal finance app

:sparkles: (dashboards) making "all widget" button always visible (#3588)

Matiss Janis Aboltinsbdeb19424bd3
diff --git a/packages/desktop-client/src/components/reports/Overview.tsx b/packages/desktop-client/src/components/reports/Overview.tsx
index 82c2f38fca..36692aea01 100644
--- a/packages/desktop-client/src/components/reports/Overview.tsx
+++ b/packages/desktop-client/src/components/reports/Overview.tsx
@@ -351,7 +351,7 @@ export function Overview() {
>
{currentBreakpoint === 'desktop' && (
<>
- {isEditing ? (
+ {isDashboardsFeatureEnabled && (
<>
<Button
ref={triggerRef}
@@ -361,12 +361,6 @@ export function Overview() {
>
<Trans>Add new widget</Trans>
</Button>
- <Button
- isDisabled={isImporting}
- onPress={() => setIsEditing(false)}
- >
- <Trans>Finish editing dashboard</Trans>
- </Button>
<Popover
triggerRef={triggerRef}
@@ -440,24 +434,30 @@ export function Overview() {
/>
</Popover>
</>
+ )}
+
+ {isEditing ? (
+ <Button
+ isDisabled={isImporting}
+ onPress={() => setIsEditing(false)}
+ >
+ <Trans>Finish editing dashboard</Trans>
+ </Button>
+ ) : isDashboardsFeatureEnabled ? (
+ <Button
+ isDisabled={isImporting}
+ onPress={() => setIsEditing(true)}
+ >
+ <Trans>Edit dashboard</Trans>
+ </Button>
) : (
- <>
- <Button
- variant="primary"
- isDisabled={isImporting}
- onPress={() => navigate('/reports/custom')}
- >
- <Trans>Create new custom report</Trans>
- </Button>
- {isDashboardsFeatureEnabled && (
- <Button
- isDisabled={isImporting}
- onPress={() => setIsEditing(true)}
- >
- <Trans>Edit dashboard</Trans>
- </Button>
- )}
- </>
+ <Button
+ variant="primary"
+ isDisabled={isImporting}
+ onPress={() => navigate('/reports/custom')}
+ >
+ <Trans>Create new custom report</Trans>
+ </Button>
)}
{isDashboardsFeatureEnabled && (
diff --git a/upcoming-release-notes/3588.md b/upcoming-release-notes/3588.md
new file mode 100644
index 0000000000..35b7376209
--- /dev/null
+++ b/upcoming-release-notes/3588.md
@@ -0,0 +1,6 @@
+---
+category: Enhancements
+authors: [MatissJanis]
+---
+
+Dashboards: make "add widgets" button always visible.