Skip to content

Commit

Permalink
✨ (dashboards) making "all widget" button always visible (#3588)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Oct 7, 2024
1 parent 5369494 commit bdeb194
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
48 changes: 24 additions & 24 deletions packages/desktop-client/src/components/reports/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export function Overview() {
>
{currentBreakpoint === 'desktop' && (
<>
{isEditing ? (
{isDashboardsFeatureEnabled && (
<>
<Button
ref={triggerRef}
Expand All @@ -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}
Expand Down Expand Up @@ -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 && (
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3588.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [MatissJanis]
---

Dashboards: make "add widgets" button always visible.

0 comments on commit bdeb194

Please sign in to comment.