From bcf669fab5e31aff9a1dd548bf44a0d9f4d04089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 26 Oct 2018 16:29:08 +0200 Subject: [PATCH] ux experiments --- .../dashboard/dashgrid/PanelEditor.tsx | 18 ++++----- .../dashboard/dashgrid/VizTypePicker.tsx | 25 ++++++------ public/sass/components/_viz_editor.scss | 38 ++++++------------- public/sass/pages/_dashboard.scss | 3 -- 4 files changed, 33 insertions(+), 51 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/PanelEditor.tsx b/public/app/features/dashboard/dashgrid/PanelEditor.tsx index c4922c7de34..570fc3cd287 100644 --- a/public/app/features/dashboard/dashgrid/PanelEditor.tsx +++ b/public/app/features/dashboard/dashgrid/PanelEditor.tsx @@ -7,6 +7,7 @@ import { QueriesTab } from './QueriesTab'; import { PanelPlugin, PluginExports } from 'app/types/plugins'; import { VizTypePicker } from './VizTypePicker'; import { updateLocation } from 'app/core/actions'; +import CustomScrollbar from 'app/core/components/CustomScrollbar/CustomScrollbar'; interface PanelEditorProps { panel: PanelModel; @@ -31,6 +32,7 @@ export class PanelEditor extends React.Component { this.tabs = [ { id: 'queries', text: 'Queries', icon: 'fa fa-database' }, { id: 'visualization', text: 'Visualization', icon: 'fa fa-line-chart' }, + { id: 'alert', text: 'Alert', icon: 'gicon gicon-alert' }, ]; } @@ -52,13 +54,9 @@ export class PanelEditor extends React.Component { renderVizTab() { return (
-
- -
-
-
Options
- {this.renderPanelOptions()} -
+ +
Options
+ {this.renderPanelOptions()}
); } @@ -95,8 +93,10 @@ export class PanelEditor extends React.Component {
- {activeTab === 'queries' && this.renderQueriesTab()} - {activeTab === 'visualization' && this.renderVizTab()} + + {activeTab === 'queries' && this.renderQueriesTab()} + {activeTab === 'visualization' && this.renderVizTab()} +
); diff --git a/public/app/features/dashboard/dashgrid/VizTypePicker.tsx b/public/app/features/dashboard/dashgrid/VizTypePicker.tsx index 9402133df34..f709ea6a6a6 100644 --- a/public/app/features/dashboard/dashgrid/VizTypePicker.tsx +++ b/public/app/features/dashboard/dashgrid/VizTypePicker.tsx @@ -2,7 +2,6 @@ import React, { PureComponent } from 'react'; import classNames from 'classnames'; import config from 'app/core/config'; import { PanelPlugin } from 'app/types/plugins'; -import CustomScrollbar from 'app/core/components/CustomScrollbar/CustomScrollbar'; import _ from 'lodash'; interface Props { @@ -50,19 +49,21 @@ export class VizTypePicker extends PureComponent { render() { return (
-
-
- +
+ + +
+ +
+ +
-
- -
{this.state.pluginList.map(this.renderVizPlugin)}
-
-
+ +
{this.state.pluginList.map(this.renderVizPlugin)}
); } diff --git a/public/sass/components/_viz_editor.scss b/public/sass/components/_viz_editor.scss index 48a32212904..da2b85337d2 100644 --- a/public/sass/components/_viz_editor.scss +++ b/public/sass/components/_viz_editor.scss @@ -1,22 +1,8 @@ .viz-editor { - display: flex; height: 100%; } -.viz-editor-col1 { - width: 210px; - height: 100%; - margin-right: 40px; -} - -.viz-editor-col2 { - flex-grow: 1; -} - .viz-picker { - display: flex; - flex-direction: column; - height: 100%; } .viz-picker__search { @@ -25,7 +11,8 @@ .viz-picker__items { flex-grow: 1; - height: calc(100% - 50px); + display: flex; + flex-wrap: wrap; } .viz-picker__item { @@ -34,10 +21,10 @@ border-radius: 3px; padding: $spacer; - width: 100%; height: 60px; + width: 157px; text-align: center; - margin-bottom: 6px; + margin: 0 7px 7px 0; cursor: pointer; display: flex; flex-shrink: 0; @@ -49,16 +36,9 @@ } &--selected { - // border: 1px solid $orange; - @include left-brand-border-gradient(); - .viz-picker__item-name { color: $text-color; } - - .viz-picker__item-img { - filter: saturate(100%); - } } } @@ -77,7 +57,6 @@ .viz-picker__item-img { height: 100%; - filter: saturate(30%); } .panel-editor-container { @@ -92,7 +71,7 @@ .panel-editor-container__editor { height: 65%; - margin-top: $panel-margin; + margin-top: $panel-margin*2; display: flex; flex-direction: row; } @@ -101,7 +80,7 @@ flex-grow: 1; min-width: 0; height: 100%; - padding: 20px 0 20px 20px; + padding: 0px 0 20px 20px; max-width: 1100px; } @@ -126,3 +105,8 @@ padding-right: 5px; } } + +.viz-picker__bar { + display: flex; + margin-bottom: $spacer; +} diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index ec3e805871e..c40ad1a32f3 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -10,9 +10,6 @@ } .panel-in-fullscreen { - .dashboard-container--has-submenu { - height: 100%; - } .scroll-canvas--dashboard { height: 100%; }