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

[7.x] Upgraded EUI to v29.3.0 #79552

Merged
merged 8 commits into from
Oct 5, 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 @@ -114,7 +114,7 @@
"dependencies": {
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.9.1",
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "^2.5.0",
"@elastic/request-crypto": "1.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@kbn/babel-preset": "1.0.0",
"@kbn/optimizer": "1.0.0",
"babel-loader": "^8.0.6",
Expand Down
3 changes: 2 additions & 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": "23.0.0",
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@elastic/numeral": "^2.5.0",
"@kbn/i18n": "1.0.0",
"@kbn/monaco": "1.0.0",
Expand Down Expand Up @@ -39,6 +39,7 @@
"devDependencies": {
"@kbn/babel-preset": "1.0.0",
"@kbn/dev-utils": "1.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"loader-utils": "^1.2.3",
Expand Down
19 changes: 19 additions & 0 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,25 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
},
],
},
{
test: !dev ? /[\\\/]@elastic[\\\/]eui[\\\/].*\.js$/ : () => false,
use: [
{
loader: 'babel-loader',
options: {
plugins: [
[
require.resolve('babel-plugin-transform-react-remove-prop-types'),
{
mode: 'remove',
removeImport: true,
},
],
],
},
},
],
},
],
},

Expand Down
5 changes: 0 additions & 5 deletions src/plugins/navigation/public/top_nav_menu/_index.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.kbnTopNavMenu {
margin-right: $euiSizeXS;
}

.kbnTopNavMenu > * > * {
// TEMP fix to adjust spacing between EuiHeaderList__list items
margin: 0 $euiSizeXS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ describe('TopNavMenu', () => {

// menu is rendered outside of the component
expect(component.find(TOP_NAV_ITEM_SELECTOR).length).toBe(0);

const buttons = portalTarget.querySelectorAll('button');
expect(buttons.length).toBe(menuItems.length + 1); // should be n+1 buttons in mobile for popover button
expect(buttons[buttons.length - 1].getAttribute('aria-label')).toBe('Open navigation menu'); // last button should be mobile button
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
function renderMenu(className: string): ReactElement | null {
if (!config || config.length === 0) return null;
return (
<EuiHeaderLinks data-test-subj="top-nav" className={className}>
<EuiHeaderLinks data-test-subj="top-nav" gutterSize="xs" className={className}>
{renderItems()}
</EuiHeaderLinks>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function TopNavMenuItem(props: TopNavMenuData) {
{upperFirst(props.label || props.id!)}
</EuiButton>
) : (
<EuiHeaderLink size="xs" isActive {...commonButtonProps}>
<EuiHeaderLink size="xs" color="primary" {...commonButtonProps}>
{upperFirst(props.label || props.id!)}
</EuiHeaderLink>
);
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/share/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*/

import { ComponentType } from 'react';
import { EuiContextMenuPanelDescriptor, EuiContextMenuPanelItemDescriptor } from '@elastic/eui';
import { EuiContextMenuPanelDescriptor } from '@elastic/eui';
import { EuiContextMenuPanelItemDescriptorEntry } from '@elastic/eui/src/components/context_menu/context_menu';

/**
* @public
Expand Down Expand Up @@ -53,7 +54,8 @@ export interface ShareContext {
* used to order the individual items in a flat list returned by all registered
* menu providers.
* */
export interface ShareContextMenuPanelItem extends Omit<EuiContextMenuPanelItemDescriptor, 'name'> {
export interface ShareContextMenuPanelItem
extends Omit<EuiContextMenuPanelItemDescriptorEntry, 'name'> {
name: string; // EUI will accept a `ReactNode` for the `name` prop, but `ShareContentMenu` assumes a `string`.
sortOrder?: number;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@kbn/plugin-helpers": "1.0.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"react": "^16.12.0",
"typescript": "4.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "rm -rf './target' && tsc"
},
"devDependencies": {
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@kbn/plugin-helpers": "1.0.0",
"react": "^16.12.0",
"typescript": "4.0.2"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
"@babel/runtime": "^7.11.2",
"@elastic/datemath": "5.0.3",
"@elastic/ems-client": "7.10.0",
"@elastic/eui": "29.0.0",
"@elastic/eui": "29.3.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.0",
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.

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.

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.

Loading