From 7ac788d1233f23974f4e8a3cad0dc8c22b8b2d45 Mon Sep 17 00:00:00 2001 From: Nicolas Agustin Guevara Pihen <42900763+Tostti@users.noreply.github.com> Date: Fri, 10 May 2024 10:31:53 -0300 Subject: [PATCH] Change default theme (#174) --- .github/workflows/build_and_test_workflow.yml | 2 +- packages/osd-ui-shared-deps/theme.ts | 2 +- src/core/server/ui_settings/settings/theme.ts | 2 +- src/core/server/ui_settings/ui_settings_config.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index c2473d6001b0..e3edf91aa557 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -146,7 +146,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] #Removed 'windows-latest' - group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + group: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13] include: - os: ubuntu-latest name: Linux diff --git a/packages/osd-ui-shared-deps/theme.ts b/packages/osd-ui-shared-deps/theme.ts index cf769ab3f94a..965e1aa928bc 100644 --- a/packages/osd-ui-shared-deps/theme.ts +++ b/packages/osd-ui-shared-deps/theme.ts @@ -38,7 +38,7 @@ export type Theme = typeof LightTheme; // in the OpenSearch Dashboards app we can rely on this global being defined, but in // some cases (like jest) the global is undefined export const tag: string = globals.__osdThemeTag__; -const themeVersion = tag?.replace(/(light|dark)$/, '') || 'v8'; +const themeVersion = tag?.replace(/(light|dark)$/, '') || 'v7'; export const version = parseInt(themeVersion.replace(/[^\d]+/g, ''), 10) || 8; export const darkMode = tag?.endsWith?.('dark'); diff --git a/src/core/server/ui_settings/settings/theme.ts b/src/core/server/ui_settings/settings/theme.ts index b2d0087108f0..001a693d62dc 100644 --- a/src/core/server/ui_settings/settings/theme.ts +++ b/src/core/server/ui_settings/settings/theme.ts @@ -60,7 +60,7 @@ export const getThemeSettings = (): Record => { defaultMessage: 'Theme version', }), value: - DEFAULT_THEME_VERSION === 'v8' + DEFAULT_THEME_VERSION === 'v7' ? themeVersionLabelMap[DEFAULT_THEME_VERSION] : DEFAULT_THEME_VERSION, type: 'select', diff --git a/src/core/server/ui_settings/ui_settings_config.ts b/src/core/server/ui_settings/ui_settings_config.ts index c539e50cf908..429dc2214dae 100644 --- a/src/core/server/ui_settings/ui_settings_config.ts +++ b/src/core/server/ui_settings/ui_settings_config.ts @@ -37,7 +37,7 @@ const deprecations: ConfigDeprecationProvider = ({ unused, renameFromRoot }) => renameFromRoot('server.defaultRoute', 'uiSettings.overrides.defaultRoute'), ]; -export const DEFAULT_THEME_VERSION = 'v8'; +export const DEFAULT_THEME_VERSION = 'v7'; /* There are 4 levels of uiSettings: * 1) defaults hardcoded in code