From 7e4c2685e0a09840df3260fcb983d29748945045 Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Fri, 13 Mar 2020 18:44:20 -0700 Subject: [PATCH 1/6] create drilldown flyout cleanup --- .../public/components/action_wizard/action_wizard.tsx | 4 ++-- .../components/drilldown_hello_bar/drilldown_hello_bar.tsx | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx b/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx index f6fcbba7f4a9ad..3cf228f28d63d2 100644 --- a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx +++ b/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.tsx @@ -134,7 +134,7 @@ const SelectedActionFactory: React.FC = ({ {showDeselect && ( - onDeselect()}> + onDeselect()}> {txtChangeButton} @@ -172,7 +172,7 @@ const ActionFactorySelector: React.FC = ({ } return ( - + {[...actionFactories] .sort((f1, f2) => f1.order - f2.order) .map(actionFactory => ( diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx index 6c975fe3247447..40dbd3e93d6c2b 100644 --- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx +++ b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx @@ -10,6 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiTextColor, + EuiText, EuiLink, EuiSpacer, EuiButtonEmpty, @@ -35,7 +36,9 @@ export const DrilldownHelloBar: React.FC = ({ title={ - {txtHelpText} + + {txtHelpText} + {docsLink && ( <> @@ -45,7 +48,7 @@ export const DrilldownHelloBar: React.FC = ({ - {txtHideHelpButtonLabel} + {txtHideHelpButtonLabel} From cbbc6240212385d5898cc53562af7444e687bd5e Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Mon, 16 Mar 2020 11:23:11 -0700 Subject: [PATCH 2/6] remove border from selectedActionFactoryContainer --- .../public/components/action_wizard/action_wizard.scss | 6 ------ 1 file changed, 6 deletions(-) diff --git a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss b/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss index db09ff4a57ef92..87ec3f8fc7ec10 100644 --- a/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss +++ b/x-pack/plugins/advanced_ui_actions/public/components/action_wizard/action_wizard.scss @@ -1,9 +1,3 @@ -.auaActionWizard__selectedActionFactoryContainer { - background-color: $euiColorLightestShade; - padding: $euiSize; - border-radius: $euiBorderRadius; -} - .auaActionWizard__actionFactoryItem { .euiKeyPadMenuItem__label { height: #{$euiSizeXL}; From 5dbf4d32f9049dfc315238c74c7c8b3633d34d31 Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Mon, 16 Mar 2020 12:52:00 -0700 Subject: [PATCH 3/6] adjust callout in DrilldownHello --- .../components/drilldown_hello_bar/drilldown_hello_bar.scss | 6 +++--- .../components/drilldown_hello_bar/drilldown_hello_bar.tsx | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss index e527485765df34..8788b87b77ff23 100644 --- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss +++ b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss @@ -1,3 +1,3 @@ -.drdHelloBar__content .euiFlexItem { - margin: $euiSizeL; // increase spacing between elements -} +// .drdHelloBar__content .euiFlexItem { +// margin: $euiSizeL; // increase spacing between elements +// } diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx index 40dbd3e93d6c2b..7cbf92c13fcbec 100644 --- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx +++ b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx @@ -14,6 +14,7 @@ import { EuiLink, EuiSpacer, EuiButtonEmpty, + EuiIcon, } from '@elastic/eui'; import './drilldown_hello_bar.scss'; import { txtHideHelpButtonLabel, txtHelpText, txtViewDocsLinkLabel } from './i18n'; @@ -31,10 +32,12 @@ export const DrilldownHelloBar: React.FC = ({ }) => { return ( + + + {txtHelpText} From 02365d1a42f7c130a8b5428547721302f1a6e8c4 Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Mon, 16 Mar 2020 20:28:59 -0700 Subject: [PATCH 4/6] update form labels --- .../form_drilldown_wizard/form_drilldown_wizard.tsx | 6 +----- .../public/components/form_drilldown_wizard/i18n.ts | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx index 4d9f0f8e13a778..a197e4fd56bfb4 100644 --- a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx +++ b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx @@ -53,11 +53,7 @@ export const FormDrilldownWizard: React.FC = ({ ); const actionWizard = ( - + Date: Mon, 16 Mar 2020 20:32:21 -0700 Subject: [PATCH 5/6] remove unused file --- .../components/drilldown_hello_bar/drilldown_hello_bar.scss | 3 --- .../components/drilldown_hello_bar/drilldown_hello_bar.tsx | 1 - 2 files changed, 4 deletions(-) delete mode 100644 x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss deleted file mode 100644 index 8788b87b77ff23..00000000000000 --- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.scss +++ /dev/null @@ -1,3 +0,0 @@ -// .drdHelloBar__content .euiFlexItem { -// margin: $euiSizeL; // increase spacing between elements -// } diff --git a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx index 7cbf92c13fcbec..fb3a50eb77f2c0 100644 --- a/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx +++ b/x-pack/plugins/drilldowns/public/components/drilldown_hello_bar/drilldown_hello_bar.tsx @@ -16,7 +16,6 @@ import { EuiButtonEmpty, EuiIcon, } from '@elastic/eui'; -import './drilldown_hello_bar.scss'; import { txtHideHelpButtonLabel, txtHelpText, txtViewDocsLinkLabel } from './i18n'; export interface DrilldownHelloBarProps { From d56131e8cc730f07d3f72095858e43bf412ebf40 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Tue, 17 Mar 2020 11:15:10 +0100 Subject: [PATCH 6/6] fix type error --- .../storybook_config/webpack.config.js | 3 ++- .../flyout_drilldown_wizard.story.tsx | 19 +++++++++++++++++++ .../form_drilldown_wizard.tsx | 6 +++++- .../components/form_drilldown_wizard/i18n.ts | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/kbn-storybook/storybook_config/webpack.config.js b/packages/kbn-storybook/storybook_config/webpack.config.js index 1531c1d22b01bc..5b6897e58a8e9a 100644 --- a/packages/kbn-storybook/storybook_config/webpack.config.js +++ b/packages/kbn-storybook/storybook_config/webpack.config.js @@ -66,7 +66,8 @@ module.exports = async ({ config }) => { config.module.rules.push({ test: /\.tsx$/, // Exclude example files, as we don't display props info for them - exclude: /\.examples.tsx$/, + // TODO: validated_dual_range throws: https://github.com/elastic/kibana/issues/60356 + exclude: /\.examples.tsx$|validated_dual_range.tsx$/, use: [ // Parse TS comments to create Props tables in the UI require.resolve('react-docgen-typescript-loader'), diff --git a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx index f332bfc3cecba2..152cd393b9d3ec 100644 --- a/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx +++ b/x-pack/plugins/drilldowns/public/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx @@ -48,4 +48,23 @@ storiesOf('components/FlyoutDrilldownWizard', module) /> ); + }) + .add('open in flyout - edit, just 1 action type', () => { + return ( + {}}> + {}} + drilldownActionFactories={[dashboardFactory]} + initialDrilldownWizardConfig={{ + name: 'My fancy drilldown', + actionFactory: urlFactory as any, + actionConfig: { + url: 'https://elastic.co', + openInNewTab: true, + }, + }} + mode={'edit'} + /> + + ); }); diff --git a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx index a197e4fd56bfb4..4c9a7a2e514c68 100644 --- a/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx +++ b/x-pack/plugins/drilldowns/public/components/form_drilldown_wizard/form_drilldown_wizard.tsx @@ -53,7 +53,11 @@ export const FormDrilldownWizard: React.FC = ({ ); const actionWizard = ( - + 1 ? txtDrilldownAction : undefined} + fullWidth={true} + className="drdFormDrilldownWizard__formRow" + >