Themes: Add new theme definitions behind feature toggle (#100129)

* create new toggle

* add survey link behind feature toggle

* fix translations

* better theme structure

* add all the themes back

* update matrix

* fix mars contrast

* fix color contrast probs with tron

* fix a11y issues with synthwave/victorian themes

* fix aubergine/zen

* rename green + gold

* rename to space

* rename, only enable 4 for grafanacon

* add survey link

* fix info color in sapphiredusk

* handle extra themes in storybook
This commit is contained in:
Ashley Harrison
2025-02-06 11:08:04 +00:00
committed by GitHub
parent e05413dcc4
commit 7d3a77a45c
22 changed files with 700 additions and 5 deletions
+9
View File
@@ -1784,6 +1784,15 @@ var (
FrontendOnly: true,
Owner: grafanaObservabilityLogsSquad,
},
{
Name: "grafanaconThemes",
Description: "Enables the temporary themes for GrafanaCon",
Stage: FeatureStageExperimental,
Owner: grafanaFrontendPlatformSquad,
HideFromAdminPage: true,
HideFromDocs: true,
RequiresRestart: true,
},
}
)
+1
View File
@@ -237,3 +237,4 @@ fetchRulesUsingPost,experimental,@grafana/alerting-squad,false,false,false
alertingAlertmanagerExtraDedupStage,experimental,@grafana/alerting-squad,false,true,false
alertingAlertmanagerExtraDedupStageStopPipeline,experimental,@grafana/alerting-squad,false,true,false
newLogsPanel,experimental,@grafana/observability-logs,false,false,true
grafanaconThemes,experimental,@grafana/grafana-frontend-platform,false,true,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
237 alertingAlertmanagerExtraDedupStage experimental @grafana/alerting-squad false true false
238 alertingAlertmanagerExtraDedupStageStopPipeline experimental @grafana/alerting-squad false true false
239 newLogsPanel experimental @grafana/observability-logs false false true
240 grafanaconThemes experimental @grafana/grafana-frontend-platform false true false
+4
View File
@@ -958,4 +958,8 @@ const (
// FlagNewLogsPanel
// Enables the new logs panel in Explore
FlagNewLogsPanel = "newLogsPanel"
// FlagGrafanaconThemes
// Enables the temporary themes for GrafanaCon
FlagGrafanaconThemes = "grafanaconThemes"
)
+15
View File
@@ -1865,6 +1865,21 @@
"hideFromDocs": true
}
},
{
"metadata": {
"name": "grafanaconThemes",
"resourceVersion": "1738661140740",
"creationTimestamp": "2025-02-04T09:25:40Z"
},
"spec": {
"description": "Enables the temporary themes for GrafanaCon",
"stage": "experimental",
"codeowner": "@grafana/grafana-frontend-platform",
"requiresRestart": true,
"hideFromAdminPage": true,
"hideFromDocs": true
}
},
{
"metadata": {
"name": "groupAttributeSync",
+10
View File
@@ -11,6 +11,16 @@ var themes = []ThemeDTO{
{ID: "dark", Type: "dark"},
{ID: "system", Type: "dark"},
{ID: "debug", Type: "dark", IsExtra: true},
{ID: "aubergine", Type: "dark", IsExtra: true},
{ID: "desertbloom", Type: "light", IsExtra: true},
{ID: "gildedgrove", Type: "dark", IsExtra: true},
{ID: "mars", Type: "dark", IsExtra: true},
{ID: "matrix", Type: "dark", IsExtra: true},
{ID: "sapphiredusk", Type: "dark", IsExtra: true},
{ID: "synthwave", Type: "dark", IsExtra: true},
{ID: "tron", Type: "dark", IsExtra: true},
{ID: "victorian", Type: "dark", IsExtra: true},
{ID: "zen", Type: "light", IsExtra: true},
}
func GetThemeByID(id string) *ThemeDTO {