Chore: emit event whenever the theme changes (#99672)

emit event whenever the theme changes
This commit is contained in:
Ashley Harrison 2025-01-28 16:00:54 +00:00 committed by GitHub
parent 1fb1f8846f
commit 6e8e320ace
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,6 +120,10 @@ export class SharedPreferences extends PureComponent<Props, State> {
onThemeChanged = (value: ComboboxOption<string>) => {
this.setState({ theme: value.value });
reportInteraction('grafana_preferences_theme_changed', {
toTheme: value.value,
preferenceType: this.props.preferenceType,
});
if (value.value) {
changeTheme(value.value, true);