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

This commit is contained in:
Matiss Janis Aboltins
2024-10-07 21:07:58 +01:00
committed by GitHub
parent 5369494925
commit bdeb19424b
2 changed files with 30 additions and 24 deletions

View File

@@ -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 && (

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [MatissJanis]
---
Dashboards: make "add widgets" button always visible.