Skip to content

Commit

Permalink
fix(slo): remove KibanaThemeProvider' (elastic#201257)
Browse files Browse the repository at this point in the history
(cherry picked from commit 455a075)
  • Loading branch information
kdelemme committed Nov 22, 2024
1 parent e3c75d1 commit 4e0d791
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
65 changes: 31 additions & 34 deletions x-pack/plugins/observability_solution/slo/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { Storage } from '@kbn/kibana-utils-plugin/public';
import { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public';
import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme';
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
import { Route, Router, Routes } from '@kbn/shared-ux-router';
import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
Expand Down Expand Up @@ -53,7 +52,7 @@ export const renderApp = ({
experimentalFeatures,
sloClient,
}: Props) => {
const { element, history, theme$ } = appMountParameters;
const { element, history } = appMountParameters;

// ensure all divs are .kbnAppWrappers
element.classList.add(APP_WRAPPER_CLASS);
Expand Down Expand Up @@ -90,42 +89,40 @@ export const renderApp = ({
ReactDOM.render(
<KibanaRenderContextProvider {...core}>
<ApplicationUsageTrackingProvider>
<KibanaThemeProvider {...{ theme: { theme$ } }}>
<CloudProvider>
<KibanaContextProvider
services={{
...core,
...plugins,
storage: new Storage(localStorage),
<CloudProvider>
<KibanaContextProvider
services={{
...core,
...plugins,
storage: new Storage(localStorage),
isDev,
kibanaVersion,
isServerless,
}}
>
<PluginContext.Provider
value={{
isDev,
kibanaVersion,
isServerless,
appMountParameters,
ObservabilityPageTemplate,
observabilityRuleTypeRegistry,
experimentalFeatures,
sloClient,
}}
>
<PluginContext.Provider
value={{
isDev,
isServerless,
appMountParameters,
ObservabilityPageTemplate,
observabilityRuleTypeRegistry,
experimentalFeatures,
sloClient,
}}
>
<Router history={history}>
<RedirectAppLinks coreStart={core} data-test-subj="observabilityMainContainer">
<PerformanceContextProvider>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</PerformanceContextProvider>
</RedirectAppLinks>
</Router>
</PluginContext.Provider>
</KibanaContextProvider>
</CloudProvider>
</KibanaThemeProvider>
<Router history={history}>
<RedirectAppLinks coreStart={core} data-test-subj="observabilityMainContainer">
<PerformanceContextProvider>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</PerformanceContextProvider>
</RedirectAppLinks>
</Router>
</PluginContext.Provider>
</KibanaContextProvider>
</CloudProvider>
</ApplicationUsageTrackingProvider>
</KibanaRenderContextProvider>,
element
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/observability_solution/slo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@kbn/observability-plugin",
"@kbn/observability-shared-plugin",
"@kbn/kibana-react-plugin",
"@kbn/react-kibana-context-theme",
"@kbn/shared-ux-link-redirect-app",
"@kbn/kibana-utils-plugin",
"@kbn/slo-schema",
Expand Down

0 comments on commit 4e0d791

Please sign in to comment.