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 13.6.0 #43916

Merged
merged 12 commits into from
Aug 27, 2019
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@babel/register": "^7.5.5",
"@elastic/charts": "^10.2.0",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
Expand Down
40 changes: 19 additions & 21 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,27 +131,25 @@ export class ChromeService {
<React.Fragment>
<LoadingIndicator loadingCount$={http.getLoadingCount$()} />

<div className="header-global-wrapper hide-for-sharing" data-test-subj="headerGlobalNav">
<Header
appTitle$={appTitle$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
basePath={http.basePath}
breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))}
kibanaDocLink={docLinks.links.kibana}
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
homeHref={http.basePath.prepend('/app/kibana#/home')}
isVisible$={isVisible$.pipe(
map(visibility => (FORCE_HIDDEN ? false : visibility)),
takeUntil(this.stop$)
)}
kibanaVersion={injectedMetadata.getKibanaVersion()}
navLinks$={navLinks.getNavLinks$()}
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsRight$={navControls.getRight$()}
/>
</div>
<Header
appTitle$={appTitle$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
basePath={http.basePath}
breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))}
kibanaDocLink={docLinks.links.kibana}
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
homeHref={http.basePath.prepend('/app/kibana#/home')}
isVisible$={isVisible$.pipe(
map(visibility => (FORCE_HIDDEN ? false : visibility)),
takeUntil(this.stop$)
)}
kibanaVersion={injectedMetadata.getKibanaVersion()}
navLinks$={navLinks.getNavLinks$()}
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsRight$={navControls.getRight$()}
/>
</React.Fragment>
),

Expand Down
38 changes: 38 additions & 0 deletions src/core/public/chrome/ui/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
thompsongl marked this conversation as resolved.
Show resolved Hide resolved
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import React, { FunctionComponent, useState } from 'react';
import classnames from 'classnames';
import { Header as HeaderUI, HeaderProps } from './header/header';

export const Header: FunctionComponent<HeaderProps> = props => {
const [isLocked, setIsLocked] = useState(false);
const className = classnames(
'header-global-wrapper',
{
'header-global-wrapper--isNavLocked': isLocked,
cchaos marked this conversation as resolved.
Show resolved Hide resolved
},
'hide-for-sharing'
);
return (
<div className={className} data-test-subj="headerGlobalNav">
<HeaderUI {...props} onIsLockedUpdate={setIsLocked} />
</div>
);
};
8 changes: 7 additions & 1 deletion src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ interface Props {
navControlsRight$: Rx.Observable<readonly ChromeNavControl[]>;
intl: InjectedIntl;
basePath: HttpStart['basePath'];
onIsLockedUpdate?: (isLocked: boolean) => void;
}

interface State {
Expand Down Expand Up @@ -268,6 +269,7 @@ class HeaderUI extends Component<Props, State> {
intl,
kibanaDocLink,
kibanaVersion,
onIsLockedUpdate,
} = this.props;
const {
appTitle,
Expand Down Expand Up @@ -355,7 +357,11 @@ class HeaderUI extends Component<Props, State> {
</EuiHeaderSection>
</EuiHeader>

<EuiNavDrawer ref={this.navDrawerRef} data-test-subj="navDrawer">
<EuiNavDrawer
ref={this.navDrawerRef}
data-test-subj="navDrawer"
onIsLockedUpdate={onIsLockedUpdate}
>
<EuiNavDrawerGroup listItems={recentLinksArray} />
<EuiHorizontalRule margin="none" />
<EuiNavDrawerGroup data-test-subj="navDrawerAppsMenu" listItems={navLinksArray} />
Expand Down
4 changes: 3 additions & 1 deletion src/legacy/ui/public/agg_types/controls/precision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ function PrecisionParamEditor({ agg, value, setValue }: AggParamEditorProps<numb
min={1}
max={config.get('visualization:tileMap:maxPrecision')}
value={value}
onChange={ev => setValue(Number(ev.target.value))}
onChange={(ev: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement>) =>
setValue(Number(ev.currentTarget.value))
}
data-test-subj={`visEditorMapPrecision${agg.id}`}
showValue
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ function RadiusRatioOptionControl({ editorStateParams, setValue }: AggControlPro
min={1}
max={100}
value={editorStateParams.radiusRatio || DEFAULT_VALUE}
onChange={e => setValue(editorStateParams, PARAM_NAME, parseFloat(e.target.value))}
onChange={(e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement>) =>
setValue(editorStateParams, PARAM_NAME, parseFloat(e.currentTarget.value))
}
showRange
showValue
valueAppend="%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"react": "^16.8.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"react": "^16.8.0"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"react": "^16.8.0"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"react": "^16.8.0",
"react-dom": "^16.8.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.

2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"@babel/runtime": "^7.5.5",
"@elastic/ctags-langserver": "^0.1.8",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "13.3.0",
"@elastic/eui": "13.6.0",
"@elastic/javascript-typescript-langserver": "^0.2.2",
"@elastic/lsp-extension": "^0.1.2",
"@elastic/maki": "6.1.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1129,10 +1129,10 @@
tabbable "^1.1.0"
uuid "^3.1.0"

"@elastic/eui@13.3.0":
version "13.3.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-13.3.0.tgz#05c78ffcb2041ebafd807e23dd3d32553e8c1812"
integrity sha512-Z/1KGaqKY2PCJXdJ3XTSTcnZZxjFysafvIWNRs+O0C+IQsyy0cz5Sj8BaM9pUgYVjL2SaO04Hs9Yb09MDJwFGQ==
"@elastic/eui@13.6.0":
version "13.6.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-13.6.0.tgz#a01b66f84bfc7eec2303df1c8d9a7d7443b59049"
integrity sha512-a7hD9jLIvA2yJZi+btDIRGRHRSjCwb/0/en3U29MtNB2cOEnNYQ1MGcI5/eIz6eKi93eb0ASG9qq6xVqVaAezQ==
dependencies:
"@types/lodash" "^4.14.116"
"@types/numeral" "^0.0.25"
Expand Down