Skip to content

Commit

Permalink
Upgrade EUI to v19.0.0 (#57284)
Browse files Browse the repository at this point in the history
* eui to v19.0.0

* typescript updates; idAria removal

* src snapshot updates

* mock euicode and euicodeblock for jest

* x-pack snapshot updates

* mock euicode for jest

* more euicode snapshots

* mock euicode in storyshots

* types/enzyme yarn.lock

* sidenav type update
  • Loading branch information
thompsongl committed Feb 14, 2020
1 parent 356e3a4 commit 0abfd3c
Show file tree
Hide file tree
Showing 82 changed files with 616 additions and 1,536 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"@elastic/charts": "^17.0.2",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "7.6.0",
"@elastic/eui": "18.3.0",
"@elastic/eui": "19.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.5",
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 @@ -11,7 +11,7 @@
"devDependencies": {
"@elastic/charts": "^17.0.2",
"abort-controller": "^3.0.0",
"@elastic/eui": "18.3.0",
"@elastic/eui": "19.0.0",
"@kbn/dev-utils": "1.0.0",
"@kbn/i18n": "1.0.0",
"@yarnpkg/lockfile": "^1.1.0",
Expand Down

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 @@ -41,7 +41,7 @@ import {
} from '@elastic/charts';

import { i18n } from '@kbn/i18n';
import { EuiChartThemeType } from '@elastic/eui/src/themes/charts/themes';
import { EuiChartThemeType } from '@elastic/eui/dist/eui_charts_theme';
import { Subscription } from 'rxjs';
import { getServices, timezoneProvider } from '../../../kibana_services';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,31 @@ jest.mock('../../../kibana_services', () => {
};
});

// Mocking to prevent errors with React portal.
// Temporary until https://github.com/elastic/kibana/pull/55877 provides other alternatives.
jest.mock('@elastic/eui/lib/components/code/code_block', () => {
const React = require.requireActual('react');
return {
EuiCodeBlock: ({ children }) => (
<div>
<pre>
<code>{children}</code>
</pre>
</div>
),
};
});
jest.mock('@elastic/eui/lib/components/code/code', () => {
const React = require.requireActual('react');
return {
EuiCode: ({ children }) => (
<span>
<code>{children}</code>
</span>
),
};
});

beforeEach(() => {
jest.clearAllMocks();
});
Expand Down
69 changes: 3 additions & 66 deletions src/legacy/server/sass/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,7 @@ it('builds light themed SASS', async () => {

expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2'))
.toMatchInlineSnapshot(`
"/* 1 */
/* 1 */
/**
* 1. Extend beta badges to at least 40% of the container's width
* 2. Fix for IE to ensure badges are visible outside of a <button> tag
*/
/**
* 1. Apply margin to all but last item in the flex.
* 2. Margin gets flipped because of the row-reverse.
*/
/**
* 3. Must supply both values to background-size or some browsers apply the single value to both directions
*/
/**
* 4. Override invalid state with focus state.
*/
/**
* Mixin for use in:
* - EuiCard
* - EuiPageContent
*/
foo bar {
"foo bar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand All @@ -93,28 +72,7 @@ it('builds dark themed SASS', async () => {

expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2'))
.toMatchInlineSnapshot(`
"/* 1 */
/* 1 */
/**
* 1. Extend beta badges to at least 40% of the container's width
* 2. Fix for IE to ensure badges are visible outside of a <button> tag
*/
/**
* 1. Apply margin to all but last item in the flex.
* 2. Margin gets flipped because of the row-reverse.
*/
/**
* 3. Must supply both values to background-size or some browsers apply the single value to both directions
*/
/**
* 4. Override invalid state with focus state.
*/
/**
* Mixin for use in:
* - EuiCard
* - EuiPageContent
*/
foo bar {
"foo bar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand Down Expand Up @@ -143,28 +101,7 @@ it('rewrites url imports', async () => {

expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2'))
.toMatchInlineSnapshot(`
"/* 1 */
/* 1 */
/**
* 1. Extend beta badges to at least 40% of the container's width
* 2. Fix for IE to ensure badges are visible outside of a <button> tag
*/
/**
* 1. Apply margin to all but last item in the flex.
* 2. Margin gets flipped because of the row-reverse.
*/
/**
* 3. Must supply both values to background-size or some browsers apply the single value to both directions
*/
/**
* 4. Override invalid state with focus state.
*/
/**
* Mixin for use in:
* - EuiCard
* - EuiPageContent
*/
foo bar {
"foo bar {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand Down
Loading

0 comments on commit 0abfd3c

Please sign in to comment.