Skip to content

Commit

Permalink
Remove isCollapsed, getIsCollapsed, and global_nav_state.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Mar 16, 2020
1 parent 76f3c3a commit 82f675b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 68 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ core.chrome.setHelpExtension(elem => {
| [getBrand$()](./kibana-plugin-core-public.chromestart.getbrand_.md) | Get an observable of the current brand information. |
| [getBreadcrumbs$()](./kibana-plugin-core-public.chromestart.getbreadcrumbs_.md) | Get an observable of the current list of breadcrumbs |
| [getHelpExtension$()](./kibana-plugin-core-public.chromestart.gethelpextension_.md) | Get an observable of the current custom help conttent |
| [getIsCollapsed$()](./kibana-plugin-core-public.chromestart.getiscollapsed_.md) | Get an observable of the current collapsed state of the chrome. |
| [getIsNavDrawerLocked$()](./kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md) | Get an observable of the current locked state of the nav drawer. |
| [getIsVisible$()](./kibana-plugin-core-public.chromestart.getisvisible_.md) | Get an observable of the current visibility state of the chrome. |
| [removeApplicationClass(className)](./kibana-plugin-core-public.chromestart.removeapplicationclass.md) | Remove a className added with <code>addApplicationClass()</code>. If className is unknown it is ignored. |
Expand All @@ -66,6 +65,5 @@ core.chrome.setHelpExtension(elem => {
| [setBreadcrumbs(newBreadcrumbs)](./kibana-plugin-core-public.chromestart.setbreadcrumbs.md) | Override the current set of breadcrumbs |
| [setHelpExtension(helpExtension)](./kibana-plugin-core-public.chromestart.sethelpextension.md) | Override the current set of custom help content |
| [setHelpSupportUrl(url)](./kibana-plugin-core-public.chromestart.sethelpsupporturl.md) | Override the default support URL shown in the help menu |
| [setIsCollapsed(isCollapsed)](./kibana-plugin-core-public.chromestart.setiscollapsed.md) | Set the collapsed state of the chrome navigation. |
| [setIsVisible(isVisible)](./kibana-plugin-core-public.chromestart.setisvisible.md) | Set the temporary visibility for the chrome. This does nothing if the chrome is hidden by default and should be used to hide the chrome for things like full-screen modes with an exit button. |

This file was deleted.

23 changes: 0 additions & 23 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { KIBANA_ASK_ELASTIC_LINK } from './constants';
import { IUiSettingsClient } from '../ui_settings';
export { ChromeNavControls, ChromeRecentlyAccessed, ChromeDocTitle };

const IS_COLLAPSED_KEY = 'core.chrome.isCollapsed';
const IS_LOCKED_KEY = 'core.chrome.isLocked';

/** @public */
Expand Down Expand Up @@ -147,7 +146,6 @@ export class ChromeService {

const appTitle$ = new BehaviorSubject<string>('Kibana');
const brand$ = new BehaviorSubject<ChromeBrand>({});
const isCollapsed$ = new BehaviorSubject(!!localStorage.getItem(IS_COLLAPSED_KEY));
const applicationClasses$ = new BehaviorSubject<Set<string>>(new Set());
const helpExtension$ = new BehaviorSubject<ChromeHelpExtension | undefined>(undefined);
const breadcrumbs$ = new BehaviorSubject<ChromeBreadcrumb[]>([]);
Expand Down Expand Up @@ -225,17 +223,6 @@ export class ChromeService {

setIsVisible: (isVisible: boolean) => this.toggleHidden$.next(!isVisible),

getIsCollapsed$: () => isCollapsed$.pipe(takeUntil(this.stop$)),

setIsCollapsed: (isCollapsed: boolean) => {
isCollapsed$.next(isCollapsed);
if (isCollapsed) {
localStorage.setItem(IS_COLLAPSED_KEY, 'true');
} else {
localStorage.removeItem(IS_COLLAPSED_KEY);
}
},

getApplicationClasses$: () =>
applicationClasses$.pipe(
map(set => [...set]),
Expand Down Expand Up @@ -366,16 +353,6 @@ export interface ChromeStart {
*/
setIsVisible(isVisible: boolean): void;

/**
* Get an observable of the current collapsed state of the chrome.
*/
getIsCollapsed$(): Observable<boolean>;

/**
* Set the collapsed state of the chrome navigation.
*/
setIsCollapsed(isCollapsed: boolean): void;

/**
* Get the current set of classNames that will be set on the application container.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ export interface ChromeStart {
getBrand$(): Observable<ChromeBrand>;
getBreadcrumbs$(): Observable<ChromeBreadcrumb[]>;
getHelpExtension$(): Observable<ChromeHelpExtension | undefined>;
getIsCollapsed$(): Observable<boolean>;
getIsNavDrawerLocked$(): Observable<boolean>;
getIsVisible$(): Observable<boolean>;
navControls: ChromeNavControls;
Expand All @@ -349,7 +348,6 @@ export interface ChromeStart {
setBreadcrumbs(newBreadcrumbs: ChromeBreadcrumb[]): void;
setHelpExtension(helpExtension?: ChromeHelpExtension): void;
setHelpSupportUrl(url: string): void;
setIsCollapsed(isCollapsed: boolean): void;
setIsVisible(isVisible: boolean): void;
}

Expand Down

0 comments on commit 82f675b

Please sign in to comment.