Skip to content

Commit

Permalink
Upgrade EUI to v19.0.0 (#57284) (#57718)
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 authored Feb 14, 2020
1 parent 87ae653 commit b906518
Show file tree
Hide file tree
Showing 82 changed files with 617 additions and 1,537 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"@elastic/charts": "^16.1.0",
"@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
4 changes: 2 additions & 2 deletions packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"kbn:watch": "node scripts/build --watch"
},
"devDependencies": {
"@elastic/eui": "18.3.0",
"@elastic/eui": "19.0.0",
"@elastic/charts": "^16.1.0",
"@kbn/dev-utils": "1.0.0",
"@kbn/i18n": "1.0.0",
Expand All @@ -33,4 +33,4 @@
"webpack": "^4.41.5",
"whatwg-fetch": "^3.0.0"
}
}
}

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 b906518

Please sign in to comment.