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
12 changes: 11 additions & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class ChromeService {
const appTitle$ = new BehaviorSubject<string>('Kibana');
const brand$ = new BehaviorSubject<ChromeBrand>({});
const isVisible$ = new BehaviorSubject(true);
const isLocked$ = new BehaviorSubject(false);
const isCollapsed$ = new BehaviorSubject(!!localStorage.getItem(IS_COLLAPSED_KEY));
const applicationClasses$ = new BehaviorSubject<Set<string>>(new Set());
const helpExtension$ = new BehaviorSubject<ChromeHelpExtension | undefined>(undefined);
Expand All @@ -122,6 +123,14 @@ export class ChromeService {
);
}

const BASE_SELECTOR = 'header-global-wrapper';
isLocked$.subscribe(isLocked => {
const el = document.querySelector(`.${BASE_SELECTOR}`);
if (el) {
el.classList.toggle(`${BASE_SELECTOR}--navIsLocked`, isLocked);
}
});

return {
navControls,
navLinks,
Expand All @@ -131,7 +140,7 @@ export class ChromeService {
<React.Fragment>
<LoadingIndicator loadingCount$={http.getLoadingCount$()} />

<div className="header-global-wrapper hide-for-sharing" data-test-subj="headerGlobalNav">
<div className={`${BASE_SELECTOR} hide-for-sharing`} data-test-subj="headerGlobalNav">
<Header
appTitle$={appTitle$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
Expand All @@ -150,6 +159,7 @@ export class ChromeService {
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsRight$={navControls.getRight$()}
onIsLockedUpdate={(isLocked: boolean) => isLocked$.next(isLocked)}
/>
</div>
</React.Fragment>
Expand Down
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