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 v26.3.1 #70243

Merged
merged 42 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
02e0ade
eui to 26.1.0
thompsongl Jun 24, 2020
81e05fd
Breadcrumb -> EuiBreadcrumb
thompsongl Jun 24, 2020
eddd72c
keyCode -> key
thompsongl Jun 24, 2020
b6a59ff
Merge branch 'master' into eui/26.1
thompsongl Jun 25, 2020
a73a609
src snapshot updates
thompsongl Jun 25, 2020
a3287dd
update header variables file location
thompsongl Jun 25, 2020
04fe5cf
keyCode -> key in tests
thompsongl Jun 25, 2020
f8488db
x-pack simple snapshot updates
thompsongl Jun 25, 2020
52285ff
euitooltip updates
thompsongl Jun 29, 2020
c39043b
euioverlaymask updates
thompsongl Jun 29, 2020
7e76f68
testbed keycode -> key
thompsongl Jun 29, 2020
8212ecd
Merge branch 'master' into eui/26.1
thompsongl Jun 29, 2020
24accfb
fixed header sass mixin
thompsongl Jun 29, 2020
36b98b2
euidatagrid test workaround
thompsongl Jun 29, 2020
a28f4a1
euioverlapmask mock
thompsongl Jun 30, 2020
451ef61
euipaginationbutton markup
thompsongl Jun 30, 2020
d1fa9e7
Merge branch 'master' into eui/26.1
thompsongl Jun 30, 2020
5faa2f8
Merge branch 'master' into eui/26.1
thompsongl Jul 1, 2020
3945c51
Merge branch 'master' into eui/26.1
thompsongl Jul 2, 2020
f195d6a
nav snapshot update
thompsongl Jul 2, 2020
6380529
eui to 26.3.0
thompsongl Jul 2, 2020
88a2ec8
flyout z-index fix
thompsongl Jul 6, 2020
86f6ad0
Merge branch 'master' into eui/26.1
thompsongl Jul 6, 2020
f764309
euiflyout snapshot updates
thompsongl Jul 6, 2020
e95ebec
style snapshot updates
thompsongl Jul 6, 2020
8f2771a
table actions have machine readable text
thompsongl Jul 6, 2020
7967b09
table actions have machine readable text
thompsongl Jul 6, 2020
bb729fc
core api docs update
thompsongl Jul 6, 2020
01504b1
Merge branch 'master' into eui/26.1
thompsongl Jul 7, 2020
9e4bb08
table actions snapshot update
thompsongl Jul 7, 2020
1e09bb3
eui to 26.3.1
thompsongl Jul 7, 2020
53af069
Merge branch 'master' into eui/26.1
thompsongl Jul 7, 2020
3a96f5c
Merge branch 'master' into eui/26.1
thompsongl Jul 8, 2020
2849950
update table actions type
thompsongl Jul 8, 2020
6abf2dc
mock issue links; timeout done
thompsongl Jul 8, 2020
e47edb6
Merge branch 'master' into eui/26.1
thompsongl Jul 9, 2020
40a30f4
Merge branch 'master' into eui/26.1
elasticmachine Jul 9, 2020
a4e5c92
Merge branch 'master' into eui/26.1
thompsongl Jul 9, 2020
c5776fc
Merge branch 'master' into eui/26.1
thompsongl Jul 9, 2020
3c1def8
Merge branch 'master' into eui/26.1
thompsongl Jul 9, 2020
4daa32c
breadcrumb -> euibreadcrumb
thompsongl Jul 9, 2020
6100586
Merge branch 'master' into eui/26.1
elasticmachine Jul 9, 2020
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.8.0",
"@elastic/ems-client": "7.9.3",
"@elastic/eui": "24.1.0",
"@elastic/eui": "26.3.1",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "^2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@elastic/charts": "19.8.1",
"@elastic/eui": "24.1.0",
"@elastic/eui": "26.3.1",
"@elastic/numeral": "^2.5.0",
"@kbn/i18n": "1.0.0",
"@kbn/monaco": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Breadcrumb as EuiBreadcrumb, IconType } from '@elastic/eui';
import { EuiBreadcrumb, IconType } from '@elastic/eui';
import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { BehaviorSubject, combineLatest, merge, Observable, of, ReplaySubject } from 'rxjs';
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.

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

2 changes: 2 additions & 0 deletions src/core/public/chrome/ui/header/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@include euiHeaderAffordForFixed;

// TODO #64541
// Delete this block
.chrHeaderWrapper:not(.headerWrapper) {
Expand Down

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

4 changes: 2 additions & 2 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import { Action } from 'history';
import Boom from 'boom';
import { Breadcrumb } from '@elastic/eui';
import { BulkIndexDocumentsParams } from 'elasticsearch';
import { CatAliasesParams } from 'elasticsearch';
import { CatAllocationParams } from 'elasticsearch';
Expand Down Expand Up @@ -37,6 +36,7 @@ import { DeleteDocumentByQueryParams } from 'elasticsearch';
import { DeleteDocumentParams } from 'elasticsearch';
import { DeleteScriptParams } from 'elasticsearch';
import { DeleteTemplateParams } from 'elasticsearch';
import { EuiBreadcrumb } from '@elastic/eui';
import { EuiButtonEmptyProps } from '@elastic/eui';
import { EuiConfirmModalProps } from '@elastic/eui';
import { EuiGlobalToastListToast } from '@elastic/eui';
Expand Down Expand Up @@ -334,7 +334,7 @@ export interface ChromeBrand {
}

// @public (undocumented)
export type ChromeBreadcrumb = Breadcrumb;
export type ChromeBreadcrumb = EuiBreadcrumb;

// @public
export interface ChromeDocTitle {
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/rendering/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@elastic/eui/src/components/header/variables';
@import '@elastic/eui/src/global_styling/variables/header';
@import '@elastic/eui/src/components/nav_drawer/variables';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/core_plugins/timelion/public/_app.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@elastic/eui/src/components/header/variables';
@import '@elastic/eui/src/global_styling/variables/header';

.timApp {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
suggest,
insertAtLocation,
} from './timelion_expression_input_helpers';
import { comboBoxKeyCodes } from '@elastic/eui';
import { comboBoxKeys } from '@elastic/eui';
import { npStart } from 'ui/new_platform';

const Parser = PEG.generate(grammar);
Expand Down Expand Up @@ -178,9 +178,9 @@ export function TimelionExpInput($http, $timeout) {
});
}

function isNavigationalKey(keyCode) {
const keyCodes = _.values(comboBoxKeyCodes);
return keyCodes.includes(keyCode);
function isNavigationalKey(key) {
const keyCodes = _.values(comboBoxKeys);
return keyCodes.includes(key);
}

scope.onFocusInput = () => {
Expand All @@ -196,12 +196,12 @@ export function TimelionExpInput($http, $timeout) {
scope.onKeyDownInput = (e) => {
// If we've pressed any non-navigational keys, then the user has typed something and we
// can exit early without doing any navigation. The keyup handler will pull up suggestions.
if (!isNavigationalKey(e.keyCode)) {
if (!isNavigationalKey(e.key)) {
return;
}

switch (e.keyCode) {
case comboBoxKeyCodes.UP:
case comboBoxKeys.ARROW_UP:
if (scope.suggestions.isVisible) {
// Up and down keys navigate through suggestions.
e.preventDefault();
Expand All @@ -210,7 +210,7 @@ export function TimelionExpInput($http, $timeout) {
}
break;

case comboBoxKeyCodes.DOWN:
case comboBoxKeys.ARROW_DOWN:
if (scope.suggestions.isVisible) {
// Up and down keys navigate through suggestions.
e.preventDefault();
Expand All @@ -219,7 +219,7 @@ export function TimelionExpInput($http, $timeout) {
}
break;

case comboBoxKeyCodes.TAB:
case comboBoxKeys.TAB:
// If there are no suggestions or none is selected, the user tabs to the next input.
if (scope.suggestions.isEmpty() || scope.suggestions.index < 0) {
// Before letting the tab be handled to focus the next element
Expand All @@ -234,7 +234,7 @@ export function TimelionExpInput($http, $timeout) {
insertSuggestionIntoExpression(scope.suggestions.index);
break;

case comboBoxKeyCodes.ENTER:
case comboBoxKeys.ENTER:
if (e.metaKey || e.ctrlKey) {
// Re-render the chart when the user hits CMD+ENTER.
e.preventDefault();
Expand All @@ -246,7 +246,7 @@ export function TimelionExpInput($http, $timeout) {
}
break;

case comboBoxKeyCodes.ESCAPE:
case comboBoxKeys.ESCAPE:
e.preventDefault();
scope.suggestions.hide();
break;
Expand All @@ -255,7 +255,7 @@ export function TimelionExpInput($http, $timeout) {

scope.onKeyUpInput = (e) => {
// If the user isn't navigating, then we should update the suggestions based on their input.
if (!isNavigationalKey(e.keyCode)) {
if (!isNavigationalKey(e.key)) {
getSuggestions();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import sinon from 'sinon';
import expect from '@kbn/expect';
import ngMock from 'ng_mock';
import '../kbn_accessible_click';
import { keyCodes } from '@elastic/eui';
import { keys } from '@elastic/eui';

describe('kbnAccessibleClick directive', () => {
let $compile;
Expand Down Expand Up @@ -112,14 +112,14 @@ describe('kbnAccessibleClick directive', () => {

it(`on ENTER keyup`, () => {
const e = angular.element.Event('keyup'); // eslint-disable-line new-cap
e.keyCode = keyCodes.ENTER;
e.key = keys.ENTER;
element.trigger(e);
sinon.assert.calledOnce(scope.handleClick);
});

it(`on SPACE keyup`, () => {
const e = angular.element.Event('keyup'); // eslint-disable-line new-cap
e.keyCode = keyCodes.SPACE;
e.key = keys.SPACE;
element.trigger(e);
sinon.assert.calledOnce(scope.handleClick);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import sinon from 'sinon';
import expect from '@kbn/expect';
import ngMock from 'ng_mock';
import '../kbn_ui_ace_keyboard_mode';
import { keyCodes } from '@elastic/eui';
import { keys } from '@elastic/eui';

describe('kbnUiAceKeyboardMode directive', () => {
let element;
Expand All @@ -48,7 +48,7 @@ describe('kbnUiAceKeyboardMode directive', () => {
const textarea = element.find('textarea');
sinon.spy(textarea[0], 'focus');
const ev = angular.element.Event('keydown'); // eslint-disable-line new-cap
ev.keyCode = keyCodes.ENTER;
ev.key = keys.ENTER;
element.find('.kbnUiAceKeyboardHint').trigger(ev);
expect(textarea[0].focus.called).to.be(true);
expect(
Expand All @@ -61,7 +61,7 @@ describe('kbnUiAceKeyboardMode directive', () => {
const hint = element.find('.kbnUiAceKeyboardHint');
sinon.spy(hint[0], 'focus');
const ev = angular.element.Event('keydown'); // eslint-disable-line new-cap
ev.keyCode = keyCodes.ESCAPE;
ev.key = keys.ESCAPE;
textarea.trigger(ev);
expect(hint[0].focus.called).to.be(true);
expect(hint.hasClass('kbnUiAceKeyboardHint-isInactive')).to.be(false);
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('kbnUiAceKeyboardModeService', () => {
const textarea = element.find('textarea');
sinon.spy(textarea[0], 'focus');
const ev = angular.element.Event('keydown'); // eslint-disable-line new-cap
ev.keyCode = keyCodes.ENTER;
ev.key = keys.ENTER;
element.find('.kbnUiAceKeyboardHint').trigger(ev);
expect(textarea[0].focus.called).to.be(true);
expect(
Expand All @@ -114,7 +114,7 @@ describe('kbnUiAceKeyboardModeService', () => {
const hint = element.find('.kbnUiAceKeyboardHint');
sinon.spy(hint[0], 'focus');
const ev = angular.element.Event('keydown'); // eslint-disable-line new-cap
ev.keyCode = keyCodes.ESCAPE;
ev.key = keys.ESCAPE;
textarea.trigger(ev);
expect(hint[0].focus.called).to.be(true);
expect(hint.hasClass('kbnUiAceKeyboardHint-isInactive')).to.be(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import angular from 'angular';
import { uiModules } from '../modules';
import { keyCodes } from '@elastic/eui';
import { keys } from '@elastic/eui';

let aceKeyboardModeId = 0;

Expand Down Expand Up @@ -72,7 +72,7 @@ uiModules
}

hint.keydown((ev) => {
if (ev.keyCode === keyCodes.ENTER) {
if (ev.key === keys.ENTER) {
ev.preventDefault();
startEditing();
}
Expand Down Expand Up @@ -103,7 +103,7 @@ uiModules
);

uiAceTextbox.keydown((ev) => {
if (ev.keyCode === keyCodes.ESCAPE) {
if (ev.key === keys.ESCAPE) {
// If the autocompletion context menu is open then we want to let ESC close it but
// **not** exit out of editing mode.
if (!isAutoCompleterOpen) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import chrome from 'ui/chrome';

import { ExitFullScreenButton } from './exit_full_screen_button';

import { keyCodes } from '@elastic/eui';
import { keys } from '@elastic/eui';

test('is rendered', () => {
const component = renderWithIntl(<ExitFullScreenButton onExitFullScreenMode={() => {}} />);
Expand All @@ -57,7 +57,7 @@ describe('onExitFullScreenMode', () => {

mountWithIntl(<ExitFullScreenButton onExitFullScreenMode={onExitHandler} />);

const escapeKeyEvent = new KeyboardEvent('keydown', { keyCode: keyCodes.ESCAPE });
const escapeKeyEvent = new KeyboardEvent('keydown', { key: keys.ESCAPE });
document.dispatchEvent(escapeKeyEvent);

sinon.assert.calledOnce(onExitHandler);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@elastic/eui/src/components/header/variables';
@import '@elastic/eui/src/global_styling/variables/header';
@import '@elastic/eui/src/components/nav_drawer/variables';

// TODO #64541
Expand Down
Loading