From eb689f44832be548dc271daf4c0d8f6610df46c7 Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Tue, 2 Mar 2021 18:10:38 -0600 Subject: [PATCH] Enable APM storybook publishing Changes to fix APM's Storybook setup were made in #93087 and #93294. This re-enables it and fixes a couple places where we weren't using a theme provider. --- test/scripts/jenkins_storybook.sh | 2 +- .../index.stories.tsx | 23 +++++++++++-------- .../shared/ApmHeader/apm_header.stories.tsx | 21 +++++++++-------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/test/scripts/jenkins_storybook.sh b/test/scripts/jenkins_storybook.sh index 8ebfc1035fe1f..abddedf95a0a6 100755 --- a/test/scripts/jenkins_storybook.sh +++ b/test/scripts/jenkins_storybook.sh @@ -7,7 +7,7 @@ node scripts/storybook --dll cd "$KIBANA_DIR" -# yarn storybook --site apm # TODO re-enable after being fixed +yarn storybook --site apm yarn storybook --site canvas yarn storybook --site ci_composite yarn storybook --site url_template_editor diff --git a/x-pack/plugins/apm/public/components/alerting/error_count_alert_trigger/index.stories.tsx b/x-pack/plugins/apm/public/components/alerting/error_count_alert_trigger/index.stories.tsx index 23afb9646dea7..83874e9584510 100644 --- a/x-pack/plugins/apm/public/components/alerting/error_count_alert_trigger/index.stories.tsx +++ b/x-pack/plugins/apm/public/components/alerting/error_count_alert_trigger/index.stories.tsx @@ -8,6 +8,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ErrorCountAlertTrigger } from '.'; +import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common'; import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, @@ -19,15 +20,19 @@ export default { component: ErrorCountAlertTrigger, decorators: [ (Story: React.ComponentClass) => ( - - -
- -
-
-
+ + + +
+ +
+
+
+
), ], }; diff --git a/x-pack/plugins/apm/public/components/shared/ApmHeader/apm_header.stories.tsx b/x-pack/plugins/apm/public/components/shared/ApmHeader/apm_header.stories.tsx index 190f0f19fd15a..3cd858aceaa90 100644 --- a/x-pack/plugins/apm/public/components/shared/ApmHeader/apm_header.stories.tsx +++ b/x-pack/plugins/apm/public/components/shared/ApmHeader/apm_header.stories.tsx @@ -9,6 +9,7 @@ import { EuiTitle } from '@elastic/eui'; import React, { ComponentType } from 'react'; import { MemoryRouter } from 'react-router-dom'; import { HttpSetup } from '../../../../../../../src/core/public'; +import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { MockUrlParamsContextProvider } from '../../../context/url_params_context/mock_url_params_context_provider'; import { createCallApmApi } from '../../../services/rest/createCallApmApi'; @@ -22,15 +23,17 @@ export default { createCallApmApi(({} as unknown) as HttpSetup); return ( - - - - - - - + + + + + + + + + ); }, ],