[theme] default to v8 theme (#94370)

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2021-03-17 09:49:39 -07:00 committed by GitHub
parent 238610491b
commit 37ff43b0c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 22 additions and 22 deletions

View file

@ -11,8 +11,8 @@ import { parseThemeTags } from './theme_tags';
it('returns default tags when passed undefined', () => {
expect(parseThemeTags()).toMatchInlineSnapshot(`
Array [
"v7dark",
"v7light",
"v8dark",
"v8light",
]
`);
});

View file

@ -17,7 +17,7 @@ const isArrayOfStrings = (input: unknown): input is string[] =>
export type ThemeTags = readonly ThemeTag[];
export type ThemeTag = 'v7light' | 'v7dark' | 'v8light' | 'v8dark';
export const DEFAULT_THEMES = tags('v7light', 'v7dark');
export const DEFAULT_THEMES = tags('v8light', 'v8dark');
export const ALL_THEMES = tags('v7light', 'v7dark', 'v8light', 'v8dark');
export function parseThemeTags(input?: any): ThemeTags {

View file

@ -94,8 +94,8 @@ OptimizerConfig {
"profileWebpack": false,
"repoRoot": <absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo,
"themeTags": Array [
"v7dark",
"v7light",
"v8dark",
"v8light",
],
"watch": false,
}

View file

@ -159,8 +159,8 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/legacy/_other_styles.scss,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/legacy/styles.scss,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/lib.ts,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/src/core/public/core_app/styles/_globals_v7dark.scss,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/src/core/public/core_app/styles/_globals_v7light.scss,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/src/core/public/core_app/styles/_globals_v8dark.scss,
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/src/core/public/core_app/styles/_globals_v8light.scss,
<absolute path>/packages/kbn-optimizer/target/worker/entry_point_creator.js,
<absolute path>/packages/kbn-ui-shared-deps/public_path_module_creator.js,
]

View file

@ -94,8 +94,8 @@ describe('getOptimizerCacheKey()', () => {
"optimizerCacheKey": "♻",
"repoRoot": <absolute path>,
"themeTags": Array [
"v7dark",
"v7light",
"v8dark",
"v8light",
],
},
}

View file

@ -180,7 +180,7 @@ describe('bootstrapRenderer', () => {
expect(getThemeTagMock).toHaveBeenCalledTimes(1);
expect(getThemeTagMock).toHaveBeenCalledWith({
themeVersion: 'v7',
themeVersion: 'v8',
darkMode: false,
});
});

View file

@ -50,12 +50,12 @@ export const bootstrapRendererFactory: BootstrapRendererFactory = ({
return async function bootstrapRenderer({ uiSettingsClient, request }) {
let darkMode = false;
let themeVersion = 'v7';
let themeVersion = 'v8';
try {
const authenticated = isAuthenticated(request);
darkMode = authenticated ? await uiSettingsClient.get('theme:darkMode') : false;
themeVersion = authenticated ? await uiSettingsClient.get('theme:version') : 'v7';
themeVersion = authenticated ? await uiSettingsClient.get('theme:version') : 'v8';
} catch (e) {
// just use the default values in case of connectivity issues with ES
}

View file

@ -35,11 +35,11 @@ describe('theme settings', () => {
it('should only accept valid values', () => {
expect(() => validate('v7')).not.toThrow();
expect(() => validate('v8 (beta)')).not.toThrow();
expect(() => validate('v8')).not.toThrow();
expect(() => validate('v12')).toThrowErrorMatchingInlineSnapshot(`
"types that failed validation:
- [0]: expected value to equal [v7]
- [1]: expected value to equal [v8 (beta)]"
- [1]: expected value to equal [v8]"
`);
});
});

View file

@ -27,14 +27,14 @@ export const getThemeSettings = (): Record<string, UiSettingsParams> => {
name: i18n.translate('core.ui_settings.params.themeVersionTitle', {
defaultMessage: 'Theme version',
}),
value: 'v7',
value: 'v8',
type: 'select',
options: ['v7', 'v8 (beta)'],
options: ['v7', 'v8'],
description: i18n.translate('core.ui_settings.params.themeVersionText', {
defaultMessage: `Switch between the theme used for the current and next version of Kibana. A page refresh is required for the setting to be applied.`,
}),
requiresPageReload: true,
schema: schema.oneOf([schema.literal('v7'), schema.literal('v8 (beta)')]),
schema: schema.oneOf([schema.literal('v7'), schema.literal('v8')]),
},
};
};

View file

@ -38,7 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await savedQueryManagementComponent.openSavedQueryManagementComponent();
const descriptionText = await testSubjects.getVisibleText('saved-query-management-popover');
expect(descriptionText).to.eql(
'SAVED QUERIES\nThere are no saved queries. Save query text and filters that you want to use again.\nSave current query'
'Saved Queries\nThere are no saved queries. Save query text and filters that you want to use again.\nSave current query'
);
});

View file

@ -55,7 +55,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await savedQueryManagementComponent.openSavedQueryManagementComponent();
const descriptionText = await testSubjects.getVisibleText('saved-query-management-popover');
expect(descriptionText).to.eql(
'SAVED QUERIES\nThere are no saved queries. Save query text and filters that you want to use again.\nSave current query'
'Saved Queries\nThere are no saved queries. Save query text and filters that you want to use again.\nSave current query'
);
});

View file

@ -605,7 +605,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
await comboBox.setElement(groupBy, 'Terms', { clickWithMouse: true });
await PageObjects.common.sleep(1000);
const byField = await testSubjects.find('groupByField');
await comboBox.setElement(byField, field, { clickWithMouse: true });
await comboBox.setElement(byField, field);
}
public async checkSelectedMetricsGroupByValue(value: string) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

@ -58,8 +58,8 @@ export default function ({ getService }: FtrProviderContext) {
{ key: '#F5F7FA', value: 2 },
{ key: '#D3DAE6', value: 1 },
// scatterplot circles
{ key: '#54B399', value: 1 },
{ key: '#54B39A', value: 1 },
{ key: '#69707D', value: 1 },
{ key: '#98A1B3', value: 1 },
],
scatterplotMatrixColorStatsResults: [
// background

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After