Skip to content

Commit

Permalink
[revert] final try to deploy theme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Nov 19, 2024
1 parent 19c8b40 commit f2a5e6d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 0 additions & 2 deletions config/kibana.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
};
Expand Down Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ export class UiSettingsService
public async preboot(): Promise<InternalUiSettingsServicePreboot> {
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,
})
);

Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-optimizer/src/optimizer/optimizer_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 0 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 0 additions & 2 deletions scripts/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit f2a5e6d

Please sign in to comment.