Skip to content

Commit

Permalink
make tab full height, stretch for longer content (#1081)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alanna Scott authored and mistercrunch committed Sep 11, 2016
1 parent 1b3ea85 commit 9241b67
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion caravel/assets/javascripts/SqlLab/components/SqlEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ class SqlEditor extends React.Component {
ctasChanged(event) {
this.setState({ ctas: event.target.value });
}

sqlEditorHeight() {
// quick hack to make the white bg of the tab stretch full height.
const tabNavHeight = 40;
const navBarHeight = 56;
const mysteryVerticalHeight = 50;
return window.innerHeight - tabNavHeight - navBarHeight - mysteryVerticalHeight;
}

render() {
let runButtons = (
<ButtonGroup bsSize="small" className="inline m-r-5 pull-left">
Expand Down Expand Up @@ -248,7 +257,7 @@ class SqlEditor extends React.Component {
</div>
);
return (
<div className="SqlEditor">
<div className="SqlEditor" style={{ minHeight: this.sqlEditorHeight() }}>
<Row>
<Col md={3}>
<SqlEditorLeft queryEditor={this.props.queryEditor} />
Expand Down

0 comments on commit 9241b67

Please sign in to comment.