Skip to content

Commit

Permalink
[8.x] Preparation for High Contrast Mode, Analytics Experience domains (
Browse files Browse the repository at this point in the history
#202608) (#204120)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Preparation for High Contrast Mode, Analytics Experience domains
(#202608)](#202608)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-12T19:16:07Z","message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com//issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"99aa884fa08beafd801588c0b38194ec03039008","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","Team:Visualizations","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","v8.18.0"],"title":"Preparation
for High Contrast Mode, Analytics Experience
domains","number":202608,"url":"https://github.com/elastic/kibana/pull/202608","mergeCommit":{"message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com//issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"99aa884fa08beafd801588c0b38194ec03039008"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202608","number":202608,"mergeCommit":{"message":"Preparation
for High Contrast Mode, Analytics Experience domains (#202608)\n\n##
Summary\r\n\r\n**Reviewers: Please test the code paths affected by this
PR. See the\r\n\"Risks\" section below.**\r\n\r\nPart of work for
enabling \"high contrast mode\" in Kibana.
See\r\nhttps://github.com//issues/176219.\r\n\r\n**Background:**\r\nKibana
will soon have a user profile setting to allow users to enable\r\n\"high
contrast mode.\" This setting will activate a flag
with\r\n`<EuiProvider>` that causes EUI components to render with
higher\r\ncontrast visual elements. Consumer plugins and packages need
to be\r\nupdated selected places where `<EuiProvider>` is wrapped, to
pass the\r\n`UserProfileService` service dependency from the CoreStart
contract.\r\n\r\n**NOTE:** **EUI currently does not yet support the
high-contrast mode\r\nflag**, but support for that is expected to come
in around 2 weeks.\r\nThese first PRs are simply preparing the code by
wiring up the\r\n`UserProvideService`.\r\n\r\n### Checklist\r\n\r\nCheck
the PR satisfies following conditions. \r\n\r\nReviewers should verify
this PR satisfies this list as well.\r\n\r\n- [X] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [X] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nDoes this PR introduce any risks? For example, consider
risks like hard\r\nto test bugs, performance regression, potential of
data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for
each identified\r\nrisk. Invite stakeholders and evaluate how to proceed
before merging.\r\n\r\n- [ ] [medium/high] The implementor of this
change did not manually test\r\nthe affected code paths and relied on
type-checking and functional tests\r\nto drive the changes. Code owners
for this PR need to manually test the\r\naffected code paths.\r\n- [ ]
[medium] The `UserProfileService` dependency comes from the\r\nCoreStart
contract. If acquiring the service causes synchronous code to\r\nbecome
asynchronous, check for race conditions or errors in rendering\r\nReact
components. Code owners for this PR need to manually test
the\r\naffected code paths.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"99aa884fa08beafd801588c0b38194ec03039008"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tim Sullivan <[email protected]>
  • Loading branch information
kibanamachine and tsullivan authored Dec 12, 2024
1 parent b9fce2f commit 6e12acb
Show file tree
Hide file tree
Showing 90 changed files with 221 additions and 267 deletions.
2 changes: 1 addition & 1 deletion examples/controls_example/public/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const App = ({
}

return (
<KibanaRenderContextProvider i18n={core.i18n} theme={core.theme}>
<KibanaRenderContextProvider {...core}>
<EuiPage>
<EuiPageBody>
<EuiPageSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,7 @@ export const ReactControlExample = ({
<EuiCodeBlock language="json">
{JSON.stringify(controlGroupApi?.serializeState(), null, 2)}
</EuiCodeBlock>,
{
theme: core.theme,
i18n: core.i18n,
}
core
)
);
}}
Expand Down
4 changes: 2 additions & 2 deletions examples/discover_customization_examples/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export class DiscoverCustomizationExamplesPlugin implements Plugin {
title: PLUGIN_NAME,
visibleIn: [],
mount: async (appMountParams) => {
const [_, { discover, data }] = await core.getStartServices();
const [coreStart, { discover, data }] = await core.getStartServices();

ReactDOM.render(
<I18nProvider>
<KibanaThemeProvider theme={core.theme}>
<KibanaThemeProvider {...coreStart}>
<Router history={appMountParams.history}>
<Routes>
<Route>
Expand Down
2 changes: 1 addition & 1 deletion examples/embeddable_examples/public/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const App = ({
}, [pages]);

return (
<KibanaRenderContextProvider i18n={core.i18n} theme={core.theme}>
<KibanaRenderContextProvider {...core}>
<Router basename={mountParams.appBasePath}>
<EuiPageTemplate restrictWidth={true} offset={0}>
<EuiPageTemplate.Sidebar sticky={true}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const getDataTableFactory = (
width: 100%;
`}
>
<KibanaRenderContextProvider theme={core.theme} i18n={core.i18n}>
<KibanaRenderContextProvider {...core}>
<KibanaContextProvider services={allServices}>
<CellActionsProvider
getTriggerCompatibleActions={services.uiActions.getTriggerCompatibleActions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ export const openSavedBookEditor = (
resolve({ addToLibrary });
}}
/>,
{
theme: core.theme,
i18n: core.i18n,
}
core
),
{
type: isCreate ? 'overlay' : 'push',
Expand Down
8 changes: 4 additions & 4 deletions examples/expressions_explorer/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
I18nStart,
IUiSettingsClient,
ThemeServiceStart,
UserProfileService,
} from '@kbn/core/public';
import { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { Start as InspectorStart } from '@kbn/inspector-plugin/public';
Expand All @@ -41,6 +42,7 @@ interface Props {
inspector: InspectorStart;
actions: UiActionsStart;
uiSettings: IUiSettingsClient;
userProfile: UserProfileService;
settings: SettingsStart;
theme: ThemeServiceStart;
i18n: I18nStart;
Expand All @@ -52,15 +54,13 @@ const ExpressionsExplorer = ({
actions,
uiSettings,
settings,
i18n,
theme,
...startServices
}: Props) => {
const { Provider: KibanaReactContextProvider } = createKibanaReactContext({
uiSettings,
settings,
theme,
theme: startServices.theme,
});
const startServices = { i18n, theme };
return (
<KibanaRenderContextProvider {...startServices}>
<KibanaReactContextProvider>
Expand Down
1 change: 1 addition & 0 deletions examples/expressions_explorer/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class ExpressionsExplorerPlugin implements Plugin<void, void, SetupDeps,
inspector: depsStart.inspector,
actions: depsStart.uiActions,
uiSettings: core.uiSettings,
userProfile: coreStart.userProfile,
settings: core.settings,
theme: coreStart.theme,
i18n: coreStart.i18n,
Expand Down
5 changes: 1 addition & 4 deletions examples/grid_example/public/get_panel_id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ export const getPanelId = async ({
session.close();
}}
/>,
{
theme: coreStart.theme,
i18n: coreStart.i18n,
}
coreStart
)
);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/portable_dashboards_example/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const PortableDashboardsDemos = ({
history: AppMountParameters['history'];
}) => {
return (
<KibanaRenderContextProvider i18n={coreStart.i18n} theme={coreStart.theme}>
<KibanaRenderContextProvider {...coreStart}>
<Router history={history}>
<Routes>
<Route exact path="/">
Expand Down
6 changes: 3 additions & 3 deletions examples/resizable_layout_examples/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme';
import type { AppMountParameters } from '@kbn/core/public';
import type { AppMountParameters, CoreStart } from '@kbn/core/public';
import { I18nProvider } from '@kbn/i18n-react';
import React, { ReactNode, useState } from 'react';
import ReactDOM from 'react-dom';
Expand Down Expand Up @@ -98,10 +98,10 @@ const ResizableSection = ({
);
};

export const renderApp = ({ element, theme$ }: AppMountParameters) => {
export const renderApp = (coreStart: CoreStart, { element }: AppMountParameters) => {
ReactDOM.render(
<I18nProvider>
<KibanaThemeProvider theme={{ theme$ }}>
<KibanaThemeProvider {...coreStart}>
<div
css={css`
height: calc(100vh - var(--euiFixedHeadersOffset, 0));
Expand Down
3 changes: 2 additions & 1 deletion examples/resizable_layout_examples/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ export class ResizableLayoutExamplesPlugin implements Plugin {
title: PLUGIN_NAME,
visibleIn: [],
mount: async (params: AppMountParameters) => {
const [coreStart] = await core.getStartServices();
// Load application bundle
const { renderApp } = await import('./application');
// Render the application
return renderApp(params);
return renderApp(coreStart, params);
},
});

Expand Down
14 changes: 6 additions & 8 deletions examples/search_examples/public/search/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ import { PLUGIN_ID, PLUGIN_NAME, SERVER_SEARCH_ROUTE_PATH } from '../../common';
import { IMyStrategyResponse } from '../../common/types';

interface SearchExamplesAppDeps
extends Pick<CoreStart, 'notifications' | 'http' | 'analytics' | 'i18n' | 'theme'> {
extends Pick<
CoreStart,
'notifications' | 'http' | 'analytics' | 'i18n' | 'theme' | 'userProfile'
> {
navigation: NavigationPublicPluginStart;
data: DataPublicPluginStart;
unifiedSearch: UnifiedSearchPublicPluginStart;
Expand Down Expand Up @@ -230,13 +233,8 @@ export const SearchExamplesApp = ({
</EuiText>
);
notifications.toasts.addSuccess(
{
title: 'Query result',
text: toMountPoint(message, startServices),
},
{
toastLifeTimeMs: 300000,
}
{ title: 'Query result', text: toMountPoint(message, startServices) },
{ toastLifeTimeMs: 300000 }
);
if (res.warning) {
notifications.toasts.addWarning({
Expand Down
2 changes: 2 additions & 0 deletions examples/search_examples/public/search_sessions/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ interface SearchSessionsExampleAppDeps {
analytics: CoreStart['analytics'];
i18n: CoreStart['i18n'];
theme: CoreStart['theme'];
userProfile: CoreStart['userProfile'];
navigation: NavigationPublicPluginStart;
data: DataPublicPluginStart;
unifiedSearch: UnifiedSearchPublicPluginStart;
Expand Down Expand Up @@ -674,6 +675,7 @@ function doSearch(
analytics: CoreStart['analytics'];
i18n: CoreStart['i18n'];
theme: CoreStart['theme'];
userProfile: CoreStart['userProfile'];
}
): Promise<{ request: IEsSearchRequest; response: IEsSearchResponse; tookMs?: number }> {
if (!dataView) return Promise.reject('Select a data view');
Expand Down
4 changes: 2 additions & 2 deletions examples/unified_field_list_examples/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import { UnifiedFieldListExampleApp } from './example_app';
export const renderApp = (
core: CoreStart,
deps: AppPluginStartDependencies,
{ element, theme$ }: AppMountParameters
{ element }: AppMountParameters
) => {
ReactDOM.render(
<I18nProvider>
<KibanaThemeProvider theme={{ theme$ }}>
<KibanaThemeProvider {...core}>
<UnifiedFieldListExampleApp
services={{
core,
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-search-response-warnings/src/handle_warnings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
AnalyticsServiceStart,
NotificationsStart,
ThemeServiceStart,
UserProfileService,
} from '@kbn/core/public';
import { toMountPoint } from '@kbn/react-kibana-mount';
import type { I18nStart } from '@kbn/core-i18n-browser';
Expand All @@ -36,6 +37,7 @@ interface Services {
inspector: InspectorStart;
notifications: NotificationsStart;
theme: ThemeServiceStart;
userProfile: UserProfileService;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface StartDeps {
expression: ExpressionsServiceStart;
}

export type StartServices = Pick<CoreStart, 'analytics' | 'i18n' | 'theme'>;
export type StartServices = Pick<CoreStart, 'analytics' | 'i18n' | 'theme' | 'userProfile'>;

export type ExpressionXyPluginSetup = void;
export type ExpressionXyPluginStart = void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ export const openEditControlGroupFlyout = (
onDeleteAll={() => onDeleteAll(overlay)}
onCancel={() => closeOverlay(overlay)}
/>,
{
theme: coreServices.theme,
i18n: coreServices.i18n,
}
coreServices
),
{
'aria-label': i18n.translate('controls.controlGroup.manageControl', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ export const openDataControlEditor = <
onSave({ type: selectedControlType, state });
}}
/>,
{
theme: coreServices.theme,
i18n: coreServices.i18n,
}
coreServices
),
{
size: 'm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ export class CopyToDashboardAction implements Action<EmbeddableApiContext> {
public async execute({ embeddable }: EmbeddableApiContext) {
if (!apiIsCompatible(embeddable)) throw new IncompatibleActionError();

const { theme, i18n } = coreServices;
const session = coreServices.overlays.openModal(
toMountPoint(<CopyToDashboardModal closeModal={() => session.close()} api={embeddable} />, {
theme,
i18n,
}),
toMountPoint(
<CopyToDashboardModal closeModal={() => session.close()} api={embeddable} />,
coreServices
),
{
maxWidth: 400,
'data-test-subj': 'copyToDashboardPanel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const DashboardNoMatch = ({ history }: { history: RouteComponentProps['hi
/>
</p>
</EuiCallOut>,
{ analytics: coreServices.analytics, i18n: coreServices.i18n, theme: coreServices.theme }
coreServices
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const EditorMenu = ({ createNewVisType, isDisabled }: EditorMenuProps) =>
/>
);
}),
{ analytics: coreServices.analytics, theme: coreServices.theme, i18n: coreServices.i18n }
coreServices
);

dashboardApi.openOverlay(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function openSettingsFlyout(dashboardApi: DashboardApi) {
}}
/>
</DashboardContext.Provider>,
{ analytics: coreServices.analytics, i18n: coreServices.i18n, theme: coreServices.theme }
coreServices
),
{
size: 's',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const confirmCreateWithUnsaved = (
</div>
</EuiOutsideClickDetector>
</EuiFocusTrap>,
{ analytics: coreServices.analytics, i18n: coreServices.i18n, theme: coreServices.theme }
coreServices
),
{
'data-test-subj': 'dashboardCreateConfirmModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import type {
IUiSettingsClient,
ThemeServiceStart,
ToastsSetup,
UserProfileService,
} from '@kbn/core/public';

import { BatchedFunc, BfetchPublicSetup, DISABLE_BFETCH } from '@kbn/bfetch-plugin/public';
Expand Down Expand Up @@ -127,6 +128,7 @@ export class SearchInterceptor {
analytics: Pick<AnalyticsServiceStart, 'reportEvent'>;
i18n: I18nStart;
theme: Pick<ThemeServiceStart, 'theme$'>;
userProfile: UserProfileService;
};

/*
Expand All @@ -136,10 +138,10 @@ export class SearchInterceptor {
this.deps.http.addLoadingCountSource(this.pendingCount$);

this.deps.startServices.then(([coreStart, depsStart]) => {
const { application, docLinks, analytics, i18n: i18nStart, theme } = coreStart;
const { application, docLinks, ...startRenderServices } = coreStart;
this.application = application;
this.docLinks = docLinks;
this.startRenderServices = { analytics, i18n: i18nStart, theme };
this.startRenderServices = startRenderServices;
this.inspector = (depsStart as SearchServiceStartDependencies).inspector;
});

Expand Down
17 changes: 3 additions & 14 deletions src/plugins/data/public/search/search_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,7 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
}

public start(
{
analytics,
http,
theme,
uiSettings,
chrome,
application,
notifications,
i18n: i18nStart,
}: CoreStart,
{ http, uiSettings, chrome, application, notifications, ...startServices }: CoreStart,
{
fieldFormats,
indexPatterns,
Expand All @@ -254,11 +245,9 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
const aggs = this.aggsService.start({ fieldFormats, indexPatterns });

const warningsServices = {
analytics,
i18n: i18nStart,
inspector,
notifications,
theme,
...startServices,
};

const searchSourceDependencies: SearchSourceDependencies = {
Expand Down Expand Up @@ -314,7 +303,7 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
tourDisabled: screenshotMode.isScreenshotMode(),
})
),
{ analytics, i18n: i18nStart, theme }
startServices
),
});
}
Expand Down
Loading

0 comments on commit 6e12acb

Please sign in to comment.