Commit c54ae5d1 by Torkel Ödegaard

improve dropdown pane connetion to tab toolbar

parent 1bad8db9
...@@ -78,7 +78,6 @@ export class DataSourcePicker extends PureComponent<Props, State> { ...@@ -78,7 +78,6 @@ export class DataSourcePicker extends PureComponent<Props, State> {
return ( return (
<> <>
<div className="cta-form__bar"> <div className="cta-form__bar">
<div className="cta-form__bar-header">Select data source</div>
{this.renderFilters()} {this.renderFilters()}
<div className="gf-form--grow" /> <div className="gf-form--grow" />
</div> </div>
......
...@@ -51,8 +51,8 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -51,8 +51,8 @@ export class EditorTabBody extends PureComponent<Props, State> {
renderButton(view: EditorToolBarView) { renderButton(view: EditorToolBarView) {
return ( return (
<div className="nav-buttons" key={view.title}> <div className="nav-buttons" key={view.title}>
<button className="btn navbar-button"> <button className="btn navbar-button" onClick={() => this.onToggleToolBarView(view)}>
<i className={view.icon} /> {view.title} {view.icon && <i className={view.icon} />} {view.title}
</button> </button>
</div> </div>
); );
...@@ -62,7 +62,7 @@ export class EditorTabBody extends PureComponent<Props, State> { ...@@ -62,7 +62,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
return ( return (
<div className="editor-toolbar-view"> <div className="editor-toolbar-view">
<button className="editor-toolbar-view__close" onClick={this.onCloseOpenView}> <button className="editor-toolbar-view__close" onClick={this.onCloseOpenView}>
<i className="fa fa-remove" /> <i className="fa fa-chevron-up" />
</button> </button>
{view.render()} {view.render()}
</div> </div>
......
...@@ -55,18 +55,17 @@ export class QueriesTab extends PureComponent<Props> { ...@@ -55,18 +55,17 @@ export class QueriesTab extends PureComponent<Props> {
const queryInspector = { const queryInspector = {
title: 'Query Inspector', title: 'Query Inspector',
icon: 'fa fa-lightbulb-o',
render: () => <h2>hello</h2>, render: () => <h2>hello</h2>,
}; };
const dsHelp = { const dsHelp = {
title: 'Help', title: '',
icon: 'fa fa-question', icon: 'fa fa-question',
render: () => <h2>hello</h2>, render: () => <h2>hello</h2>,
}; };
return ( return (
<EditorTabBody main={currentDataSource} toolbarItems={[dsHelp, queryInspector]}> <EditorTabBody main={currentDataSource} toolbarItems={[queryInspector, dsHelp]}>
<div ref={element => (this.element = element)} style={{ width: '100%' }} /> <div ref={element => (this.element = element)} style={{ width: '100%' }} />
</EditorTabBody> </EditorTabBody>
); );
......
...@@ -36,12 +36,14 @@ export class VisualizationTab extends PureComponent<Props> { ...@@ -36,12 +36,14 @@ export class VisualizationTab extends PureComponent<Props> {
}; };
render() { render() {
const { plugin, onTypeChanged } = this.props; const { plugin } = this.props;
const panelSelection = { const panelSelection = {
title: plugin.name, title: plugin.name,
imgSrc: plugin.info.logos.small, imgSrc: plugin.info.logos.small,
render: () => { render: () => {
// the needs to be scoped inside this closure
const { plugin, onTypeChanged } = this.props;
return <VizTypePicker current={plugin} onTypeChanged={onTypeChanged} />; return <VizTypePicker current={plugin} onTypeChanged={onTypeChanged} />;
}, },
}; };
......
...@@ -81,7 +81,6 @@ export class VizTypePicker extends PureComponent<Props, State> { ...@@ -81,7 +81,6 @@ export class VizTypePicker extends PureComponent<Props, State> {
return ( return (
<> <>
<div className="cta-form__bar"> <div className="cta-form__bar">
<div className="cta-form__bar-header">Select visualization</div>
{this.renderFilters()} {this.renderFilters()}
<div className="gf-form--grow" /> <div className="gf-form--grow" />
</div> </div>
......
...@@ -85,9 +85,7 @@ ...@@ -85,9 +85,7 @@
} }
&--selected { &--selected {
.viz-picker__item-name { box-shadow: 0 0 12px #ff4d00;
color: $text-color;
}
} }
} }
...@@ -171,10 +169,12 @@ ...@@ -171,10 +169,12 @@
display: flex; display: flex;
align-content: center; align-content: center;
align-items: center; align-items: center;
background: linear-gradient(90deg, #292a2d, black); background: $page-header-bg;
padding: 7px 30px 7px 20px;
box-shadow: 0 0 20px black; box-shadow: 0 0 20px black;
padding: 7px 30px 7px 20px;
cursor: pointer; cursor: pointer;
position: relative;
z-index: 1;
} }
.edit-section__selected { .edit-section__selected {
...@@ -208,14 +208,15 @@ ...@@ -208,14 +208,15 @@
} }
.panel-editor-tabs { .panel-editor-tabs {
z-index: 1; position: relative;
z-index: 2;
box-shadow: $page-header-shadow; box-shadow: $page-header-shadow;
border-bottom: 1px solid $page-header-border-color; border-bottom: 1px solid $page-header-border-color;
padding: 0 $dashboard-padding; padding: 0 $dashboard-padding;
@include clearfix(); @include clearfix();
.active.gf-tabs-link { .active.gf-tabs-link {
background: #242427; background: $input-label-bg;
} }
} }
...@@ -231,6 +232,7 @@ ...@@ -231,6 +232,7 @@
i { i {
font-size: 120%; font-size: 120%;
} }
&:hover { &:hover {
color: $text-color-strong; color: $text-color-strong;
} }
...@@ -238,11 +240,10 @@ ...@@ -238,11 +240,10 @@
.editor-toolbar-view { .editor-toolbar-view {
position: relative; position: relative;
padding: 10px 20px; padding: 20px 20px;
background-color: $empty-list-cta-bg; background-color: $empty-list-cta-bg;
border-top: 3px solid $orange; top: -45px;
margin: 0 100px; margin: 0 30px 20px 0px;
margin-bottom: 20px;
} }
.editor-toolbar-view__close { .editor-toolbar-view__close {
...@@ -250,8 +251,8 @@ ...@@ -250,8 +251,8 @@
padding: 4px 8px 4px 9px; padding: 4px 8px 4px 9px;
border: none; border: none;
position: absolute; position: absolute;
right: 9px; right: 15px;
top: 7px; top: 20px;
font-size: $font-size-md; font-size: $font-size-md;
&:hover { &:hover {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment