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

[context] Unify Contexts, deprecate others #161914

Merged
merged 5 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,12 @@ src/plugins/presentation_util @elastic/kibana-presentation
x-pack/plugins/profiling @elastic/profiling-ui
x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations
packages/kbn-react-field @elastic/kibana-data-discovery
packages/react/kibana_context/common @elastic/appex-sharedux
packages/react/kibana_context/render @elastic/appex-sharedux
packages/react/kibana_context/root @elastic/appex-sharedux
packages/react/kibana_context/styled @elastic/appex-sharedux
packages/react/kibana_context/theme @elastic/appex-sharedux
packages/react/kibana_mount @elastic/appex-sharedux
x-pack/plugins/remote_clusters @elastic/platform-deployment-management
test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core
packages/kbn-repo-file-maps @elastic/kibana-operations
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"newsfeed": "src/plugins/newsfeed",
"presentationUtil": "src/plugins/presentation_util",
"randomSampling": "x-pack/packages/kbn-random-sampling",
"reactPackages": "packages/react",
"textBasedEditor": "packages/kbn-text-based-editor",
"reporting": "packages/kbn-reporting/common",
"savedObjects": "src/plugins/saved_objects",
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,12 @@
"@kbn/profiling-plugin": "link:x-pack/plugins/profiling",
"@kbn/random-sampling": "link:x-pack/packages/kbn-random-sampling",
"@kbn/react-field": "link:packages/kbn-react-field",
"@kbn/react-kibana-context-common": "link:packages/react/kibana_context/common",
"@kbn/react-kibana-context-render": "link:packages/react/kibana_context/render",
"@kbn/react-kibana-context-root": "link:packages/react/kibana_context/root",
"@kbn/react-kibana-context-styled": "link:packages/react/kibana_context/styled",
"@kbn/react-kibana-context-theme": "link:packages/react/kibana_context/theme",
"@kbn/react-kibana-mount": "link:packages/react/kibana_mount",
"@kbn/remote-clusters-plugin": "link:x-pack/plugins/remote_clusters",
"@kbn/rendering-plugin": "link:test/plugin_functional/plugins/rendering_plugin",
"@kbn/repo-info": "link:packages/kbn-repo-info",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-
import type { ThemeServiceSetup } from '@kbn/core-theme-browser';
import type { I18nStart } from '@kbn/core-i18n-browser';
import type { FatalErrorInfo, FatalErrorsSetup } from '@kbn/core-fatal-errors-browser';
import { CoreContextProvider } from '@kbn/core-theme-browser-internal';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
import { FatalErrorsScreen } from './fatal_errors_screen';
import { getErrorInfo } from './get_error_info';

Expand Down Expand Up @@ -95,13 +95,13 @@ export class FatalErrorsService {
this.rootDomElement.appendChild(container);

render(
<CoreContextProvider i18n={i18n} theme={theme} globalStyles={true}>
<KibanaRootContextProvider i18n={i18n} theme={theme} globalStyles={true}>
<FatalErrorsScreen
buildNumber={injectedMetadata.getKibanaBuildNumber()}
kibanaVersion={injectedMetadata.getKibanaVersion()}
errorInfo$={this.errorInfo$}
/>
</CoreContextProvider>,
</KibanaRootContextProvider>,
container
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"kbn_references": [
"@kbn/core-injected-metadata-browser-internal",
"@kbn/core-theme-browser",
"@kbn/core-theme-browser-internal",
"@kbn/core-i18n-browser",
"@kbn/core-fatal-errors-browser",
"@kbn/i18n-react",
"@kbn/core-injected-metadata-browser-mocks",
"@kbn/core-theme-browser-mocks",
"@kbn/test-subj-selector",
"@kbn/test-jest-helpers",
"@kbn/react-kibana-context-root",
],
"exclude": [
"target/**/*",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import type { I18nStart } from '@kbn/core-i18n-browser';
import type { OverlayStart } from '@kbn/core-overlays-browser';
import { ThemeServiceStart } from '@kbn/core-theme-browser';
import { CoreContextProvider } from '@kbn/core-theme-browser-internal';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';

interface ErrorToastProps {
title: string;
Expand Down Expand Up @@ -71,7 +71,7 @@ export function showErrorDialog({

const modal = openModal(
mount(
<CoreContextProvider i18n={i18n} theme={theme}>
<KibanaRenderContextProvider i18n={i18n} theme={theme}>
<EuiModalHeader>
<EuiModalHeaderTitle>{title}</EuiModalHeaderTitle>
</EuiModalHeader>
Expand All @@ -94,7 +94,7 @@ export function showErrorDialog({
/>
</EuiButton>
</EuiModalFooter>
</CoreContextProvider>
</KibanaRenderContextProvider>
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { render, unmountComponentAtNode } from 'react-dom';

import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import type { I18nStart } from '@kbn/core-i18n-browser';
import { CoreContextProvider } from '@kbn/core-theme-browser-internal';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser';
import type { OverlayStart } from '@kbn/core-overlays-browser';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import { GlobalToastList } from './global_toast_list';
import { ToastsApi } from './toasts_api';

Expand Down Expand Up @@ -42,12 +42,12 @@ export class ToastsService {
this.targetDomElement = targetDomElement;

render(
<CoreContextProvider i18n={i18n} theme={theme}>
<KibanaRenderContextProvider i18n={i18n} theme={theme}>
<GlobalToastList
dismissToast={(toastId: string) => this.api!.remove(toastId)}
toasts$={this.api!.get$()}
/>
</CoreContextProvider>,
</KibanaRenderContextProvider>,
targetDomElement
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@kbn/i18n",
"@kbn/utility-types",
"@kbn/core-theme-browser",
"@kbn/core-theme-browser-internal",
"@kbn/core-i18n-browser",
"@kbn/core-ui-settings-browser",
"@kbn/core-overlays-browser",
Expand All @@ -28,6 +27,7 @@
"@kbn/test-jest-helpers",
"@kbn/core-overlays-browser-mocks",
"@kbn/core-theme-browser-mocks",
"@kbn/react-kibana-context-render",
],
"exclude": [
"target/**/*",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading