diff --git a/config/kibana.yml b/config/kibana.yml index a37c740ebab07..c816337f881d4 100644 --- a/config/kibana.yml +++ b/config/kibana.yml @@ -1,8 +1,6 @@ # For more configuration options see the configuration guide for Kibana in # https://www.elastic.co/guide/index.html -uiSettings.experimental.themeSwitcherEnabled: true - # =================== System: Kibana Server =================== # Kibana is served by a back end server. This setting specifies the port to use. #server.port: 5601 diff --git a/packages/core/ui-settings/core-ui-settings-common/src/theme.ts b/packages/core/ui-settings/core-ui-settings-common/src/theme.ts index 73b465d5b192f..d8a3be5ee79d4 100644 --- a/packages/core/ui-settings/core-ui-settings-common/src/theme.ts +++ b/packages/core/ui-settings/core-ui-settings-common/src/theme.ts @@ -35,7 +35,7 @@ export type ThemeTags = readonly ThemeTag[]; * An array of theme tags available in Kibana by default when not customized * using KBN_OPTIMIZER_THEMES environment variable. */ -export const DEFAULT_THEME_TAGS: ThemeTags = ThemeAmsterdamTags; +export const DEFAULT_THEME_TAGS: ThemeTags = SUPPORTED_THEME_TAGS; export const FALLBACK_THEME_TAG: ThemeTag = 'v8light'; diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts index a7249224ad9ee..904f2463557b6 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/settings/theme.ts @@ -24,6 +24,7 @@ function getThemeInfo(options: GetThemeSettingsOptions) { } const themeTags = parseThemeTags('experimental'); + // const themeTags = parseThemeTags(process.env.KBN_OPTIMIZER_THEMES); return { defaultDarkMode: themeTags[0].endsWith('dark'), }; @@ -104,9 +105,9 @@ export const getThemeSettings = ( }), }, value: 'amsterdam', - readonly: Object.hasOwn(options, 'isThemeSwitcherEnabled') - ? !options.isThemeSwitcherEnabled - : true, + // readonly: Object.hasOwn(options, 'isThemeSwitcherEnabled') + // ? !options.isThemeSwitcherEnabled + // : true, requiresPageReload: true, schema: schema.oneOf([ schema.literal('amsterdam'), diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts index 70c880c85594f..fd13744044c77 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts @@ -68,13 +68,13 @@ export class UiSettingsService public async preboot(): Promise { this.log.debug('Prebooting ui settings service'); - const { overrides, experimental } = await firstValueFrom(this.config$); + const { overrides } = await firstValueFrom(this.config$); this.overrides = overrides; this.register( getCoreSettings({ isDist: this.isDist, - isThemeSwitcherEnabled: experimental?.themeSwitcherEnabled, + isThemeSwitcherEnabled: true, }) ); diff --git a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts index 5274e95cf8646..8014d62cd93f8 100644 --- a/packages/kbn-optimizer/src/optimizer/optimizer_config.ts +++ b/packages/kbn-optimizer/src/optimizer/optimizer_config.ts @@ -152,6 +152,9 @@ export class OptimizerConfig { } const themeTags = parseThemeTags('experimental'); + // const themeTags = parseThemeTags( + // options.themes || (dist ? '*' : process.env.KBN_OPTIMIZER_THEMES) + // ); const pluginPaths = options.pluginPaths; if ( diff --git a/scripts/build.js b/scripts/build.js index 191444dc817b6..88a8cc2a78705 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -6,7 +6,6 @@ * your election, the "Elastic License 2.0", the "GNU Affero General Public * License v3.0 only", or the "Server Side Public License, v 1". */ -process.env.KBN_OPTIMIZER_THEMES = 'experimental'; require('../src/setup_node_env'); require('../src/dev/build/cli'); diff --git a/scripts/kibana.js b/scripts/kibana.js index 57aca2323c4dd..75d87593829fd 100644 --- a/scripts/kibana.js +++ b/scripts/kibana.js @@ -7,6 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -process.env.KBN_OPTIMIZER_THEMES = 'experimental'; - require('../src/cli/dev');