From 3d979e61345c403d67363f40216f43c04b3f77c8 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Fri, 6 Jul 2018 13:41:53 -0700 Subject: [PATCH] Add call-out react directive and use it to surface rollup errors in the visualization editor sidebar. --- src/ui/public/react_components.js | 3 +++ .../public/vis/editors/default/sidebar.html | 9 +++++++++ src/ui/public/vis/editors/default/sidebar.js | 19 +++++++++++++++++-- .../public/vis/editors/default/sidebar.less | 3 +++ src/ui/public/visualize/visualize.js | 17 ++++++++++++++--- 5 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 src/ui/public/vis/editors/default/sidebar.less diff --git a/src/ui/public/react_components.js b/src/ui/public/react_components.js index 9bbfb2c366a2c..521ecd52920e7 100644 --- a/src/ui/public/react_components.js +++ b/src/ui/public/react_components.js @@ -28,6 +28,7 @@ import { EuiIcon, EuiColorPicker, EuiIconTip, + EuiCallOut, } from '@elastic/eui'; import { uiModules } from './modules'; @@ -43,3 +44,5 @@ app.directive('icon', reactDirective => reactDirective(EuiIcon)); app.directive('colorPicker', reactDirective => reactDirective(EuiColorPicker)); app.directive('iconTip', reactDirective => reactDirective(EuiIconTip, ['content', 'type', 'position', 'title'])); + +app.directive('callOut', reactDirective => reactDirective(EuiCallOut, ['title', 'color', 'size', 'iconType', 'children'])); diff --git a/src/ui/public/vis/editors/default/sidebar.html b/src/ui/public/vis/editors/default/sidebar.html index f0cff4acd142f..43ddf5e1aff21 100644 --- a/src/ui/public/vis/editors/default/sidebar.html +++ b/src/ui/public/vis/editors/default/sidebar.html @@ -19,6 +19,15 @@