diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index c072312b1c7b..08a5dc94804e 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -38,6 +38,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `cloudWatchBatchQueries` | Runs CloudWatch metrics queries as separate batches | | | `annotationPermissionUpdate` | Change the way annotation permissions work by scoping them to folders and dashboards. | Yes | | `dashboardScene` | Enables dashboard rendering using scenes for all roles | Yes | +| `dashboardNewLayouts` | Enables new dashboard layouts | Yes | | `dashboardDefaultLayoutSelector` | Enables default layout selector in dashboard settings | Yes | | `alertingQueryOptimization` | Optimizes eligible queries in order to reduce load on datasources | | | `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes | @@ -87,7 +88,6 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `faroDatasourceSelector` | Enable the data source selector within the Frontend Apps section of the Frontend Observability | | `externalServiceAccounts` | Automatic service account and token setup for plugins | | `annotationsClustering` | Enables annotation clustering and switches to refactored annotation code | -| `dashboardNewLayouts` | Enables new dashboard layouts | | `dashboardFiltersOverview` | Enables the dashboard filters overview pane | | `feedbackButton` | Enables the feedback button in the dashboard edit sidebar | | `pdfTables` | Enables generating table data as PDF in reporting | diff --git a/e2e-playwright/alerting-suite/saved-searches.spec.ts b/e2e-playwright/alerting-suite/saved-searches.spec.ts index 53a206289fe0..a340db405b99 100644 --- a/e2e-playwright/alerting-suite/saved-searches.spec.ts +++ b/e2e-playwright/alerting-suite/saved-searches.spec.ts @@ -8,6 +8,7 @@ test.use({ alertingListViewV2: true, alertingFilterV2: true, alertingSavedSearches: true, + dashboardNewLayouts: false, }, }); diff --git a/e2e-playwright/dashboard-cujs/scope-redirect.spec.ts b/e2e-playwright/dashboard-cujs/scope-redirect.spec.ts index 4bf38abc84a9..8a5e456d5c9b 100644 --- a/e2e-playwright/dashboard-cujs/scope-redirect.spec.ts +++ b/e2e-playwright/dashboard-cujs/scope-redirect.spec.ts @@ -9,6 +9,7 @@ test.use({ groupByVariable: true, reloadDashboardsOnParamsChange: true, useScopesNavigationEndpoint: true, + dashboardNewLayouts: false, }, }); diff --git a/e2e-playwright/panels-suite/annotations-clustering.spec.ts b/e2e-playwright/panels-suite/annotations-clustering.spec.ts index 58e23e4678d1..123c93b26368 100644 --- a/e2e-playwright/panels-suite/annotations-clustering.spec.ts +++ b/e2e-playwright/panels-suite/annotations-clustering.spec.ts @@ -60,7 +60,10 @@ const ALERT_ANNOTATIONS_COUNTS = { }, }; -test.use({ viewport: { width: 1000, height: 1840 }, featureToggles: { annotationsClustering: true } }); +test.use({ + viewport: { width: 1000, height: 1840 }, + featureToggles: { annotationsClustering: true, dashboardNewLayouts: false }, +}); test.describe('Panels test: Clustering', { tag: ['@panels', '@annotations'] }, () => { test.describe('width: 1000', () => { diff --git a/e2e-playwright/panels-suite/canvas-scene.spec.ts b/e2e-playwright/panels-suite/canvas-scene.spec.ts index 427c75989152..78aa4612d3aa 100644 --- a/e2e-playwright/panels-suite/canvas-scene.spec.ts +++ b/e2e-playwright/panels-suite/canvas-scene.spec.ts @@ -5,6 +5,7 @@ import { test, expect } from '@grafana/plugin-e2e'; test.use({ featureToggles: { canvasPanelPanZoom: true, + dashboardNewLayouts: false, }, }); test.describe('Canvas Panel - Scene Tests', () => { diff --git a/e2e-playwright/panels-suite/heatmap.spec.ts b/e2e-playwright/panels-suite/heatmap.spec.ts index 13822b60ab0e..ee6b82814457 100644 --- a/e2e-playwright/panels-suite/heatmap.spec.ts +++ b/e2e-playwright/panels-suite/heatmap.spec.ts @@ -37,6 +37,7 @@ test.describe('Panels test: Heatmap', { tag: ['@panels', '@heatmap'] }, () => { test.use({ featureToggles: { timeRangePan: true, + dashboardNewLayouts: false, }, }); diff --git a/e2e-playwright/various-suite/grafana-datasource-random-walk.spec.ts b/e2e-playwright/various-suite/grafana-datasource-random-walk.spec.ts index 15cb4d7bdd44..a9ec11418803 100644 --- a/e2e-playwright/various-suite/grafana-datasource-random-walk.spec.ts +++ b/e2e-playwright/various-suite/grafana-datasource-random-walk.spec.ts @@ -5,6 +5,7 @@ const test = base.extend({}); test.use({ featureToggles: { dashboardTemplates: true, + dashboardNewLayouts: false, }, }); diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index e77c65d4d591..f1eed6b0415a 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -410,7 +410,7 @@ export interface FeatureToggles { dashboardScene?: boolean; /** * Enables new dashboard layouts - * @default false + * @default true */ dashboardNewLayouts?: boolean; /** diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index e33b22b4ffac..e959b6fe2e5b 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -627,10 +627,10 @@ var ( { Name: "dashboardNewLayouts", Description: "Enables new dashboard layouts", - Stage: FeatureStagePublicPreview, + Stage: FeatureStageGeneralAvailability, FrontendOnly: false, // The restore backend feature changes behavior based on this flag Owner: grafanaDashboardsSquad, - Expression: "false", + Expression: "true", }, { Name: "dashboardDefaultLayoutSelector", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 0c38648770d8..bdc37a218bbf 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -77,7 +77,7 @@ Created,Name,Stage,Owner,requiresDevMode,RequiresRestart,FrontendOnly 2023-10-31,annotationPermissionUpdate,GA,@grafana/identity-access-team,false,false,false 2026-03-12,annotationsClustering,preview,@grafana/dataviz-squad,false,false,true 2023-11-13,dashboardScene,GA,@grafana/dashboards-squad,false,false,true -2024-10-23,dashboardNewLayouts,preview,@grafana/dashboards-squad,false,false,false +2024-10-23,dashboardNewLayouts,GA,@grafana/dashboards-squad,false,false,false 2026-03-19,dashboardDefaultLayoutSelector,GA,@grafana/dashboards-squad,false,false,true 2026-03-10,dashboardAssistantPopover,experimental,@grafana/dashboards-squad,false,false,true 2025-08-29,dashboardUndoRedo,experimental,@grafana/dashboards-squad,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 27a921b68b5d..50d97a67b21e 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -1481,14 +1481,17 @@ { "metadata": { "name": "dashboardNewLayouts", - "resourceVersion": "1771434338561", - "creationTimestamp": "2024-10-23T08:55:45Z" + "resourceVersion": "1775209187023", + "creationTimestamp": "2024-10-23T08:55:45Z", + "annotations": { + "grafana.app/updatedTimestamp": "2026-04-03 09:39:47.02364 +0000 UTC" + } }, "spec": { "description": "Enables new dashboard layouts", - "stage": "preview", + "stage": "GA", "codeowner": "@grafana/dashboards-squad", - "expression": "false" + "expression": "true" } }, { diff --git a/pkg/tests/apis/provisioning/client_test.go b/pkg/tests/apis/provisioning/client_test.go index 8a438e60f4bb..5ac0adfb85a5 100644 --- a/pkg/tests/apis/provisioning/client_test.go +++ b/pkg/tests/apis/provisioning/client_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/runtime/schema" - dashboardV1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1" + dashboardV2 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2" "github.com/grafana/grafana/pkg/registry/apis/provisioning/resources" ) @@ -22,24 +22,24 @@ func TestIntegrationProvisioning_Client(t *testing.T) { t.Run("dashboard client support", func(t *testing.T) { _, _, err := clients.ForResource(ctx, schema.GroupVersionResource{ - Group: dashboardV1.GROUP, - Version: dashboardV1.VERSION, + Group: dashboardV2.GROUP, + Version: dashboardV2.VERSION, Resource: "dashboards", }) require.NoError(t, err) - // With empty version, we should get the preferred version (v1beta1) + // With empty version, we should get the preferred version (v2) _, gvk, err := clients.ForResource(ctx, schema.GroupVersionResource{ - Group: dashboardV1.GROUP, + Group: dashboardV2.GROUP, Resource: "dashboards", }) require.NoError(t, err) - require.Equal(t, dashboardV1.VERSION, gvk.Version) + require.Equal(t, dashboardV2.VERSION, gvk.Version) require.Equal(t, "Dashboard", gvk.Kind) _, _, err = clients.ForKind(ctx, schema.GroupVersionKind{ - Group: dashboardV1.GROUP, - Version: dashboardV1.VERSION, + Group: dashboardV2.GROUP, + Version: dashboardV2.VERSION, Kind: "Dashboard", }) require.NoError(t, err) diff --git a/playwright.config.ts b/playwright.config.ts index 133c77887fdb..2e337175f954 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -43,6 +43,11 @@ export const baseConfig: PlaywrightTestConfig = { screenshot: 'only-on-failure', permissions: ['clipboard-read', 'clipboard-write'], provisioningRootDir: path.join(process.cwd(), process.env.PROV_DIR ?? 'conf/provisioning'), + // Preserve legacy dashboard layout behavior in E2E unless a test overrides this (shallow merge on + // `featureToggles` would otherwise drop toggles when a spec sets only a subset). + featureToggles: { + dashboardNewLayouts: false, + }, }, };