Skip to content

Commit

Permalink
Merge pull request #25 from tsullivan/pageLayouts/stage_1/reduce_wrap…
Browse files Browse the repository at this point in the history
…pers

move APP_WRAPPER_CLASS definition to src/core/common
  • Loading branch information
cchaos authored Apr 14, 2021
2 parents 6898e03 + 1680999 commit d75b4b8
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 13 deletions.
13 changes: 13 additions & 0 deletions src/core/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

/**
* The class name for top level *and* nested application wrappers to ensure proper layout
* @public
*/
export const APP_WRAPPER_CLASS = 'kbnAppWrapper';
1 change: 0 additions & 1 deletion src/core/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ export type { DeprecationsServiceStart, ResolveDeprecationResponse } from './dep
export type { MountPoint, UnmountCallback, PublicUiSettingsParams } from './types';

export { URL_MAX_LENGTH } from './core_app';
export { APP_WRAPPER_CLASS } from './rendering';

/**
* Core services exposed to the `Plugin` setup lifecycle
Expand Down
7 changes: 1 addition & 6 deletions src/core/public/rendering/app_containers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ import React from 'react';
import { Observable } from 'rxjs';
import useObservable from 'react-use/lib/useObservable';
import classNames from 'classnames';

/**
* The class name for top level *and* nested application wrappers to ensure proper layout
* @public
*/
export const APP_WRAPPER_CLASS = 'kbnAppWrapper';
import { APP_WRAPPER_CLASS } from '../../common';

export const AppWrapper: React.FunctionComponent<{
chromeVisible$: Observable<boolean>;
Expand Down
1 change: 0 additions & 1 deletion src/core/public/rendering/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
*/

export { RenderingService } from './rendering_service';
export { APP_WRAPPER_CLASS } from './app_containers';
2 changes: 0 additions & 2 deletions src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ export type {
PluginOpaqueId,
};

export { APP_WRAPPER_CLASS } from '../public/rendering';

/**
* Config schemas for the platform services.
*
Expand Down
1 change: 1 addition & 0 deletions src/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"isolatedModules": true,
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
"types/**/*",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { filter, map } from 'rxjs/operators';

import { Start as InspectorStartContract } from 'src/plugins/inspector/public';
import { UrlForwardingSetup, UrlForwardingStart } from 'src/plugins/url_forwarding/public';
import { APP_WRAPPER_CLASS } from '../../../core/common';
import {
App,
Plugin,
Expand All @@ -23,7 +24,6 @@ import {
DEFAULT_APP_CATEGORIES,
PluginInitializerContext,
SavedObjectsClientContract,
APP_WRAPPER_CLASS,
} from '../../../core/public';

import { createKbnUrlTracker } from './services/kibana_utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { APP_WRAPPER_CLASS } from '../../../../../../src/core/server';

import { APP_WRAPPER_CLASS } from '../../../../../../src/core/common';
export const DEFAULT_PAGELOAD_SELECTOR = `.${APP_WRAPPER_CLASS}`;

export const CONTEXT_GETNUMBEROFITEMS = 'GetNumberOfItems';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import { i18n } from '@kbn/i18n';
import { ReportingCore } from '../..';
import { APP_WRAPPER_CLASS } from '../../../../../../src/core/common';
import { API_DIAGNOSE_URL } from '../../../common/constants';
import { omitBlockedHeaders } from '../../export_types/common';
import { getAbsoluteUrlFactory } from '../../export_types/common/get_absolute_url';
import { generatePngObservableFactory } from '../../export_types/png/lib/generate_png';
import { LevelLogger as Logger } from '../../lib';
import { authorizedUserPreRoutingFactory } from '../lib/authorized_user_pre_routing';
import { DiagnosticResponse } from './';
import { APP_WRAPPER_CLASS } from '../../../../../../src/core/server';

export const registerDiagnoseScreenshot = (reporting: ReportingCore, logger: Logger) => {
const setupDeps = reporting.getPluginSetupDeps();
Expand Down

0 comments on commit d75b4b8

Please sign in to comment.