From 56ee07be3a7654e0b3975817dec28e4164022dd8 Mon Sep 17 00:00:00 2001 From: PhilippeOberti Date: Tue, 5 Nov 2024 17:27:42 -0600 Subject: [PATCH 1/3] [Expamples][Guided onboarding] - added missing EuiProvider to fix errors --- .../public/components/app.tsx | 114 +++++++++--------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/examples/guided_onboarding_example/public/components/app.tsx b/examples/guided_onboarding_example/public/components/app.tsx index 20430534a54e3..ca01c589ab743 100755 --- a/examples/guided_onboarding_example/public/components/app.tsx +++ b/examples/guided_onboarding_example/public/components/app.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; import { Routes, Router, Route } from '@kbn/shared-ux-router'; -import { EuiPageTemplate } from '@elastic/eui'; +import { EuiPageTemplate, EuiProvider } from '@elastic/eui'; import { CoreStart, ScopedHistory } from '@kbn/core/public'; import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public/types'; @@ -30,62 +30,64 @@ export const GuidedOnboardingExampleApp = (props: GuidedOnboardingExampleAppDeps const { notifications, guidedOnboarding, history } = props; return ( - - - - } - /> - {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( - - - - -
- - - - - - - - - - - - - - - - - ) : ( - - - - } - body={ -

- -

+ + + + } /> - )} - - + {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( + + + + +
+ + + + + + + + + + + + + + + + + ) : ( + + + + } + body={ +

+ +

+ } + /> + )} + + + ); }; From e6de3928dda9ccb155b499e1ca5a34f547da1854 Mon Sep 17 00:00:00 2001 From: PhilippeOberti Date: Tue, 5 Nov 2024 18:18:39 -0600 Subject: [PATCH 2/3] using KibanaRenderContextProvider instead of EuiProvider --- .../public/application.tsx | 16 ++- .../public/components/app.tsx | 115 +++++++++--------- 2 files changed, 65 insertions(+), 66 deletions(-) diff --git a/examples/guided_onboarding_example/public/application.tsx b/examples/guided_onboarding_example/public/application.tsx index 1227b8e7271df..b3d67e9de630a 100755 --- a/examples/guided_onboarding_example/public/application.tsx +++ b/examples/guided_onboarding_example/public/application.tsx @@ -10,20 +10,24 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { AppPluginStartDependencies } from './types'; import { GuidedOnboardingExampleApp } from './components/app'; export const renderApp = ( - { notifications }: CoreStart, + coreStart: CoreStart, { guidedOnboarding }: AppPluginStartDependencies, { element, history }: AppMountParameters ) => { + const { notifications } = coreStart; ReactDOM.render( - , + + + , element ); diff --git a/examples/guided_onboarding_example/public/components/app.tsx b/examples/guided_onboarding_example/public/components/app.tsx index ca01c589ab743..650f683e82bbb 100755 --- a/examples/guided_onboarding_example/public/components/app.tsx +++ b/examples/guided_onboarding_example/public/components/app.tsx @@ -8,11 +8,10 @@ */ import React from 'react'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { Routes, Router, Route } from '@kbn/shared-ux-router'; -import { EuiPageTemplate, EuiProvider } from '@elastic/eui'; +import { EuiPageTemplate } from '@elastic/eui'; import { CoreStart, ScopedHistory } from '@kbn/core/public'; - import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public/types'; import { StepTwo } from './step_two'; import { StepOne } from './step_one'; @@ -30,64 +29,60 @@ export const GuidedOnboardingExampleApp = (props: GuidedOnboardingExampleAppDeps const { notifications, guidedOnboarding, history } = props; return ( - - - - + + } + /> + {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( + + + + +
+ + + + + + + + + + + + + + + + + ) : ( + - } - /> - {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( - - - - -
- - - - - - - - - - - - - - - - - ) : ( - - - - } - body={ -

- -

- } - /> - )} - - - + + } + body={ +

+ +

+ } + /> + )} + ); }; From e49ec922e9858ccf14d3fdb3e8d0fe9ece0a5d70 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 6 Nov 2024 00:29:00 +0000 Subject: [PATCH 3/3] [CI] Auto-commit changed files from 'node scripts/notice' --- examples/guided_onboarding_example/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/guided_onboarding_example/tsconfig.json b/examples/guided_onboarding_example/tsconfig.json index 0707df0a33308..6dca87ec7eb23 100644 --- a/examples/guided_onboarding_example/tsconfig.json +++ b/examples/guided_onboarding_example/tsconfig.json @@ -17,6 +17,7 @@ "@kbn/i18n", "@kbn/guided-onboarding", "@kbn/shared-ux-router", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*",