Skip to content

Commit

Permalink
[8.17] fix(slo): remove KibanaThemeProvider' (#201257) (#201387)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.17`:
- [fix(slo): remove KibanaThemeProvider'
(#201257)](#201257)

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

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2024-11-22T13:52:09Z","message":"fix(slo):
remove KibanaThemeProvider'
(#201257)","sha":"455a075495e5857fbf3a1c885c5836dc8a0611f5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo):
remove
KibanaThemeProvider'","number":201257,"url":"https://github.com/elastic/kibana/pull/201257","mergeCommit":{"message":"fix(slo):
remove KibanaThemeProvider'
(#201257)","sha":"455a075495e5857fbf3a1c885c5836dc8a0611f5"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201257","number":201257,"mergeCommit":{"message":"fix(slo):
remove KibanaThemeProvider'
(#201257)","sha":"455a075495e5857fbf3a1c885c5836dc8a0611f5"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
  • Loading branch information
kibanamachine and kdelemme authored Nov 22, 2024
1 parent c44d63a commit 426a37e
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 426a37e

Please sign in to comment.