Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to v41.0.0 #117242

Merged
merged 76 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
b1fb706
eui to v41.0.0
thompsongl Nov 2, 2021
86c6a08
update eui i18n tokens
thompsongl Nov 2, 2021
c961bc6
Merge branch 'main' into eui/41.0
thompsongl Nov 3, 2021
63f993d
sass tokens
thompsongl Nov 3, 2021
c7047f5
EuiLoadingKibana
thompsongl Nov 3, 2021
d384274
EuiCodeEditor
thompsongl Nov 3, 2021
f1ee184
subdued
thompsongl Nov 3, 2021
0fac402
betaBadgeProps
thompsongl Nov 3, 2021
47c2b2e
Merge branch 'main' into eui/41.0
thompsongl Nov 3, 2021
b923eb2
EuiCodeEditor null-loader
thompsongl Nov 3, 2021
2f97a00
src secondary -> success
thompsongl Nov 3, 2021
e7c0bbc
[enterprise_search] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
df5f2d7
[apm] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
97ef934
[canvas] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
623aebc
[cases] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
080b0bc
[cross_cluster_replication] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
6919df2
[data_enhanced] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
b97cd48
[data_visualizer] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
1d2e2de
[fleet] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
5c6e5f9
[index_management] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
4533ef5
[infra] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
c59adc7
[ingest_pipelines] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
dcbbd4b
[maps] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
da9de20
[ml] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
afdca6b
[monitoring] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
9d3f316
[observability] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
ee2f95c
[osquery] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
e9f93bc
[painless_lab] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
ab34b9f
[remote_clusters] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
f46fc06
[rollup] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
255809a
[security] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
e3f7a88
[security_solution] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
082738e
[snapshot_restore] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
9244715
[spaces] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
8c48a80
[transform] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
a7982e1
[triggers_actions_ui] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
2b165e7
[uptime] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
fe6d469
[watcher] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
046a94f
[infra] replace ambiguous 'secondary' color
cee-chen Nov 3, 2021
aac10d8
[examples] Deprecate 'secondary' color prop
cee-chen Nov 3, 2021
71e0ea1
[uptime] deprecate 'subdued' prop on EuiButtonIcon
cee-chen Nov 3, 2021
66ee48c
revert EuiKeyPadMenuItem betaBadge props
thompsongl Nov 3, 2021
d186d69
mobileOptions
thompsongl Nov 3, 2021
8629fc7
Merge branch 'main' into eui/41.0
thompsongl Nov 3, 2021
cea0b04
examples/ updates
thompsongl Nov 4, 2021
ebc4907
fix brace import
thompsongl Nov 4, 2021
2faa8a5
Merge branch 'main' into eui/41.0
thompsongl Nov 4, 2021
b428cd5
fix type exports
thompsongl Nov 4, 2021
2bfc430
update expressions_explorer requiredBundles
thompsongl Nov 4, 2021
fc6c5b6
Merge branch 'main' into eui/41.0
thompsongl Nov 4, 2021
63fda8f
remove make_id mocks
thompsongl Nov 4, 2021
2866fe3
snapshot updates
thompsongl Nov 4, 2021
0bb0167
fix import :facepalm:
thompsongl Nov 4, 2021
8e6c433
Merge branch 'main' into eui/41.0
cee-chen Nov 8, 2021
b244579
Fix `ReferenceError: ace is not defined` Jest failures
cee-chen Nov 8, 2021
0283ed4
Remove unused brace import (?)
cee-chen Nov 8, 2021
239ea36
Fix failing Jest test due to EuiCodeEditor moving to es_ui_shared plugin
cee-chen Nov 8, 2021
33537d4
Fix failing Jest test due to snapshot update
cee-chen Nov 8, 2021
54b8f39
Fix failing `TypeError: Cannot read properties of undefined (reading …
cee-chen Nov 8, 2021
60170a9
access uiSettings
thompsongl Nov 9, 2021
1a5398d
Merge branch 'main' into eui/41.0
thompsongl Nov 9, 2021
5c3ba0a
Move react-ace dependency into kbn-ui-shared-deps-npm
chandlerprall Nov 10, 2021
2c75eca
Merge branch 'main' into eui/41.0
thompsongl Nov 10, 2021
25e6103
Merge branch 'main' into eui/41.0
thompsongl Nov 10, 2021
a339b3a
Merge branch 'main' into eui/41.0
thompsongl Nov 10, 2021
8c691c5
Merge branch 'main' into eui/41.0
thompsongl Nov 10, 2021
e150217
Merge branch 'main' into eui/41.0
thompsongl Nov 11, 2021
6fdf459
Merge branch 'main' into eui/41.0
kibanamachine Nov 15, 2021
fd9f20d
Revert App Search shenanigans
cee-chen Nov 15, 2021
2e21578
Merge branch 'main' into eui/41.0
thompsongl Nov 16, 2021
5b6f387
Merge branch 'main' into eui/41.0
kibanamachine Nov 16, 2021
132ec86
Merge branch 'main' into eui/41.0
thompsongl Nov 16, 2021
244259a
Merge branch 'main' into eui/41.0
kibanamachine Nov 17, 2021
83391cc
Merge branch 'main' into eui/41.0
kibanamachine Nov 18, 2021
f125834
Merge branch 'main' into eui/41.0
thompsongl Nov 18, 2021
2fa3a32
secondary -> success
thompsongl Nov 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/expressions_explorer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
},
"requiredPlugins": ["expressions", "inspector", "uiActions", "developerExamples"],
"optionalPlugins": [],
"requiredBundles": []
"requiredBundles": ["kibanaReact"]
}
69 changes: 37 additions & 32 deletions examples/expressions_explorer/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,61 +18,66 @@ import {
EuiText,
EuiLink,
} from '@elastic/eui';
import { AppMountParameters } from '../../../src/core/public';
import { AppMountParameters, IUiSettingsClient } from '../../../src/core/public';
import { ExpressionsStart } from '../../../src/plugins/expressions/public';
import { Start as InspectorStart } from '../../../src/plugins/inspector/public';
import { RunExpressionsExample } from './run_expressions';
import { RenderExpressionsExample } from './render_expressions';
import { ActionsExpressionsExample } from './actions_and_expressions';
import { UiActionsStart } from '../../../src/plugins/ui_actions/public';
import { ActionsExpressionsExample2 } from './actions_and_expressions2';
import { createKibanaReactContext } from '../../../src/plugins/kibana_react/public';

interface Props {
expressions: ExpressionsStart;
inspector: InspectorStart;
actions: UiActionsStart;
uiSettings: IUiSettingsClient;
}

const ExpressionsExplorer = ({ expressions, inspector, actions }: Props) => {
const ExpressionsExplorer = ({ expressions, inspector, actions, uiSettings }: Props) => {
const { Provider: KibanaReactContextProvider } = createKibanaReactContext({ uiSettings });
return (
<EuiPage>
<EuiPageBody>
<EuiPageHeader>Expressions Explorer</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiText>
<p>
There are a couple of ways to run the expressions. Below some of the options are
demonstrated. You can read more about it{' '}
<EuiLink
href={
'https://github.com/elastic/kibana/blob/main/src/plugins/expressions/README.asciidoc'
}
>
here
</EuiLink>
</p>
</EuiText>
<KibanaReactContextProvider>
<EuiPage>
<EuiPageBody>
<EuiPageHeader>Expressions Explorer</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiText>
<p>
There are a couple of ways to run the expressions. Below some of the options are
demonstrated. You can read more about it{' '}
<EuiLink
href={
'https://github.com/elastic/kibana/blob/main/src/plugins/expressions/README.asciidoc'
}
>
here
</EuiLink>
</p>
</EuiText>

<EuiSpacer />
<EuiSpacer />

<RunExpressionsExample expressions={expressions} inspector={inspector} />
<RunExpressionsExample expressions={expressions} inspector={inspector} />

<EuiSpacer />
<EuiSpacer />

<RenderExpressionsExample expressions={expressions} inspector={inspector} />
<RenderExpressionsExample expressions={expressions} inspector={inspector} />

<EuiSpacer />
<EuiSpacer />

<ActionsExpressionsExample expressions={expressions} actions={actions} />
<ActionsExpressionsExample expressions={expressions} actions={actions} />

<EuiSpacer />
<EuiSpacer />

<ActionsExpressionsExample2 expressions={expressions} actions={actions} />
</EuiPageContentBody>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
<ActionsExpressionsExample2 expressions={expressions} actions={actions} />
</EuiPageContentBody>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
</KibanaReactContextProvider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import React from 'react';
import { EuiCodeEditor } from '@elastic/eui';
import { CodeEditor } from '../../../../src/plugins/kibana_react/public';

interface Props {
value: string;
Expand All @@ -16,19 +16,17 @@ interface Props {

export function ExpressionEditor({ value, onChange }: Props) {
return (
<EuiCodeEditor
mode="javascript"
theme="github"
<CodeEditor
Copy link
Contributor Author

@thompsongl thompsongl Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to introducing build errors when using the es_ui_shared import, it not longer makes sense to use EuiCodeEditor when CodeEditor is the preferred component.

Open to suggestions on improving this configuration from folks who have more experience using CodeEditor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thompsongl FYI that this change is causing the failing functional test / entire expressionsExplorer page to crash:

http://localhost:5061/dev/app/expressionsExplorer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think this change was actually part of the app? It's part of examples/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be resolved with 60170a9

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

languageId="javascript"
width="100%"
height="250px"
value={value}
onChange={onChange}
setOptions={{
fontSize: '14px',
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true,
options={{
fontSize: 14,
fontFamily: 'monospace',
quickSuggestions: true,
}}
onBlur={() => {}}
aria-label="Code Editor"
/>
);
Expand Down
1 change: 1 addition & 0 deletions examples/expressions_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class ExpressionsExplorerPlugin implements Plugin<void, void, SetupDeps,
expressions: depsStart.expressions,
inspector: depsStart.inspector,
actions: depsStart.uiActions,
uiSettings: core.uiSettings,
},
params
);
Expand Down
6 changes: 3 additions & 3 deletions examples/state_containers_examples/public/todo/todo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ const TodoApp: React.FC<TodoAppProps> = ({ filter, stateContainer }) => {
<>
<div>
<Link to={{ ...location, pathname: '/' }} data-test-subj={'filterLinkAll'}>
<EuiButton size={'s'} color={!filter ? 'primary' : 'secondary'}>
<EuiButton size={'s'} color={!filter ? 'primary' : 'success'}>
All
</EuiButton>
</Link>
<Link to={{ ...location, pathname: '/completed' }} data-test-subj={'filterLinkCompleted'}>
<EuiButton size={'s'} color={filter === 'completed' ? 'primary' : 'secondary'}>
<EuiButton size={'s'} color={filter === 'completed' ? 'primary' : 'success'}>
Completed
</EuiButton>
</Link>
<Link
to={{ ...location, pathname: '/not-completed' }}
data-test-subj={'filterLinkNotCompleted'}
>
<EuiButton size={'s'} color={filter === 'not-completed' ? 'primary' : 'secondary'}>
<EuiButton size={'s'} color={filter === 'not-completed' ? 'primary' : 'success'}>
Not Completed
</EuiButton>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/ems-client": "8.0.0",
"@elastic/eui": "40.1.0",
"@elastic/eui": "41.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/maki": "6.3.0",
"@elastic/node-crypto": "1.2.1",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps-npm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUNTIME_DEPS = [
"@npm//moment-timezone",
"@npm//moment",
"@npm//raw-loader",
"@npm//react-ace",
"@npm//react-dom",
"@npm//react-intl",
"@npm//react-is",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps-npm/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = (_, argv) => {
'moment-timezone/moment-timezone',
'moment-timezone/data/packed/latest.json',
'moment',
'react-ace',
'react-beautiful-dnd',
'react-dom',
'react-dom/server',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { FormattedStatus } from '../lib';
const getStatus = (parts: Partial<FormattedStatus['state']> = {}): FormattedStatus['state'] => ({
id: 'available',
title: 'Green',
uiColor: 'secondary',
uiColor: 'success',
message: '',
...parts,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { StatusTable } from './status_table';

const state = {
id: 'available' as const,
uiColor: 'secondary',
uiColor: 'success',
message: 'Ready',
title: 'green',
};
Expand Down
6 changes: 3 additions & 3 deletions src/core/public/core_app/status/lib/load_status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe('response processing', () => {
id: 'available',
title: 'Green',
message: 'Elasticsearch is available',
uiColor: 'secondary',
uiColor: 'success',
},
},
{
Expand All @@ -183,12 +183,12 @@ describe('response processing', () => {
id: 'available',
title: 'Green',
message: 'SavedObjects service has completed migrations and is available',
uiColor: 'secondary',
uiColor: 'success',
},
},
{
id: 'plugin:1',
state: { id: 'available', title: 'Green', message: 'Ready', uiColor: 'secondary' },
state: { id: 'available', title: 'Green', message: 'Ready', uiColor: 'success' },
},
{
id: 'plugin:2',
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/core_app/status/lib/load_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const STATUS_LEVEL_UI_ATTRS: Record<ServiceStatusLevel, StatusUIAttributes> = {
title: i18n.translate('core.status.greenTitle', {
defaultMessage: 'Green',
}),
uiColor: 'secondary',
uiColor: 'success',
},
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Expand',
description: 'ARIA label for a button that enters fullscreen view',
}),
'euiCodeEditor.startEditing': i18n.translate('core.euiCodeEditor.startEditing', {
defaultMessage: 'Press Enter to start editing.',
description: 'Screen reader text to prompt editing',
}),
'euiCodeEditor.startInteracting': i18n.translate('core.euiCodeEditor.startInteracting', {
defaultMessage: 'Press Enter to start interacting with the code.',
description: 'Screen reader text to prompt interaction',
}),
'euiCodeEditor.stopEditing': i18n.translate('core.euiCodeEditor.stopEditing', {
defaultMessage: "When you're done, press Escape to stop editing.",
description: 'Screen reader text to describe ending editing',
}),
'euiCodeEditor.stopInteracting': i18n.translate('core.euiCodeEditor.stopInteracting', {
defaultMessage: "When you're done, press Escape to stop interacting with the code.",
description: 'Screen reader text to describe ending interactions',
}),
'euiCollapsedItemActions.allActions': i18n.translate(
'core.euiCollapsedItemActions.allActions',
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/status/legacy_status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('calculateLegacyStatus', () => {
title: 'Green',
nickname: 'Looking good',
icon: 'success',
uiColor: 'secondary',
uiColor: 'success',
since: expect.any(String),
});
});
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('calculateLegacyStatus', () => {
message: 'Available',
since: expect.any(String),
state: 'green',
uiColor: 'secondary',
uiColor: 'success',
},
{
icon: 'danger',
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/status/legacy_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface LegacyStatusOverall {

type LegacyStatusState = 'green' | 'yellow' | 'red';
type LegacyStatusIcon = 'danger' | 'warning' | 'success';
type LegacyStatusUiColor = 'secondary' | 'warning' | 'danger';
type LegacyStatusUiColor = 'success' | 'warning' | 'danger';

interface LegacyStateAttr {
id: LegacyStatusState;
Expand Down Expand Up @@ -141,7 +141,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze<Record<string, LegacyStateAttr>>({
defaultMessage: 'Green',
}),
icon: 'success',
uiColor: 'secondary',
uiColor: 'success',
nickname: 'Looking good',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe('GET /api/status', () => {
since: expect.any(String),
state: 'green',
title: 'Green',
uiColor: 'secondary',
uiColor: 'success',
},
statuses: [
{
Expand All @@ -173,23 +173,23 @@ describe('GET /api/status', () => {
message: 'Service is working',
since: expect.any(String),
state: 'green',
uiColor: 'secondary',
uiColor: 'success',
},
{
icon: 'success',
id: 'core:[email protected]',
message: 'Service is working',
since: expect.any(String),
state: 'green',
uiColor: 'secondary',
uiColor: 'success',
},
{
icon: 'success',
id: 'plugin:[email protected]',
message: 'a is available',
since: expect.any(String),
state: 'green',
uiColor: 'secondary',
uiColor: 'success',
},
{
icon: 'warning',
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ export const LICENSE_OVERRIDES = {
'[email protected]': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/[email protected]': ['Elastic License 2.0'],
'@elastic/eui@40.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@41.0.0': ['SSPL-1.0 OR Elastic License 2.0'],
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import React, { PureComponent, Fragment } from 'react';
import classNames from 'classnames';
import 'react-ace';
import 'brace/theme/textmate';
import 'brace/mode/markdown';
import 'brace/mode/json';
Expand Down
Loading