From 2698dbaba802c33ea4d96754d0ca430546e6b146 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Mon, 22 Jul 2019 13:01:25 -0500 Subject: [PATCH] Upgrade EUI to 12.4.0 (#41577) * eui 12.4.0 * styled-components ts conflict * update combobox test service to always open on open call * Revert "update combobox test service to always open on open call" This reverts commit 43074e60061afcaf5c87e56ae5782aed2a4b68dc. * scroll combobox into view * scroll before filter --- package.json | 2 +- test/functional/services/combo_box.ts | 3 +++ .../plugins/kbn_tp_run_pipeline/package.json | 2 +- .../kbn_tp_custom_visualizations/package.json | 2 +- .../kbn_tp_embeddable_explorer/package.json | 2 +- .../kbn_tp_sample_panel_action/package.json | 2 +- .../kbn_tp_visualize_embedding/package.json | 2 +- .../code/public/components/diff_page/diff.tsx | 22 +++++++++++++------ x-pack/package.json | 2 +- yarn.lock | 8 +++---- 10 files changed, 29 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 964059f7f613b..b022096406084 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@babel/register": "7.4.4", "@elastic/charts": "^7.0.1", "@elastic/datemath": "5.0.2", - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "@elastic/filesaver": "1.1.2", "@elastic/good": "8.1.1-kibana2", "@elastic/numeral": "2.3.3", diff --git a/test/functional/services/combo_box.ts b/test/functional/services/combo_box.ts index 8bee9ee2863f8..b8267f0b4cbe3 100644 --- a/test/functional/services/combo_box.ts +++ b/test/functional/services/combo_box.ts @@ -18,6 +18,8 @@ */ import { FtrProviderContext } from '../ftr_provider_context'; import { WebElementWrapper } from './lib/web_element_wrapper'; +// @ts-ignore not supported yet +import { scrollIntoViewIfNecessary } from './lib/web_element_wrapper/scroll_into_view_if_necessary'; export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderContext) { const config = getService('config'); @@ -58,6 +60,7 @@ export function ComboBoxProvider({ getService, getPageObjects }: FtrProviderCont return; } + comboBoxElement.scrollIntoViewIfNecessary(); await this._filterOptionsList(comboBoxElement, value); await this.openOptionsList(comboBoxElement); diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json index 98ea93d5b984e..090d1d6adc60f 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json index 5f394962dc478..62a3c4f1df77d 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "react": "^16.8.0" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index 093d9cd3df803..68882f5cc0889 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "react": "^16.8.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index a52d76a406932..8d603914b2734 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "react": "^16.8.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json index 2478bbb90609d..aea4359ef0fc5 100644 --- a/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json +++ b/test/plugin_functional/plugins/kbn_tp_visualize_embedding/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "react": "^16.8.0", "react-dom": "^16.8.0" } diff --git a/x-pack/legacy/plugins/code/public/components/diff_page/diff.tsx b/x-pack/legacy/plugins/code/public/components/diff_page/diff.tsx index ee85a57becd53..5aa840fdbc782 100644 --- a/x-pack/legacy/plugins/code/public/components/diff_page/diff.tsx +++ b/x-pack/legacy/plugins/code/public/components/diff_page/diff.tsx @@ -58,11 +58,18 @@ const TopBarContainer = styled.div` justify-content: space-between; `; -const Accordion = styled(EuiAccordion)` - border: ${theme.euiBorderThick}; - border-radius: ${theme.euiSizeS}; - margin-bottom: ${theme.euiSize}; -`; +// @types/styled-components@3.0.1 does not yet support `defaultProps`, which EuiAccordion uses +// Ref: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31903 +// const Accordion = styled(EuiAccordion)` +// border: ${theme.euiBorderThick}; +// border-radius: ${theme.euiSizeS}; +// margin-bottom: ${theme.euiSize}; +// `; +const accordionStyles = { + border: theme.euiBorderThick, + borderRadius: theme.euiSizeS, + marginBottom: theme.euiSize, +}; const Icon = styled(EuiIcon)` margin-right: ${theme.euiSizeS}; @@ -103,7 +110,8 @@ const onClick = (e: MouseEvent) => { }; const Difference = (props: { fileDiff: FileDiff; repoUri: string; revision: string }) => ( - - + ); export class DiffPage extends React.Component { diff --git a/x-pack/package.json b/x-pack/package.json index cc358e807d26b..6c5379c28d2f3 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -171,7 +171,7 @@ "@babel/runtime": "7.4.5", "@elastic/ctags-langserver": "^0.1.2", "@elastic/datemath": "5.0.2", - "@elastic/eui": "12.3.1", + "@elastic/eui": "12.4.0", "@elastic/javascript-typescript-langserver": "^0.2.1", "@elastic/lsp-extension": "^0.1.2", "@elastic/node-crypto": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index a7a1d41ef76f8..db20e2c06009f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1644,10 +1644,10 @@ tabbable "^1.1.0" uuid "^3.1.0" -"@elastic/eui@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-12.3.1.tgz#89ced2cf43d5363f0cbc9cca76f6fcdfb3466276" - integrity sha512-7XQSSsyJTPyJQR+tmo14z/ek7/9PDz7jI/t1sPa14hG8CLYKhOgtYjVFeLM4hHz4F4MLwfwK1t3gMHqFxnvGeQ== +"@elastic/eui@12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-12.4.0.tgz#a679c498e5890fea34dab35346212022538fef5d" + integrity sha512-b3bY5cRqvbyRa8Uain1drZc6djvxxcZFfx0uQbkHOe9iK+AppHfkqQ5KeXtH3CUF55PZI56DRkVzsBbcOMMtOQ== dependencies: "@types/lodash" "^4.14.116" "@types/numeral" "^0.0.25"