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 v19.0.0 #57284

Merged
merged 18 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

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